From b3351ed31de88625fa5c09cbc0947f474ca3d5d2 Mon Sep 17 00:00:00 2001 From: Prasad Sodagudi Date: Fri, 20 Mar 2020 16:55:06 -0700 Subject: [PATCH] scripts: gki: Add support for qgki-consolidate_defconfig consolidate fragment contains the all the debug features on top of qgki fragment for regular debugging and debug fragment contains memory debug features. Add support for fragement merging support in the both generate_defconfig.sh and fragement_menuconfig.sh scripts. Change-Id: Iea90997eca060fdf86cd9da08106e7cf11460b21 Signed-off-by: Prasad Sodagudi Signed-off-by: Raghavendra Rao Ananta --- scripts/gki/envsetup.sh | 3 +++ scripts/gki/fragment_menuconfig.sh | 7 +++++-- scripts/gki/generate_defconfig.sh | 7 +++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/gki/envsetup.sh b/scripts/gki/envsetup.sh index dfbcc311eef5..48467acca25d 100755 --- a/scripts/gki/envsetup.sh +++ b/scripts/gki/envsetup.sh @@ -27,6 +27,9 @@ 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 +# Consolidate fragment may not be present for all platforms. +QCOM_CONSOLIDATE_FRAG=`ls ${CONFIGS_DIR}/${PLATFORM_NAME}_consolidate.config 2> /dev/null` + QCOM_GENERIC_PERF_FRAG=${CONFIGS_DIR}/${PLATFORM_NAME}.config QCOM_GENERIC_DEBUG_FRAG=${CONFIGS_DIR}/${PLATFORM_NAME}-debug.config diff --git a/scripts/gki/fragment_menuconfig.sh b/scripts/gki/fragment_menuconfig.sh index 532ed226b0de..e94924e5f65c 100755 --- a/scripts/gki/fragment_menuconfig.sh +++ b/scripts/gki/fragment_menuconfig.sh @@ -6,7 +6,7 @@ usage() { echo "Usage: $0 " - echo "Variants: -gki_defconfig, -qgki_defconfig, and -qgki-debug_defconfig" + echo "Variants: -gki_defconfig, -qgki_defconfig, -qgki-consolidate_defconfig and -qgki-debug_defconfig" echo "Example: $0 lahaina-gki_defconfig" exit 1 } @@ -60,6 +60,9 @@ case "$REQUIRED_DEFCONFIG" in ${PLATFORM_NAME}-qgki-debug_defconfig ) FINAL_DEFCONFIG_BLEND+=" $QCOM_DEBUG_FRAG" ;& # Intentional fallthrough + ${PLATFORM_NAME}-qgki-consolidate_defconfig ) + FINAL_DEFCONFIG_BLEND+=" $QCOM_CONSOLIDATE_FRAG" + ;& # Intentional fallthrough ${PLATFORM_NAME}-qgki_defconfig ) FINAL_DEFCONFIG_BLEND+=" $QCOM_QGKI_FRAG" ${SCRIPTS_ROOT}/fragment_allyesconfig.sh $QCOM_GKI_FRAG $QCOM_GKI_ALLYES_FRAG @@ -79,7 +82,7 @@ esac FINAL_DEFCONFIG_BLEND+=${BASE_DEFCONFIG} # Reverse the order of the configs for the override to work properly -# Correct order is base_defconfig GKI.config QGKI.config debug.config +# Correct order is base_defconfig GKI.config QGKI.config consolidate.config debug.config FINAL_DEFCONFIG_BLEND=`echo "${FINAL_DEFCONFIG_BLEND}" | awk '{ for (i=NF; i>1; i--) printf("%s ",$i); print $1; }'` echo "defconfig blend for $REQUIRED_DEFCONFIG: $FINAL_DEFCONFIG_BLEND" diff --git a/scripts/gki/generate_defconfig.sh b/scripts/gki/generate_defconfig.sh index 8038febc55b6..873f5c3b68bc 100755 --- a/scripts/gki/generate_defconfig.sh +++ b/scripts/gki/generate_defconfig.sh @@ -6,7 +6,7 @@ usage() { echo "Usage: $0 " - echo "Variants: -gki_defconfig, -qgki_defconfig, and -qgki-debug_defconfig" + echo "Variants: -gki_defconfig, -qgki_defconfig, -consolidate_defconfig and -qgki-debug_defconfig" echo "Example: $0 lahaina-gki_defconfig" exit 1 } @@ -59,6 +59,9 @@ case "$REQUIRED_DEFCONFIG" in ${PLATFORM_NAME}-qgki-debug_defconfig ) FINAL_DEFCONFIG_BLEND+=" $QCOM_DEBUG_FRAG" ;& # Intentional fallthrough + ${PLATFORM_NAME}-qgki-consolidate_defconfig ) + FINAL_DEFCONFIG_BLEND+=" $QCOM_CONSOLIDATE_FRAG" + ;& # Intentional fallthrough ${PLATFORM_NAME}-qgki_defconfig ) FINAL_DEFCONFIG_BLEND+=" $QCOM_QGKI_FRAG" ${SCRIPTS_ROOT}/fragment_allyesconfig.sh $QCOM_GKI_FRAG $QCOM_GKI_ALLYES_FRAG @@ -78,7 +81,7 @@ esac FINAL_DEFCONFIG_BLEND+=${BASE_DEFCONFIG} # Reverse the order of the configs for the override to work properly -# Correct order is base_defconfig GKI.config QGKI.config debug.config +# Correct order is base_defconfig GKI.config QGKI.config consolidate.config debug.config FINAL_DEFCONFIG_BLEND=`echo "${FINAL_DEFCONFIG_BLEND}" | awk '{ for (i=NF; i>1; i--) printf("%s ",$i); print $1; }'` echo "defconfig blend for $REQUIRED_DEFCONFIG: $FINAL_DEFCONFIG_BLEND"