Skip to content

Commit 6391c9c

Browse files
rnavmpe
authored andcommitted
Add an option to run 'make mod2yesconfig'
It is sometimes useful to build all modules into vmlinux. Add an option 'MOD2YES=1' that runs 'make mod2yesconfig' after all kernel config steps.
1 parent 8392cad commit 6391c9c

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ The log will be in eg. `output/ppc64le@ubuntu@21.10/ppc64le_defconfig/sparse.log
105105

106106
To build modules pass `MODULES=1`
107107

108+
To convert all modules to builtin, pass `MOD2YES=1`.
109+
108110
To build with clang pass `CLANG=1`, only works using the Ubuntu `21.10` images.
109111

110112
For a quiet build pass `QUIET=1`, for verbose pass `VERBOSE=1`.

build/scripts/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ if [[ "$task" == "kernel" ]]; then
105105
cmd+="-e MERGE_CONFIG=$MERGE_CONFIG "
106106
fi
107107

108+
if [[ -n "$MOD2YES" ]]; then
109+
cmd+="-e MOD2YES=1 "
110+
fi
111+
108112
if [[ -n "$CLANG" ]]; then
109113
cmd+="-e CLANG=1 "
110114
fi

build/scripts/container-build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ if [[ "$1" == "kernel" ]]; then
7878

7979
rc=$?
8080

81+
if [[ -n "$MOD2YES" ]]; then
82+
(set -x; make $verbose $quiet "$cc" mod2yesconfig)
83+
fi
84+
8185
if [[ $rc -eq 0 ]]; then
8286
if [[ -n "$SPARSE" ]]; then
8387
rm -f /output/sparse.log

0 commit comments

Comments
 (0)