Skip to content

feat: LibreRouter v1 dual-TFTP boot support#4

Merged
francoriba merged 6 commits into
mainfrom
staging
Jun 18, 2026
Merged

feat: LibreRouter v1 dual-TFTP boot support#4
francoriba merged 6 commits into
mainfrom
staging

Conversation

@francoriba

Copy link
Copy Markdown
Collaborator

Summary

  • Add librerouter_v1.yaml target with dual-TFTP boot (kernel + ramdisk uImage at separate RAM addresses)
  • Extend tftpstrategy.py to stage an optional initrd image alongside the root image
  • Page-align ramdisk load address (0x84000FC0) so CPIO data lands at 0x84001000
  • Use strict LiMe-XXXXXX prompt regex (revert temporary relaxation)

Context

The ath79 ImageBuilder cannot produce an initramfs kernel. This dual-TFTP approach ships kernel.bin + rootfs.uimage as separate TFTP artifacts. U-Boot's bootm <kernel> <ramdisk> passes initrd boundaries natively, bypassing CONFIG_CMDLINE_OVERRIDE.

Test plan

  • LibreRouter CI test passes (test-firmware librerouter_1)
  • Existing Belkin/OpenWrt One/BananaPi tests unaffected

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.
@francoriba
francoriba merged commit 8026f7d into main Jun 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant