Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up inconsistencies in kernel configs #2923

Merged
merged 2 commits into from
Nov 14, 2023
Merged

Conversation

sairon
Copy link
Member

@sairon sairon commented Nov 13, 2023

Clean up all kernel configs and fragments from non-existing kernel options, invalid choice values and choices that trigger warnings during kernel package configuration.

Here's an example of warnings triggered for Yellow:

.config:8531:warning: override: MODULE_COMPRESS_NONE changes choice state
.config:8536:warning: override: ZSWAP_COMPRESSOR_DEFAULT_LZ4 changes choice state
.config:8537:warning: override: ZSWAP_ZPOOL_DEFAULT_ZSMALLOC changes choice state
.config:8543:warning: override: CPU_FREQ_DEFAULT_GOV_ONDEMAND changes choice state
.config:8717:warning: override: reassigning to symbol CGROUP_HUGETLB
.config:8767:warning: symbol value 'm' invalid for XFRM
.config:8852:warning: symbol value 'm' invalid for MEDIA_CONTROLLER_DVB
.config:8972:warning: symbol value 'm' invalid for SND_HDA_I915

There were also some options that are set in our or default configs but end up patched by KCONFIG_(DIS|EN)ABLE_OPT in package makefiles, these options are now explicitly set in our fragments too. For example this was toggled for generic_aarch64:

CONFIG_DEFAULT_SECURITY_APPARMOR n -> y
CONFIG_DEFAULT_SECURITY_DAC y -> n
CONFIG_GCC_PLUGINS y -> n

The only goal of this commit is to make sure no warnings appear anymore and the resulting kernel configs remain unchanged. This will allow us to create tools for sanity checks of our kernel config overrides. There is one single change in ova config resulting from previously invalid m option for a bool value:

-# CONFIG_9P_FS_POSIX_ACL is not set
+CONFIG_9P_FS_POSIX_ACL=y

Clean up all kernel configs and fragments from non-existing kernel
options, invalid choice values and choices that trigger warnings
during kernel package configuration.

Here's an example of warnings triggered for Yellow:

.config:8531:warning: override: MODULE_COMPRESS_NONE changes choice state
.config:8536:warning: override: ZSWAP_COMPRESSOR_DEFAULT_LZ4 changes choice state
.config:8537:warning: override: ZSWAP_ZPOOL_DEFAULT_ZSMALLOC changes choice state
.config:8543:warning: override: CPU_FREQ_DEFAULT_GOV_ONDEMAND changes choice state
.config:8717:warning: override: reassigning to symbol CGROUP_HUGETLB
.config:8767:warning: symbol value 'm' invalid for XFRM
.config:8852:warning: symbol value 'm' invalid for MEDIA_CONTROLLER_DVB
.config:8972:warning: symbol value 'm' invalid for SND_HDA_I915

There were also some options that are set in our or default configs
but end up patched by `KCONFIG_(DIS|EN)ABLE_OPT` in package makefiles,
these options are now explicitly set in our fragments too. For example
this was toggled for `generic_aarch64`:

CONFIG_DEFAULT_SECURITY_APPARMOR n -> y
CONFIG_DEFAULT_SECURITY_DAC y -> n
CONFIG_GCC_PLUGINS y -> n

The only goal of this commit is to make sure no warnings appear
anymore and the resulting kernel configs remain unchanged. This will
allow us to create tools for sanity checks of our kernel config
overrides. There is one single change in `ova` config resulting from
previously invalid `m` option for a bool value:

-# CONFIG_9P_FS_POSIX_ACL is not set
+CONFIG_9P_FS_POSIX_ACL=y
For tinker and amlogic-based targets we're using checked-in kernel
configs generated by kconfig for some old kernel revisions. Check in
current config before we clean it up and reduce to a smaller stub later.
@sairon sairon added board/raspberrypi Raspberry Pi Boards board/ova Open Virtual Appliance (Virtual Machine) board/odroid Hardkernel's ODROID Boards intel-nuc Intel NUC (merged to generic-x86-64) board/tinker ASUS' Tinker Boards linux Linux kernel related issue board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) board/khadas Khadas VIM Boards board/yellow Home Assistant Yellow board/generic-aarch64 Generic aarch64 machine labels Nov 13, 2023
@sairon sairon requested a review from agners November 13, 2023 14:10
@sairon sairon merged commit 5b534e3 into dev Nov 14, 2023
1 check passed
@sairon sairon deleted the kernel-config-cleanup branch November 14, 2023 09:20
sairon added a commit that referenced this pull request Nov 14, 2023
Reduce fully-expanded configs versioned in our repository to defconfigs
containing only the necessary options. Just like #2923, this change does
not alter the resulting kernel .config in any way for the affectedt
platforms (Tinker, Odroid C2/C4/N2).
sairon added a commit that referenced this pull request Nov 14, 2023
Reduce fully-expanded configs versioned in our repository to defconfigs
containing only the necessary options. Just like #2923, this change does
not alter the resulting kernel .config in any way for the affected
platforms (Tinker, Odroid C2/C4/N2).
sairon added a commit that referenced this pull request Nov 14, 2023
Reduce fully-expanded configs versioned in our repository to defconfigs
containing only the necessary options. Just like #2923, this change does
not alter the resulting kernel .config in any way for the affected
platforms (Tinker, Odroid C2/C4/N2).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board/generic-aarch64 Generic aarch64 machine board/generic-x86-64 Generic x86-64 Boards (like Intel NUC) board/khadas Khadas VIM Boards board/odroid Hardkernel's ODROID Boards board/ova Open Virtual Appliance (Virtual Machine) board/raspberrypi Raspberry Pi Boards board/tinker ASUS' Tinker Boards board/yellow Home Assistant Yellow cla-signed intel-nuc Intel NUC (merged to generic-x86-64) linux Linux kernel related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants