Validate custom kernel configurations exist in fully generated config - #266
Merged
ginglis13 merged 6 commits intoSep 11, 2025
Merged
Conversation
bcressey
reviewed
Sep 8, 2025
Change ZSTD compression from built-in (=y) to module (=m) for both kernel-6.1 and kernel-6.12. This was being done implicltly by the kernel config merging script in building the full configs for both kernels and bring parity between our config and generated config. Signed-off-by: Gavin Inglis <giinglis@amazon.com>
Remove CONFIG_FCOE_FNIC from the common kernel configuration. This configuration was originally added for bare-metal support in 2022 but Bottlerocket dropped support for bare-metal variants with the last supported variant being metal-k8s-1.28. Signed-off-by: Gavin Inglis <giinglis@amazon.com>
Remove CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE from kernel-6.12 configuration as this option was removed from the Linux kernel source code between versions 6.1 and 6.12. The kernelconfig.io link states this option is deprecated: https://www.kernelconfig.io/config_security_selinux_checkreqprot_value?q=&kernelversion=6.12.44&arch=x86 This config option gets silently ignored during the merge_config.sh process, so removing it prevents confusion. Signed-off-by: Gavin Inglis <giinglis@amazon.com>
Remove architecture-specific configurations from common config files and update kernel spec files to merge architecture-specific configs during the build process. Add architecture-specific kernel configuration files to separate aarch64 and x86_64 specific options from the common configurations. The kernel build now follows this configuration merge order: 1. Base Amazon Linux config (../config-<arch>) 2. Microcode config (x86_64 only) 3. Common Bottlerocket config (config-bottlerocket) 4. Architecture-specific Bottlerocket config (config-bottlerocket-<arch>) Signed-off-by: Gavin Inglis <giinglis@amazon.com>
Add automatic validation to the kernel configuration generation script to ensure that all expected configuration options from both common and architecture-specific config files are present in the generated config-full-bottlerocket-<arch> files. The validation runs after config generation and: * Checks that all configs from config-bottlerocket are present in the full config * Checks that all configs from config-bottlerocket-<arch> are present in the full config * Ignores commented configs to avoid false failures from removed options * Fails the build if any expected configs are missing Signed-off-by: Gavin Inglis <giinglis@amazon.com>
Update README files for both kernel-6.1 and kernel-6.12 to document the new architecture-specific configuration structure. Signed-off-by: Gavin Inglis <giinglis@amazon.com>
ginglis13
force-pushed
the
kernel-configs-arch-specific
branch
from
September 9, 2025 00:02
91d4f55 to
c7356e1
Compare
Contributor
Author
|
^ force push addresses comments regarding
|
arnaldo2792
approved these changes
Sep 10, 2025
sky1122
approved these changes
Sep 10, 2025
dhwaniserai
approved these changes
Sep 10, 2025
bcressey
approved these changes
Sep 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number:
Closes #265
Description of changes:
Previously, architecture-specific kernel configuration options were mixed into the common config-bottlerocket files for both kernel-6.1 and kernel-6.12. This PR separates these configurations into dedicated
architecture-specific files and improves build time checks to ensure that custom kernel configs are always applied.
While making this change, I discovered some minor improvements to our configs that are included in this PR as separate commits:
kernel: change CONFIG_ZSTD_COMPRESS from built-in to module- Changed from built-in (=y) to module (=m); the merged configuration was always writing as=mkernel: remove CONFIG_FCOE_FNIC from common kernel configs- added for metal support, but we've since dropped the module needed for this option.kernel-6.12: remove CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE- deprecated per https://www.kernelconfig.io/config_security_selinux_checkreqprot_value?q=&kernelversion=6.12.44&arch=x86 and not appearing in final config for kernel 6.12Configuration Structure changes
I identified architecture specific options following the steps outlined in this gist: https://gist.github.com/ginglis13/e918b649d1b3bf2e910c771ca0a8798a
Build changes:
New configuration merge order:
Testing done:
make ARCH=x86_64 && make ARCH=aarch64-> success here implies no changes to the full generated config as a result of this PRTerms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.