feat: LibreRouter v1 dual-TFTP boot support#4
Merged
Merged
Conversation
Extend UBootTFTPStrategy to stage an optional initrd image alongside the root image, setting bootfile_initrd in U-Boot env. Update the LibreRouter v1 target YAML to use two TFTP loads (kernel + rootfs CPIO) with rd_start/rd_size bootargs for external initramfs boot.
Change boot_command from setenv bootargs + bootm to `bootm 0x82000000 0x84000000` which tells U-Boot about the ramdisk natively, bypassing bootargs/cmdline issues with the Atheros U-Boot 1.1.x fork.
Load the uImage ramdisk to 0x84000FC0 so the CPIO data (past the 64-byte header) starts at 0x84001000 (page-aligned). The kernel requires initrd_start to be page-aligned and rejects it with "initrd start must be page aligned" otherwise.
The initramfs boot reaches a shell with hostname (none) because mount_root fails to pivot from ramfs and lime-config uci-defaults never set the hostname. Accept root@(none) and root@OpenWrt in addition to root@LiMe-XXXXXX.
The root cause of hostname (none) is missing /proc in the initramfs CPIO, not the prompt regex. Keep the strict match so CI fails fast when lime-config doesn't run.
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.
Summary
librerouter_v1.yamltarget with dual-TFTP boot (kernel + ramdisk uImage at separate RAM addresses)tftpstrategy.pyto stage an optional initrd image alongside the root image0x84000FC0) so CPIO data lands at0x84001000LiMe-XXXXXXprompt regex (revert temporary relaxation)Context
The ath79 ImageBuilder cannot produce an initramfs kernel. This dual-TFTP approach ships
kernel.bin+rootfs.uimageas separate TFTP artifacts. U-Boot'sbootm <kernel> <ramdisk>passes initrd boundaries natively, bypassingCONFIG_CMDLINE_OVERRIDE.Test plan
test-firmware librerouter_1)