summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-09-01 08:06:57 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-09-01 08:06:57 +0200
commite5a258256fbfebabf068fbb2001eab0c71de1a0d (patch)
treeada0bfe370431e3d11311668114c66648f422ccb
parent9e5ec3fb992f42aeab63a3c3f137c6b2e62a3ab5 (diff)
add randconfig target
-rw-r--r--Makefile2
-rwxr-xr-xscript/randconfig13
2 files changed, 14 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7952cf1..9244c3f 100644
--- a/Makefile
+++ b/Makefile
@@ -332,7 +332,7 @@ config: Kconfig
${QUIET}kconfig-qconf Kconfig
randconfig: Kconfig
- ${QUIET}kconfig-conf --randconfig Kconfig
+ ${QUIET}script/randconfig
clean: arch_clean
rm -f build/system.elf
diff --git a/script/randconfig b/script/randconfig
new file mode 100755
index 0000000..21b6840
--- /dev/null
+++ b/script/randconfig
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# randconfig occasionally generates invalid configs which lack an application.
+# Try generating a valid config up to ten times.
+
+for i in $(seq 1 10); do
+ kconfig-conf --randconfig Kconfig
+ if grep -F -q CONFIG_app= .config; then
+ exit 0
+ fi
+done
+
+exit 1