summaryrefslogtreecommitdiffstats
path: root/support/kconfig/patches/20-merge_config.sh-Allow-to-define-config-prefix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'support/kconfig/patches/20-merge_config.sh-Allow-to-define-config-prefix.patch')
-rw-r--r--support/kconfig/patches/20-merge_config.sh-Allow-to-define-config-prefix.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/support/kconfig/patches/20-merge_config.sh-Allow-to-define-config-prefix.patch b/support/kconfig/patches/20-merge_config.sh-Allow-to-define-config-prefix.patch
new file mode 100644
index 0000000000..645043b163
--- /dev/null
+++ b/support/kconfig/patches/20-merge_config.sh-Allow-to-define-config-prefix.patch
@@ -0,0 +1,31 @@
+Index: kconfig/merge_config.sh
+===================================================================
+--- kconfig.orig/merge_config.sh
++++ kconfig/merge_config.sh
+@@ -34,12 +34,16 @@ usage() {
+ echo " -r list redundant entries when merging fragments"
+ echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead."
+ echo " -e colon-separated list of br2-external trees to use (optional)"
++ echo
++ echo "Used prefix: '$CONFIG_PREFIX'. You can redefine it with \$CONFIG_
++ environment variable."
+ }
+
+ RUNMAKE=true
+ ALLTARGET=alldefconfig
+ WARNREDUN=false
+ OUTPUT=.
++CONFIG_PREFIX=${CONFIG_-CONFIG_}
+
+ while true; do
+ case $1 in
+@@ -105,7 +109,8 @@ if [ ! -r "$INITFILE" ]; then
+ fi
+
+ MERGE_LIST=$*
+-SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p"
++SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)[= ].*/\2/p"
++
+ TMP_FILE=$(mktemp -t .tmp.config.XXXXXXXXXX)
+
+ echo "Using $INITFILE as base"
OpenPOWER on IntegriCloud