aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-04-02 18:18:57 -0400
committerTom Rini <trini@konsulko.com>2022-04-02 18:18:57 -0400
commit25b8acee2ea11a9edc100c42a61f5d6187eb6167 (patch)
tree9ef7799b64b242ee0531e3c5af0f522778dc89e0 /scripts
parent10d615f2fcc0d2ef1d611844eb6032fe0fca8afd (diff)
downloadu-boot-25b8acee2ea11a9edc100c42a61f5d6187eb6167.zip
u-boot-25b8acee2ea11a9edc100c42a61f5d6187eb6167.tar.gz
u-boot-25b8acee2ea11a9edc100c42a61f5d6187eb6167.tar.bz2
Revert "global: Remove CONFIG_SYS_EXTRA_OPTIONS support"WIP/02Apr2022-next
Unfortunately, we require additional logic to buildman to support this removal and still use SYS_SOC, etc, for build targets. This reverts commit eeec00072d7a0b5b91896d014618e558ce438738. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.autoconf4
-rwxr-xr-xscripts/build-whitelist.sh23
2 files changed, 24 insertions, 3 deletions
diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
index 00c0381..0b3ffa0 100644
--- a/scripts/Makefile.autoconf
+++ b/scripts/Makefile.autoconf
@@ -100,6 +100,10 @@ tpl/include/autoconf.mk: tpl/u-boot.cfg
# Prior to Kconfig, it was generated by mkconfig. Now it is created here.
define filechk_config_h
(echo "/* Automatically generated - do not edit */"; \
+ for i in $$(echo $(CONFIG_SYS_EXTRA_OPTIONS) | sed 's/,/ /g'); do \
+ echo \#define CONFIG_$$i \
+ | sed '/=/ {s/=/ /;q; } ; { s/$$/ 1/; }'; \
+ done; \
echo \#define CONFIG_BOARDDIR board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);\
echo \#include \<config_uncmd_spl.h\>; \
echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>; \
diff --git a/scripts/build-whitelist.sh b/scripts/build-whitelist.sh
index 37630c0..6feb9b6 100755
--- a/scripts/build-whitelist.sh
+++ b/scripts/build-whitelist.sh
@@ -10,13 +10,30 @@
#
export LC_ALL=C LC_COLLATE=C
-# Looks for the rest of the CONFIG options, but exclude those in Kconfig and
-# defconfig files.
+# There are two independent greps. The first pulls out the component parts
+# of CONFIG_SYS_EXTRA_OPTIONS. An example is:
#
+# SUN7I_GMAC,AHCI,SATAPWR=SUNXI_GPB(8)
+#
+# We want this to produce:
+# CONFIG_SUN7I_GMAC
+# CONFIG_AHCI
+# CONFIG_SATAPWR
+#
+# The second looks for the rest of the CONFIG options, but excludes those in
+# Kconfig and defconfig files.
+#
+(
+git grep CONFIG_SYS_EXTRA_OPTIONS |sed -n \
+ 's/.*CONFIG_SYS_EXTRA_OPTIONS="\(.*\)"/\1/ p' \
+ | tr , '\n' \
+ | sed 's/ *\([A-Za-z0-9_]*\).*/CONFIG_\1/'
+
git grep CONFIG_ | \
egrep -vi "(Kconfig:|defconfig:|README|\.py|\.pl:)" \
| tr ' \t' '\n\n' \
- | sed -n 's/^\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' \
+ | sed -n 's/^\(CONFIG_[A-Za-z0-9_]*\).*/\1/p'
+) \
|sort |uniq >scripts/config_whitelist.txt.tmp1;
# Finally, we need a list of the valid Kconfig options to exclude these from