Skip to content

Commit c0da650

Browse files
Ayush1325igorpecovnik
authored andcommitted
compilation: armbian-kernel: Do not make built-in drivers modules
The current script can overwrite drivers which are set as built-in in the board-specific config. This is not desirable. Add a check to ensure we do not convert built-in stuff into modules. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
1 parent 54dbbe2 commit c0da650

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/functions/compilation/armbian-kernel.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,14 @@ function armbian_kernel_config__restore_enable_gpio_sysfs() {
367367
#
368368
function kernel_config_set_m() {
369369
declare module="$1"
370-
display_alert "Enabling kernel module" "${module}=m" "debug"
371-
run_host_command_logged ./scripts/config --module "$module"
370+
state=$(./scripts/config --state "$module")
371+
372+
if [ "$state" == "y" ]; then
373+
display_alert "${module} is already enabled as built-in"
374+
else
375+
display_alert "Enabling kernel module" "${module}=m" "debug"
376+
run_host_command_logged ./scripts/config --module "$module"
377+
fi
372378
}
373379

374380
function kernel_config_set_y() {

0 commit comments

Comments
 (0)