Skip to contentSkip to conversation

merge_config.sh: add br2-external support

PATCH Superseded Ilya Kuzmich 3 participants 5 messages Dec 28, 2017 – Jan 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 merge_config.sh: add br2-external support

Pass BR2_EXTERNAL value via -e option.
This will prevent merge_config.sh from silently eating any symbols defined in external trees on a clean buildroot tree invocation.

---
 support/kconfig/merge_config.sh | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
support/kconfig/merge_config.sh +12 -1
index 8a1708b..f52318a 100755
@@ -33,6 +33,7 @@ usage() {
 	echo "  -n    use allnoconfig instead of alldefconfig"
 	echo "  -r    list redundant entries when merging fragments"
 	echo "  -O    dir to put generated output files"
+	echo "  -e    br external tree"
 }
 
 MAKE=true
@@ -71,6 +72,11 @@ while true; do
 		shift 2
 		continue
 		;;
+	"-e")
+		EXTERNAL=$2
+		shift 2
+		continue
+		;;
 	*)
 		break
 		;;
@@ -127,11 +133,16 @@ if [ "$OUTPUT" != "." ] ; then
 	OUTPUT_ARG="O=$OUTPUT"
 fi
 
+EXTERNAL_ARG=""
+if [ "$EXTERNAL" ] ; then
+    EXTERNAL_ARG="BR2_EXTERNAL=$EXTERNAL"
+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 KCONFIG_ALLCONFIG=$TMP_FILE $EXTERNAL_ARG $OUTPUT_ARG $ALLTARGET
 
 
 # Check all specified config values took (might have missed-dependency issues)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 merge_config.sh: add br2-external support

Ilya, All,

On 2017-12-28 18:09 +0300, Ilya Kuzmich spake thusly:

Quoted 14 lines

Pass BR2_EXTERNAL value via -e option.
This will prevent merge_config.sh from silently eating any symbols defined in external trees on a clean buildroot tree invocation.

---
 support/kconfig/merge_config.sh | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
support/kconfig/merge_config.sh +0 -0
index 8a1708b..f52318a 100755

support/kconfig/merge_config.sh usage() { · line 36

Quoted 4 lines
support/kconfig/merge_config.sh +1 -0
@@ -33,6 +33,7 @@ usage() {
 	echo "  -n    use allnoconfig instead of alldefconfig"
 	echo "  -r    list redundant entries when merging fragments"
 	echo "  -O    dir to put generated output files"
+	echo "  -e    br external tree"

So, this is not only about one tree, since we also support mutiple trees, so:

-e colon-separated list of br2-external trees to use (optional)

Quoted 16 lines
support/kconfig/merge_config.sh +5 -0
 }
 
 MAKE=true
@@ -71,6 +72,11 @@ while true; do
 		shift 2
 		continue
 		;;
+	"-e")
+		EXTERNAL=$2
+		shift 2
+		continue
+		;;
 	*)
 		break
 		;;

support/kconfig/merge_config.sh if [ "$OUTPUT" != "." ] ; then · line 139

Quoted 7 lines
support/kconfig/merge_config.sh +4 -0
@@ -127,11 +133,16 @@ if [ "$OUTPUT" != "." ] ; then
 	OUTPUT_ARG="O=$OUTPUT"
 fi
 
+EXTERNAL_ARG=""
+if [ "$EXTERNAL" ] ; then
+    EXTERNAL_ARG="BR2_EXTERNAL=$EXTERNAL"
+fi

Why don't you simply handle that in the case statement, above?

    "-e")
        EXTERNAL_ARG="BR2_EXTERNAL=$2"
        shift 2
        continue
        ;;

And that all. And no need to explicitly set it to empty first.

Regards,
Yann E. MORIN.

Quoted 16 lines
support/kconfig/merge_config.sh +1 -1
 # 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 KCONFIG_ALLCONFIG=$TMP_FILE $EXTERNAL_ARG $OUTPUT_ARG $ALLTARGET
 
 
 # Check all specified config values took (might have missed-dependency issues)
Signature · 6 lines
2.7.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH v2 1/1 merge_config.sh: add br2-external support

Pass BR2_EXTERNAL value via -e option.
This will prevent merge_config.sh from silently eating any symbols defined in external trees on a clean buildroot tree invocation.

---
Changes v1 -> v2:
Simplifications

---
 support/kconfig/merge_config.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
support/kconfig/merge_config.sh +7 -1
index 8a1708b..e1d7ffa 100755
@@ -33,6 +33,7 @@ usage() {
 	echo "  -n    use allnoconfig instead of alldefconfig"
 	echo "  -r    list redundant entries when merging fragments"
 	echo "  -O    dir to put generated output files"
+	echo "  -e    colon-separated list of br2-external trees to use (optional)"
 }
 
 MAKE=true
@@ -71,6 +72,11 @@ while true; do
 		shift 2
 		continue
 		;;
+	"-e")
+		EXTERNAL_ARG="BR2_EXTERNAL=$2"
+		shift 2
+		continue
+		;;
 	*)
 		break
 		;;
@@ -131,7 +137,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 KCONFIG_ALLCONFIG=$TMP_FILE $EXTERNAL_ARG $OUTPUT_ARG $ALLTARGET
 
 
 # Check all specified config values took (might have missed-dependency issues)
Signature · 1 line
2.7.4
#3 lore raw

PATCH v2 1/1 merge_config.sh: add br2-external support

Ilya, All,

On 2018-01-09 14:37 +0300, Ilya Kuzmich spake thusly:

Quoted 5 lines

Pass BR2_EXTERNAL value via -e option.
This will prevent merge_config.sh from silently eating any symbols defined in external trees on a clean buildroot tree invocation.

Regards,
Yann E. MORIN.

Quoted 49 lines

---
Changes v1 -> v2:
Simplifications

---
 support/kconfig/merge_config.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
support/kconfig/merge_config.sh +7 -1
index 8a1708b..e1d7ffa 100755
@@ -33,6 +33,7 @@ usage() {
 	echo "  -n    use allnoconfig instead of alldefconfig"
 	echo "  -r    list redundant entries when merging fragments"
 	echo "  -O    dir to put generated output files"
+	echo "  -e    colon-separated list of br2-external trees to use (optional)"
 }
 
 MAKE=true
@@ -71,6 +72,11 @@ while true; do
 		shift 2
 		continue
 		;;
+	"-e")
+		EXTERNAL_ARG="BR2_EXTERNAL=$2"
+		shift 2
+		continue
+		;;
 	*)
 		break
 		;;
@@ -131,7 +137,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 KCONFIG_ALLCONFIG=$TMP_FILE $EXTERNAL_ARG $OUTPUT_ARG $ALLTARGET
 
 
 # Check all specified config values took (might have missed-dependency issues)
Signature · 6 lines
2.7.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH v2 1/1 merge_config.sh: add br2-external support

In reply to Ilya Kuzmich
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Ilya" == Ilya Kuzmich <[email protected]> writes:

Pass BR2_EXTERNAL value via -e option.
This will prevent merge_config.sh from silently eating any symbols defined in external trees on a clean buildroot tree invocation.

Quoted 7 lines

---
Changes v1 -> v2:
Simplifications

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard