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
This commit is contained in:
Jyotiraditya 2020-09-19 22:14:26 +05:30 committed by Alexander Koskovich
parent b089b1a08f
commit 85f12985fe
No known key found for this signature in database
GPG Key ID: F1107C9A417AC130
2 changed files with 7 additions and 50 deletions

View File

@ -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=$?

View File

@ -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")