mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
Merge "scripts: Consider env vaiables while running 'make'"
This commit is contained in:
commit
a5894a5955
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
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ fi
|
|||
# Use the merged file as the starting point for:
|
||||
# alldefconfig: Fills in any missing symbols with Kconfig default
|
||||
# allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
|
||||
make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
|
||||
make $MAKE_ARGS KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
|
||||
|
||||
|
||||
# Check all specified config values took (might have missed-dependency issues)
|
||||
|
|
|
|||
Loading…
Reference in a new issue