[U-Boot] [PATCH] multiconfig.sh: replace GNU sed specific match

Jeroen Hofstee jeroen at myspectrum.nl
Wed Oct 1 17:22:58 CEST 2014


A SPL/TPL enabled target would was not recognized as
such by BSD sed, since it relies on a GNU extension.
Instead of or-ing just spell out both matches.

Cc: Masahiro Yamada <yamada.m at jp.panasonic.com>
Signed-off-by: Jeroen Hofstee <jeroen at myspectrum.nl>

---
https://www.gnu.org/software/sed/manual/sed.html:

regexp1\|regexp2
    Matches either regexp1 or regexp2. Use parentheses to use complex
    alternative regular expressions. The matching process tries each
    alternative in turn, from left to right, and the first one that
    succeeds is used. It is a GNU extension.
---
 scripts/multiconfig.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/multiconfig.sh b/scripts/multiconfig.sh
index 4a8737f..c489c7f 100644
--- a/scripts/multiconfig.sh
+++ b/scripts/multiconfig.sh
@@ -69,8 +69,8 @@ get_enabled_subimages() {
 
 	# CONFIG_SPL=y -> spl
 	# CONFIG_TPL=y -> tpl
-	sed -n -e 's/^CONFIG_\(SPL\|TPL\)=y$/\1/p' $KCONFIG_CONFIG | \
-							tr '[A-Z]' '[a-z]'
+	sed -n -e 's/^CONFIG_SPL=y$/spl/p' -e 's/^CONFIG_TPL=y$/tpl/p' \
+							 $KCONFIG_CONFIG
 }
 
 do_silentoldconfig () {
-- 
2.1.0



More information about the U-Boot mailing list