kernel-config: Fix forced disabling of debug options

Disable CONFIG_EXPERT as well since DEBUG_KERNEL=y is a dependency for EXPERT=y, meaning DEBUG_KERNEL would be re-enabled automatically if EXPERT is enabled
This commit is contained in:
ColorfulRhino 2024-03-27 15:46:45 +01:00
parent 4d744e8638
commit f8e7d33d69

View File

@ -8,10 +8,11 @@
# https://github.com/armbian/build/
# Forced .config options for all Armbian kernels.
# Please note: Manually changing options doesn't check the validity of the .config file. This is done at next make time. Check for warnings in build log.
# This is an internal/core extension.
function armbian_kernel_config__disable_module_compression() {
kernel_config_modifying_hashes+=("CONFIG_MODULE_COMPRESS_NONE=y" "CONFIG_MODULE_SIG=n" "CONFIG_LOCALVERSION_AUTO=n" "DEBUG_INFO=n")
function armbian_kernel_config__disable_various_options() {
kernel_config_modifying_hashes+=("CONFIG_MODULE_COMPRESS_NONE=y" "CONFIG_MODULE_SIG=n" "CONFIG_LOCALVERSION_AUTO=n" "DEBUG_KERNEL=n")
if [[ -f .config ]]; then
display_alert "Disabling module compression and signing / debug / auto version" "armbian-kernel" "debug"
# DONE: Disable: signing, and compression of modules, for speed.
@ -28,9 +29,10 @@ function armbian_kernel_config__disable_module_compression() {
kernel_config_set_string CONFIG_LOCALVERSION '""' # Must be empty; make is later invoked with LOCALVERSION and it adds up
# DONE: Disable: debug option
kernel_config_set_n DEBUG_KERNEL # Armbian doesn't know how to package a debug kernel.
kernel_config_set_n DEBUG_INFO # ditto
kernel_config_set_n GDB_SCRIPTS # ditto
kernel_config_set_n DEBUG_KERNEL # Armbian doesn't know how to package a debug kernel.
kernel_config_set_n EXPERT # This needs to be disabled as well since DEBUG_KERNEL=y is a dependency for EXPERT=y, meaning DEBUG_KERNEL would be re-enabled automatically if EXPERT is enabled
kernel_config_set_y DEBUG_INFO_NONE # Do not build the kernel with debugging information, which will result in a faster and smaller build. (NOTE: Not needed (?) when DEBUG_KERNEL=n and EXPERT=n since all DEBUG_INFO options are missing anyway in that case)
kernel_config_set_n GDB_SCRIPTS
# @TODO: Enable the options for the extrawifi/drivers; so we don't need to worry about them when updating configs
fi