Re: [PATCH] Add option for allmodconfig

From: John Garry
Date: Mon Jan 06 2020 - 04:18:53 EST

On 10/12/2019 12:09, John Garry wrote:

Hi Masahiro,

Could you please consider this patch?


Recently there has been some work in reporting and fixing bugs in booting
an allmodconfig kernel - here are a few examples:

If we want to boot an allmodconfig kernel we may still want to force some
loadable modules built-in, like UART drivers. Or just still turn off some

So add an option to add add fragments to an allmodconfig kernel.

Signed-off-by: John Garry <john.garry@xxxxxxxxxx>

diff --git a/scripts/kconfig/ b/scripts/kconfig/
index 63c8565206a4..01697fb6dfbe 100755
--- a/scripts/kconfig/
+++ b/scripts/kconfig/
@@ -23,6 +23,7 @@ clean_up() {
usage() {
echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
echo " -h display this help text"
+ echo " -a use allmodconfig instead of alldefconfig"
echo " -m only merge the fragments, do not execute the make command"
echo " -n use allnoconfig instead of alldefconfig"
echo " -r list redundant entries when merging fragments"
@@ -41,6 +42,11 @@ CONFIG_PREFIX=${CONFIG_-CONFIG_}
while true; do
case $1 in
+ "-a")
+ ALLTARGET=allmodconfig
+ shift
+ continue
+ ;;
@@ -171,6 +177,7 @@ fi
# Use the merged file as the starting point for:
# alldefconfig: Fills in any missing symbols with Kconfig default
+# allmodconfig: Fills in any missing symbols with =m when loadable
# allnoconfig: Fills in any missing symbols with # CONFIG_* is not set