feat(dts): emit 64-bit initrd device-tree cells for large initramfs#25
Merged
Conversation
The device tree packed linux,initrd-start/end into single 32-bit cells, truncating the physical address for a total initramfs above 4 GiB. Compute 64-bit hi/lo halves in build-firmware-linux.sh and switch every device-tree template to <hi lo> cell pairs; below 4 GiB the high cell resolves to 0, so existing images are byte-identical. Add a mem128g-novec profile for guests whose initramfs boot-unpack peak (blob + rootfs) exceeds 64 GiB. Assisted-by: Claude Opus 4.8
poemonsense
approved these changes
Jul 10, 2026
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.
The device tree packed
linux,initrd-start/linux,initrd-endinto single32-bit cells, which truncates the physical address once the total initramfs
exceeds 4 GiB.
dtconly warns on out-of-range cells (exit 0), so thetruncation is silent — a >4 GiB initramfs boots with a short/corrupt rootfs.
Changes
build-firmware-linux.shcomputes 64-bit hi/lo halves of the initramfsbegin/end addresses and substitutes
INITRAMFS_{BEGIN,END}_{HI,LO}into thetemplates. The
_HI/_LOtokens are substituted before the bareINITRAMFS_BEGIN/INITRAMFS_ENDto avoid a prefix collision.linux,initrd-start/endto<hi lo>cell pairs. Below 4 GiB the high cell resolves to
0x0, so existing imagesare byte-identical; above 4 GiB the address is preserved instead of truncated.
xiangshan-fpga-noAIA-mem128g-novecprofile (128 GiB memory node) forguests whose initramfs boot-unpack peak exceeds 64 GiB.