Repository navigation
meta-aspeed: Compress raw arm64 kernels in the FIT - #316
Open
louis-nexthop wants to merge 1 commit into
Open
louis-nexthop wants to merge 1 commit into
louis-nexthop wants to merge 1 commit into
Conversation
kernel_fitimage.bbclass always puts the kernel in the FIT uncompressed. That suits the AST2400-AST2600 zImage, which decompresses itself, but AST2700 machines boot a raw arm64 Image of about 23 MiB. Compress a raw Image with FIT_KERNEL_COMP_ALG (default "none"; "lzma" from ast2700.inc; "gzip" also accepted), as oe-core's kernel-fitimage does, and let U-Boot decompress it. Self-decompressing kernels are unchanged. Signed-off-by: Louis Maliyam <louis@nexthop.ai>
louis-nexthop
force-pushed
the
fit-compress-arm64-kernel
branch
from
November 14, 2026 02:16
71932e9 to
08a963c
Compare
Contributor
|
Did you look at zstd compression? Usually we prefer that over lzma because it is significantly faster at decompression. |
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.
Description
kernel_fitimage.bbclassalways puts the kernel in the FIT uncompressed. That suits the AST2400-AST2600 zImage, which decompresses itself, but AST2700 machines boot a raw arm64 Image of about 23 MiB.A raw Image is now compressed with
FIT_KERNEL_COMP_ALG(defaultnone;lzmafromast2700.inc;gzipalso accepted), as oe-core's kernel-fitimage does, and U-Boot decompresses it. Self-decompressing kernels are unchanged.Motivation
ast2700.incalready setsFIT_KERNEL_COMP_ALG ?= "lzma", but the class never reads it, so AST2700 FITs carry the kernel uncompressed. With this change the FIT shrinks by 15.6 MiB on AST2700. Boot time is about the same: lzma decompression takes 1.6 s on the A35, about what reading the saved 15.6 MiB from SPI costs.Test Plan
The same tree built for the AST2720 variant of Nexthop's BMC without and with this change (only
kernel_fitimage.bbclassdiffers):os-fit)FIT headers read from the two flash images:
U-Boot booting a compressed kernel on the board: