mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
scripts: Consider env vaiables while running 'make'
The scripts, gki/generate_defconfig.sh and kconfig/merge_config.sh doesn't consider the host exported environment variables (such as HOSTCC) while running 'make'. This is particularly needed in the Android build environment as it uses the compiler, linker, and other utilities from a pre-builts' path, rather than depending on the host tools. Hence, pass the environment variables explicitly. Change-Id: I082c0c05be5f4266fc647e3c1ebef8302e1a433a Signed-off-by: Raghavendra Rao Ananta <[email protected]>
This commit is contained in:
parent
7bbf48dc2d
commit
d275a9d3ae
3 changed files with 18 additions and 5 deletions
|
|
@ -10,6 +10,9 @@ KERN_SRC=`pwd`
|
|||
: ${ARCH:=arm64}
|
||||
: ${CROSS_COMPILE:=aarch64-linux-gnu-}
|
||||
: ${REAL_CC:=clang}
|
||||
: ${HOSTCC:=gcc}
|
||||
: ${HOSTLD:ld}
|
||||
: ${HOSTAR:ar}
|
||||
: ${KERN_OUT:=}
|
||||
|
||||
CONFIGS_DIR=${KERN_SRC}/arch/${ARCH}/configs/vendor
|
||||
|
|
@ -23,5 +26,5 @@ QCOM_GKI_FRAG=${CONFIGS_DIR}/${PLATFORM_NAME}_GKI.config
|
|||
QCOM_QGKI_FRAG=${CONFIGS_DIR}/${PLATFORM_NAME}_QGKI.config
|
||||
QCOM_DEBUG_FRAG=${CONFIGS_DIR}/${PLATFORM_NAME}_debug.config
|
||||
|
||||
export ARCH CROSS_COMPILE REAL_CC KERN_SRC KERN_OUT CONFIGS_DIR BASE_DEFCONFIG \
|
||||
QCOM_GKI_FRAG QCOM_QGKI_FRAG QCOM_DEBUG_FRAG
|
||||
export ARCH CROSS_COMPILE REAL_CC HOSTCC HOSTLD HOSTAR KERN_SRC KERN_OUT \
|
||||
CONFIGS_DIR BASE_DEFCONFIG QCOM_GKI_FRAG QCOM_QGKI_FRAG QCOM_DEBUG_FRAG
|
||||
|
|
|
|||
|
|
@ -25,6 +25,15 @@ PLATFORM_NAME=`echo $PLATFORM_NAME | sed "s/vendor\///g"`
|
|||
# We should be in the kernel root after the envsetup
|
||||
source ${SCRIPTS_ROOT}/envsetup.sh $PLATFORM_NAME
|
||||
|
||||
KERN_MAKE_ARGS="ARCH=$ARCH \
|
||||
CROSS_COMPILE=$CROSS_COMPILE \
|
||||
REAL_CC=$REAL_CC \
|
||||
CLANG_TRIPLE=$CLANG_TRIPLE \
|
||||
HOSTCC=$HOSTCC \
|
||||
HOSTLD=$HOSTLD \
|
||||
HOSTAR=$HOSTAR \
|
||||
"
|
||||
|
||||
# Allyes fragment temporarily created on GKI config fragment
|
||||
QCOM_GKI_ALLYES_FRAG=${CONFIGS_DIR}/${PLATFORM_NAME}_ALLYES_GKI.config
|
||||
|
||||
|
|
@ -59,8 +68,9 @@ FINAL_DEFCONFIG_BLEND=`echo "${FINAL_DEFCONFIG_BLEND}" | awk '{ for (i=NF; i>1;
|
|||
|
||||
echo "defconfig blend for $REQUIRED_DEFCONFIG: $FINAL_DEFCONFIG_BLEND"
|
||||
|
||||
${KERN_SRC}/scripts/kconfig/merge_config.sh $FINAL_DEFCONFIG_BLEND
|
||||
make savedefconfig
|
||||
MAKE_ARGS=$KERN_MAKE_ARGS \
|
||||
${KERN_SRC}/scripts/kconfig/merge_config.sh $FINAL_DEFCONFIG_BLEND
|
||||
make $KERN_MAKE_ARGS savedefconfig
|
||||
mv defconfig $CONFIGS_DIR/$REQUIRED_DEFCONFIG
|
||||
|
||||
# Cleanup the allyes config fragment and other generated files
|
||||
|
|
|
|||
Loading…
Reference in a new issue