From ae168c8c0faac92ec01e445eaef20058f14e83db Mon Sep 17 00:00:00 2001 From: Dezhen Wang Date: Mon, 1 Apr 2024 07:57:23 +0000 Subject: [PATCH] scripts: function adjustment and remove staging dir last time [1/1] PD#SWPL-163329 Problem: building will fail because last build remain the staging dir Solution: remove staging dir in last build Verify: local Change-Id: Ie5acfb09af45027d567f12f197ec4001af0d304a Signed-off-by: Dezhen Wang --- amlogic_utils.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/amlogic_utils.sh b/amlogic_utils.sh index 29813d553..8f96fd8df 100644 --- a/amlogic_utils.sh +++ b/amlogic_utils.sh @@ -221,6 +221,10 @@ function prepare_module_build() { echo EXT_MODULES=${EXT_MODULES} rm ${temp_file} + + if [[ -d ${MODULES_STAGING_DIR} ]]; then + rm -rf ${MODULES_STAGING_DIR} + fi } export -f prepare_module_build @@ -1915,9 +1919,11 @@ export -f setting_up_for_build function build_kernel_for_32bit () { set -x + pre_defconfig_cmds if [ "${SKIP_DEFCONFIG}" != "1" ] ; then (cd ${KERNEL_DIR} && make ARCH=arm ${TOOL_ARGS} O=${OUT_DIR} "${MAKE_ARGS[@]}" ${DEFCONFIG}) fi + post_defconfig_cmds echo "========================================================" echo " Building kernel" @@ -1949,8 +1955,6 @@ function build_android_32bit () { source ${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/build.config.amlogic32 - pre_defconfig_cmds - CC_CLANG=1 set_default_parameters_for_32bit @@ -1965,8 +1969,6 @@ function build_android_32bit () { build_kernel_for_32bit - post_defconfig_cmds - eval ${POST_KERNEL_BUILD_CMDS} modules_install_for_32bit