mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
kernel/config: merge moto fragment configs
Kernel configs compose of several parts.These parts will be merged into
one final file such as "holi-qgki-debug_defconfig".
The rule of Moto-product-config files from high order is:
product debug config
platform debug config,
product config
platform config
Here is an example of product "denver" based on 4350
platform (holi):
1. factory build config list with order:
factory-holi-denver.config
factory-holi.config
moto-holi-denver.config
moto-holi.config
2. userdebug build config list with order:
debug-holi-denver.config
debug-holi.config
moto-holi-denver.config
moto-holi.config
3. user version config list with order:
moto-holi-denver.config
moto-holi.config
Change-Id: Ie7512300581337ae6768bdfa618613a797f3c10f
Signed-off-by: weimh1 <weimh1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1769363
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
parent
0f89da7576
commit
dee1ae4006
9 changed files with 185 additions and 1 deletions
|
|
@ -13,4 +13,4 @@
|
|||
# You can check the .config file to verify that your configuration option is
|
||||
# being set as expected.
|
||||
#
|
||||
CONFIG_SUSPEND_DEBUG=y
|
||||
|
||||
|
|
|
|||
17
arch/arm64/configs/vendor/ext_config/debug-holi.config
vendored
Normal file
17
arch/arm64/configs/vendor/ext_config/debug-holi.config
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#
|
||||
# Please avoid changing the Qualcomm defconfig files and use this file to
|
||||
# add any Motorola-specific configuration changes that are applicable to
|
||||
# userdebug, eng, and user builds.
|
||||
#
|
||||
# After building, a list of all of the config files that are used can be found
|
||||
# at the top of:
|
||||
# out/target/product/$(PRODUCT)/obj/KERNEL_OBJ/mapphone_defconfig
|
||||
#
|
||||
# The actual output of the kernel configuration system can be found at:
|
||||
# out/target/product/$(PRODUCT)/obj/KERNEL_OBJ/.config
|
||||
#
|
||||
# You can check the .config file to verify that your configuration option is
|
||||
# being set as expected.
|
||||
#
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_CFI_PERMISSIVE=y
|
||||
16
arch/arm64/configs/vendor/ext_config/factory-holi.config
vendored
Normal file
16
arch/arm64/configs/vendor/ext_config/factory-holi.config
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#
|
||||
# Please avoid changing the Qualcomm defconfig files and use this file to
|
||||
# add any Motorola-specific configuration changes that are applicable to
|
||||
# userdebug, eng, and user builds.
|
||||
#
|
||||
# After building, a list of all of the config files that are used can be found
|
||||
# at the top of:
|
||||
# out/target/product/$(PRODUCT)/obj/KERNEL_OBJ/mapphone_defconfig
|
||||
#
|
||||
# The actual output of the kernel configuration system can be found at:
|
||||
# out/target/product/$(PRODUCT)/obj/KERNEL_OBJ/.config
|
||||
#
|
||||
# You can check the .config file to verify that your configuration option is
|
||||
# being set as expected.
|
||||
#
|
||||
CONFIG_CFI_PERMISSIVE=y
|
||||
1
arch/arm64/configs/vendor/ext_config/holi_consolidate.config
vendored
Symbolic link
1
arch/arm64/configs/vendor/ext_config/holi_consolidate.config
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../holi_consolidate.config
|
||||
1
arch/arm64/configs/vendor/ext_config/holi_debug.config
vendored
Symbolic link
1
arch/arm64/configs/vendor/ext_config/holi_debug.config
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../holi_debug.config
|
||||
17
arch/arm64/configs/vendor/ext_config/moto-holi.config
vendored
Normal file
17
arch/arm64/configs/vendor/ext_config/moto-holi.config
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#
|
||||
# Please avoid changing the Qualcomm defconfig files and use this file to
|
||||
# add any Motorola-specific configuration changes that are applicable to
|
||||
# userdebug, eng, and user builds.
|
||||
#
|
||||
# After building, a list of all of the config files that are used can be found
|
||||
# at the top of:
|
||||
# out/target/product/$(PRODUCT)/obj/KERNEL_OBJ/mapphone_defconfig
|
||||
#
|
||||
# The actual output of the kernel configuration system can be found at:
|
||||
# out/target/product/$(PRODUCT)/obj/KERNEL_OBJ/.config
|
||||
#
|
||||
# You can check the .config file to verify that your configuration option is
|
||||
# being set as expected.
|
||||
#
|
||||
CONFIG_LOCALVERSION="-moto"
|
||||
CONFIG_MMI_DEVICE_DTBS=y
|
||||
51
arch/arm64/configs/vendor/holi_consolidate.config
vendored
Normal file
51
arch/arm64/configs/vendor/holi_consolidate.config
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
CONFIG_LOCALVERSION="-qgki-consolidate"
|
||||
CONFIG_IOMMU_TLBSYNC_DEBUG=y
|
||||
CONFIG_IOMMU_DEBUG=y
|
||||
CONFIG_IOMMU_TESTS=y
|
||||
CONFIG_IO_PGTABLE_PAGE_ACCOUNTING=y
|
||||
CONFIG_CMA_DEBUGFS=y
|
||||
CONFIG_CMA_DEBUG=y
|
||||
CONFIG_DEBUG_PAGEALLOC=y
|
||||
CONFIG_DEBUG_PAGEALLOC_ENABLE_DEFAULT=y
|
||||
CONFIG_PAGE_OWNER=y
|
||||
CONFIG_PAGE_OWNER_ENABLE_DEFAULT=y
|
||||
CONFIG_PAGE_EXTENSION_PAGE_FREE=y
|
||||
CONFIG_PSI_FTRACE=y
|
||||
# CONFIG_DEBUG_DMA_BUF_REF is not set
|
||||
CONFIG_EDAC_KRYO_ARM64_PANIC_ON_CE=y
|
||||
CONFIG_QMP_DEBUGFS_CLIENT=y
|
||||
CONFIG_ATOMIC64_SELFTEST=m
|
||||
CONFIG_DETECT_HUNG_TASK=y
|
||||
CONFIG_DEBUG_SPINLOCK=y
|
||||
CONFIG_TEST_USER_COPY=m
|
||||
CONFIG_OF_RESERVED_MEM_CHECK=y
|
||||
CONFIG_BUG_ON_HW_MEM_ONLINE_FAIL=y
|
||||
CONFIG_PANIC_ON_SCHED_BUG=y
|
||||
CONFIG_PANIC_ON_RT_THROTTLING=y
|
||||
CONFIG_LKDTM=m
|
||||
CONFIG_RUNTIME_TESTING_MENU=y
|
||||
CONFIG_PREEMPTIRQ_EVENTS=y
|
||||
CONFIG_SERIAL_MSM_GENI_CONSOLE=y
|
||||
CONFIG_QCOM_RTB=y
|
||||
CONFIG_QCOM_RTB_SEPARATE_CPUS=y
|
||||
CONFIG_QCOM_RTB_QGKI=y
|
||||
CONFIG_DEBUG_CONSOLE_UNHASHED_POINTERS=y
|
||||
CONFIG_COMMON_CLK_QCOM_DEBUG=y
|
||||
CONFIG_CNSS2_DEBUG=y
|
||||
CONFIG_NL80211_TESTMODE=y
|
||||
CONFIG_EDAC_QCOM_LLCC_PANIC_ON_CE=y
|
||||
CONFIG_LOCK_TORTURE_TEST=m
|
||||
CONFIG_RCU_TORTURE_TEST=m
|
||||
# CONFIG_CDNS_I3C_MASTER is not set
|
||||
# CONFIG_DW_I3C_MASTER is not set
|
||||
CONFIG_CORESIGHT_SOURCE_ETM4X=y
|
||||
# CONFIG_CORESIGHT_CTI_SAVE_DISABLE is not set
|
||||
CONFIG_MEM_SHARE_QMI_SERVICE=y
|
||||
CONFIG_MHI_DEBUG=y
|
||||
CONFIG_SM_DEBUGCC_HOLI=y
|
||||
CONFIG_DEBUG_PANIC_ON_OOM=y
|
||||
CONFIG_USB_F_FS_IPC_LOGGING=y
|
||||
CONFIG_DYNAMIC_DEBUG=y
|
||||
CONFIG_QTI_PMIC_GLINK_CLIENT_DEBUG=y
|
||||
# CONFIG_HH_DISABLE_UART is not set
|
||||
CONFIG_DEBUG_MODULE_LOAD_INFO=y
|
||||
78
scripts/gki/fragment_motoconfig.sh
Executable file
78
scripts/gki/fragment_motoconfig.sh
Executable file
|
|
@ -0,0 +1,78 @@
|
|||
#!/bin/bash
|
||||
# Copyright (c) 2020, Motorola. All rights reserved.
|
||||
|
||||
# Script to merge all Moto kernel config
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 <input_platform_name> $1<required defconfig>"
|
||||
echo "For example: $0 holi $1 qgki_defconfig"
|
||||
echo "Note: The output is all valid moto kernel config files"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Error: Invalid number of arguments"
|
||||
usage
|
||||
fi
|
||||
|
||||
#echo "framgement_moto: TARGET_PRODUCT=${TARGET_PRODUCT} TARGET_BUILD_VARIANT=${TARGET_BUILD_VARIANT}"
|
||||
|
||||
TARGET_PRODUCT_NAME=${TARGET_PRODUCT%%_*}
|
||||
TARGET_PRODUCT_TYPE=${TARGET_PRODUCT#*_}
|
||||
LOCAL_PLATFORM_NAME=${1}
|
||||
REQUIRED_DEFCONFIG=${2}
|
||||
echo "moto framgement config: LOCAL_PLATFORM_NAME=${LOCAL_PLATFORM_NAME} TARGET_PRODUCT_NAME=$TARGET_PRODUCT_NAME TARGET_PRODUCT_TYPE=$TARGET_PRODUCT_TYPE"
|
||||
|
||||
#skip msi products
|
||||
if [ $TARGET_PRODUCT_NAME == "msi" ]; then
|
||||
echo "This is msi, skip moto config fragements"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
MOTO_CONFIG_DIR=$CONFIGS_DIR/ext_config
|
||||
export MOTO_REQUIRED_CONFIG=""
|
||||
|
||||
# merge factory config or userdebug config
|
||||
if [ $TARGET_PRODUCT_TYPE == "factory" ]; then
|
||||
if [ -e $MOTO_CONFIG_DIR/factory-${LOCAL_PLATFORM_NAME}-${TARGET_PRODUCT_NAME}.config ]; then
|
||||
MOTO_REQUIRED_CONFIG+=" $MOTO_CONFIG_DIR/factory-${LOCAL_PLATFORM_NAME}-${TARGET_PRODUCT_NAME}.config"
|
||||
fi
|
||||
|
||||
if [ -e $MOTO_CONFIG_DIR/factory-${LOCAL_PLATFORM_NAME}.config ]; then
|
||||
MOTO_REQUIRED_CONFIG+=" $MOTO_CONFIG_DIR/factory-${LOCAL_PLATFORM_NAME}.config"
|
||||
fi
|
||||
elif [ $TARGET_BUILD_VARIANT == "userdebug" ] && [ $REQUIRED_DEFCONFIG != ${LOCAL_PLATFORM_NAME}-gki_defconfig ]; then
|
||||
if [ -e $MOTO_CONFIG_DIR/debug-${LOCAL_PLATFORM_NAME}-${TARGET_PRODUCT_NAME}.config ]; then
|
||||
MOTO_REQUIRED_CONFIG+=" $MOTO_CONFIG_DIR/debug-${LOCAL_PLATFORM_NAME}-${TARGET_PRODUCT_NAME}.config"
|
||||
fi
|
||||
|
||||
if [ -e $MOTO_CONFIG_DIR/debug-${LOCAL_PLATFORM_NAME}.config ]; then
|
||||
MOTO_REQUIRED_CONFIG+=" $MOTO_CONFIG_DIR/debug-${LOCAL_PLATFORM_NAME}.config"
|
||||
fi
|
||||
|
||||
if [ -e $MOTO_CONFIG_DIR/${LOCAL_PLATFORM_NAME}_debug.config ]; then
|
||||
MOTO_REQUIRED_CONFIG+=" $MOTO_CONFIG_DIR/${LOCAL_PLATFORM_NAME}_debug.config"
|
||||
if [ -e $MOTO_CONFIG_DIR/${LOCAL_PLATFORM_NAME}_consolidate.config ]; then
|
||||
MOTO_REQUIRED_CONFIG+=" $MOTO_CONFIG_DIR/${LOCAL_PLATFORM_NAME}_consolidate.config"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#merge moto product config
|
||||
if [ -e $MOTO_CONFIG_DIR/moto-${LOCAL_PLATFORM_NAME}-${TARGET_PRODUCT_NAME}.config ]; then
|
||||
MOTO_REQUIRED_CONFIG+=" $MOTO_CONFIG_DIR/moto-${LOCAL_PLATFORM_NAME}-${TARGET_PRODUCT_NAME}.config"
|
||||
fi
|
||||
|
||||
#merge moto platform config
|
||||
if [ -e $MOTO_CONFIG_DIR/moto-${LOCAL_PLATFORM_NAME}.config ]; then
|
||||
MOTO_REQUIRED_CONFIG+=" $MOTO_CONFIG_DIR/moto-${LOCAL_PLATFORM_NAME}.config"
|
||||
fi
|
||||
|
||||
#merge moto platform config that depended on -QGKI.config
|
||||
if [ $REQUIRED_DEFCONFIG != ${LOCAL_PLATFORM_NAME}-gki_defconfig ]; then
|
||||
if [ -e $MOTO_CONFIG_DIR/moto-${LOCAL_PLATFORM_NAME}-depQGKI.config ]; then
|
||||
MOTO_REQUIRED_CONFIG+=" $MOTO_CONFIG_DIR/moto-${LOCAL_PLATFORM_NAME}-depQGKI.config"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "require moto blend configs:$MOTO_REQUIRED_CONFIG"
|
||||
|
|
@ -55,6 +55,9 @@ fi
|
|||
|
||||
FINAL_DEFCONFIG_BLEND=""
|
||||
|
||||
source ${SCRIPTS_ROOT}/fragment_motoconfig.sh ${PLATFORM_NAME} ${REQUIRED_DEFCONFIG}
|
||||
FINAL_DEFCONFIG_BLEND+=${MOTO_REQUIRED_CONFIG}
|
||||
|
||||
case "$REQUIRED_DEFCONFIG" in
|
||||
${PLATFORM_NAME}-qgki-debug_defconfig )
|
||||
FINAL_DEFCONFIG_BLEND+=" $QCOM_DEBUG_FRAG"
|
||||
|
|
|
|||
Loading…
Reference in a new issue