This repository was archived by the owner on May 30, 2023. It is now read-only.
Conversation
Disable ARCH_QCOM, ARCH_ZYNQMP, ARCH_MEDIATEK which enable other options that are only relevant on the respective boards, none of which are supported targets for Flatcar. Since the arm64 kernel does not support compression, these settings have a significant impact on kernel size. The boot partition size is only 128MB and needs to fit 2 kernels, so we have set ourselves a target of 60MB per kernel. This commit brings down the arm64 kernel size by 3MB. At the same time, enable the settings that are actually relevant: ARCH_BCM, because that one is relevant for Raspberry Pi 4 that runs Linux.
The wireguard module has some crypto dependencies, we benefit from making them all modules so that they don't increase the arm64 kernel size.
Contributor
Author
Contributor
|
Makes sense for now, thanks! In the future it would be nice to support more boards, though - I'm looking forward to Linux 6.1 to enable generic EFI compression. |
Contributor
|
A changelog entry would be good |
dongsupark
approved these changes
Oct 21, 2022
Contributor
dongsupark
left a comment
There was a problem hiding this comment.
If I understand correctly, we need to merge this PR before #2235, not to exceed the 60MB limit of arm64 Kernel, right?
Please add a proper changelog as Kai said, and feel free to merge.
Contributor
Author
We're at 59 MB with that PR (and some recent ones) merged, so yeah, it's necessary to merge this one. Added changelog entries and merging. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
arm64 kernel shrink
Disable some unneeded kconfig options and turn wireguard into a module. This shrinks the arm64 kernel by ~3MB based on my testing.
How to use
Check image changes to see size decrease. Check kola to see that wireguard continues to work without manually loading module.
Testing done
Build tested.
changelog/directory (user-facing change, bug fix, security fix, update)/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.