From 85f12985fe7c54ef0472266395df9d88315da407 Mon Sep 17 00:00:00 2001 From: Jyotiraditya Date: Sat, 19 Sep 2020 22:14:26 +0530 Subject: [PATCH] pa: envsetup: Stop executing vendor HAL script. * CAF used this to generate blueprints for their QTI vendor HALs under vendor/qcom/opensource/interfaces. * In Android 11 they switched to pre-generated blueprints, so there's no reason to run this at build time, also it slows down build. * Also remove mka, after removing this it no longer serves a purpose as the "m" function exists. Change-Id: I9644a08d120fbfedf0cb119e21e12800fa2509ff --- build.sh | 23 ++++++----------------- build/envsetup.sh | 34 +--------------------------------- 2 files changed, 7 insertions(+), 50 deletions(-) diff --git a/build.sh b/build.sh index a7a79571..0bbc0962 100755 --- a/build.sh +++ b/build.sh @@ -129,17 +129,6 @@ if [ -z "$JOBS" ]; then fi fi -# Use mka when available and jobs not specified -if [ "$(command -v 'mka')" ]; then - if [ -z "${CMD}" ]; then - MAKE="mka" - else - MAKE="make" - fi -else - MAKE="make" -fi - # Grab the build version PA_DISPLAY_VERSION="$(cat $DIR_ROOT/vendor/pa/config/version.mk | grep 'PA_VERSION_FLAVOR := *' | sed 's/.*= //') \ $(cat $DIR_ROOT/vendor/pa/config/version.mk | grep 'PA_VERSION_CODE := *' | sed 's/.*= //')" @@ -148,14 +137,14 @@ $(cat $DIR_ROOT/vendor/pa/config/version.mk | grep 'PA_VERSION_CODE := *' | sed if [ "$FLAG_CLEAN_BUILD" = 'y' ]; then echo -e "${CLR_BLD_BLU}Cleaning output files left from old builds${CLR_RST}" echo -e "" - ${MAKE} clobber"$CMD" + m clobber"$CMD" fi # Prep for a installclean build, if requested so if [ "$FLAG_INSTALLCLEAN_BUILD" = 'y' ]; then echo -e "${CLR_BLD_BLU}Cleaning compiled image files left from old builds${CLR_RST}" echo -e "" - ${MAKE} installclean"$CMD" + m installclean"$CMD" fi # Sync up, if asked to @@ -187,7 +176,7 @@ echo -e "${CLR_BLD_BLU}Starting compilation${CLR_RST}" echo -e "" # Build a specific module if [ "${MODULE}" ]; then - ${MAKE} $MODULE"$CMD" + m $MODULE"$CMD" # Build signed rom package if specified elif [ "${KEY_MAPPINGS}" ]; then # Set sign key password file if specified @@ -196,10 +185,10 @@ elif [ "${KEY_MAPPINGS}" ]; then fi # Generate otapackage if in need of unsigned build if [ "$FLAG_BACKUP_UNSIGNED" = 'y' ]; then - ${MAKE} bacon"$CMD" + m bacon"$CMD" mv $OUT/pa-${PA_VERSION}.zip $DIR_ROOT/pa-${PA_VERSION}-unsigned.zip else - ${MAKE} dist"$CMD" + m dist"$CMD" fi echo -e "${CLR_BLD_BLU}Signing target files apks${CLR_RST}" ./build/tools/releasetools/sign_target_files_apks -o -d $KEY_MAPPINGS \ @@ -228,7 +217,7 @@ elif [ "${KEY_MAPPINGS}" ]; then fi # Build rom package else - ${MAKE} bacon"$CMD" + m bacon"$CMD" ln -sf $OUT/pa-${PA_VERSION}.zip $DIR_ROOT fi RETVAL=$? diff --git a/build/envsetup.sh b/build/envsetup.sh index 75c80679..a9d9647a 100755 --- a/build/envsetup.sh +++ b/build/envsetup.sh @@ -7,7 +7,6 @@ Additional Paranoid Android functions: - aospremote: Add git remote for matching AOSP repository. - cafremote: Add git remote for matching CodeAurora repository. - githubremote: Add git remote for AOSPA Github. -- mka: Builds using SCHED_BATCH on all processors. - repolastsync: Prints date and time of last repo sync. EOF } @@ -17,7 +16,7 @@ function brunch() breakfast $* if [ $? -eq 0 ]; then - mka bacon + m bacon else echo "No such item in brunch menu. Try 'breakfast'" return 1 @@ -174,37 +173,6 @@ function githubremote() echo "Remote 'aospa' created" } -# Make using all available CPUs -function mka() { - if [ -f $ANDROID_BUILD_TOP/$QTI_BUILDTOOLS_DIR/build/update-vendor-hal-makefiles.sh ]; then - vendor_hal_script=$ANDROID_BUILD_TOP/$QTI_BUILDTOOLS_DIR/build/update-vendor-hal-makefiles.sh - source $vendor_hal_script --check - regen_needed=$? - else - vendor_hal_script=$ANDROID_BUILD_TOP/device/qcom/common/vendor_hal_makefile_generator.sh - regen_needed=1 - fi - - if [ $regen_needed -eq 1 ]; then - _wrap_build $(get_make_command hidl-gen) hidl-gen ALLOW_MISSING_DEPENDENCIES=true - RET=$? - if [ $RET -ne 0 ]; then - echo -n "${color_failed}#### hidl-gen compilation failed, check above errors" - echo " ####${color_reset}" - return $RET - fi - source $vendor_hal_script - RET=$? - if [ $RET -ne 0 ]; then - echo -n "${color_failed}#### HAL file .bp generation failed dure to incpomaptible HAL files , please check above error log" - echo " ####${color_reset}" - return $RET - fi - fi - - m -j "$@" -} - function repolastsync() { RLSPATH="$ANDROID_BUILD_TOP/.repo/.repo_fetchtimes.json" RLSLOCAL=$(date -d "$(stat -c %z $RLSPATH)" +"%e %b %Y, %T %Z")