Script: add a new config for customer to configure the kernel [1/1]
PD#SWPL-13204
Problem:
customer wants to add a new config used by themself
Solution:
add a option to add new config
Verify:
local
Change-Id: I3f7f0e2c8d781a9865bef16aca709db5d3372d6e
Signed-off-by: Dezhen Wang <dezhen.wang@amlogic.com>
diff --git a/amlogic_utils.sh b/amlogic_utils.sh
index 2a09bcb..b40939e 100644
--- a/amlogic_utils.sh
+++ b/amlogic_utils.sh
@@ -38,6 +38,21 @@
if [[ -n ${UPGRADE_PROJECT} ]]; then
KCONFIG_CONFIG=${ROOT_DIR}/${KCONFIG_DEFCONFIG} ${ROOT_DIR}/${KERNEL_DIR}/scripts/kconfig/merge_config.sh -m -r ${ROOT_DIR}/${KCONFIG_DEFCONFIG} ${ROOT_DIR}/${FRAGMENT_CONFIG_UPGRADE}
fi
+
+ if [[ -n ${DEV_CONFIG} ]]; then
+ config_list=$(echo ${CONFIG_GROUP}|sed 's/+/ /g')
+ #verify the extra config is in the right path and merge the config
+ CONFIG_DIR=arch/${ARCH}/configs
+ for config_name in ${config_list[@]}
+ do
+ if [[ ! -f ${ROOT_DIR}/${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/${CONFIG_DIR}/${config_name} ]]; then
+ echo "ERROR: config file ${config_name} is not in the right path!!"
+ exit
+ else
+ KCONFIG_CONFIG=${ROOT_DIR}/${KCONFIG_DEFCONFIG} ${ROOT_DIR}/${KERNEL_DIR}/scripts/kconfig/merge_config.sh -m -r ${ROOT_DIR}/${KCONFIG_DEFCONFIG} ${ROOT_DIR}/${KERNEL_DIR}/${COMMON_DRIVERS_DIR}/${CONFIG_DIR}/${config_name}
+ fi
+ done
+ fi
}
export -f pre_defconfig_cmds