compilation: armbian-kernel: Do not make built-in drivers modules
Some checks are pending
Forked Helper / 📢 Run repository dispatch on fork (push) Waiting to run
Announce PR merge to Discord / announcepush (push) Waiting to run
Scorecards Security Scan / Scorecards analysis (push) Waiting to run

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>
This commit is contained in:
Ayush Singh 2025-06-07 23:06:51 +05:30 committed by Igor
parent 54dbbe2785
commit c0da65087a

View File

@ -367,8 +367,14 @@ function armbian_kernel_config__restore_enable_gpio_sysfs() {
#
function kernel_config_set_m() {
declare module="$1"
display_alert "Enabling kernel module" "${module}=m" "debug"
run_host_command_logged ./scripts/config --module "$module"
state=$(./scripts/config --state "$module")
if [ "$state" == "y" ]; then
display_alert "${module} is already enabled as built-in"
else
display_alert "Enabling kernel module" "${module}=m" "debug"
run_host_command_logged ./scripts/config --module "$module"
fi
}
function kernel_config_set_y() {