Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ Only DUTs used for LibreMesh / FCEFyN workflows:
| `targets/openwrt_one.yaml` | OpenWrt One |
| `targets/bananapi_bpi-r4.yaml` | Banana Pi R4 |
| `targets/linksys_e8450.yaml` | Belkin RT3200 / Linksys E8450 |
| `targets/librerouter_librerouter-v1.yaml` | LibreRouter v1 |
| `targets/librerouter_librerouter-v1.yaml` | LibreRouter v1 (single-image, default) |
| `targets/librerouter_librerouter-v1-dual-tftp.yaml` | LibreRouter v1 (kernel + rootfs.uimage, for lime-packages CI) |
| `targets/qemu_x86-64_libremesh.yaml` | QEMU x86-64 LibreMesh |

## Running tests
Expand Down
7 changes: 6 additions & 1 deletion docs/target-quirks.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ Even though `pi-lime-packages` embeds `bootargs` in the FIT configuration node,

## LibreRouter v1 (ath79)

**Target file:** `targets/librerouter_v1.yaml`
**Target files (two variants):**

| File | When to use | Required env vars |
|---|---|---|
| `targets/librerouter_librerouter-v1.yaml` | Default. Boots a self-contained `*-initramfs-kernel.bin` (LibreMesh releases, source builds, mesh tests, `openwrt-tests` healthcheck via `labnet.yaml`). | `LG_IMAGE` |
| `targets/librerouter_librerouter-v1-dual-tftp.yaml` | `pi-lime-packages` / `lime-packages` CI when ImageBuilder emits `kernel.bin` + `rootfs.uimage` separately. | `LG_IMAGE` + `LG_IMAGE_INITRD` |

### Dual-TFTP Boot

Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ dependencies = [
labgrid = { git = "https://github.com/aparcar/labgrid.git", branch = "aparcar/staging" }

[dependency-groups]
dev = ["isort>=6.0.1", "ruff>=0.12.0"]
# Ruff is capped below 0.16: newer releases enable additional default lint
# rules (RUF059, PIE810, ...) that flag pre-existing patterns in the
# codebase, breaking CI on every new PR without any related code change.
# Bump this cap deliberately when we opt into the new rules.
dev = ["isort>=6.0.1", "ruff>=0.12.0,<0.16"]

[tool.isort]
profile = "black"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
# LibreRouter v1 (ath79) - See docs/target-quirks.md for details
# LibreRouter v1 (ath79) - dual-TFTP variant (kernel + rootfs ramdisk).
#
# Use this variant only when the boot artifact is split into two files:
# - kernel.bin (uImage with lzma kernel + appended DTB)
# - rootfs.uimage (newc CPIO with LibreMesh rootfs, uImage-wrapped)
#
# Required env vars: LG_IMAGE (kernel) and LG_IMAGE_INITRD (rootfs).
#
# This is used by pi-lime-packages / lime-packages CI because ImageBuilder
# cannot rebuild the kernel with CONFIG_INITRAMFS_SOURCE, so the ath79
# artifact is delivered as two separate blobs.
#
# For self-contained *-initramfs-kernel.bin (LibreMesh releases, source
# builds, mesh tests) use the single-image default:
# targets/librerouter_librerouter-v1.yaml
#
# See docs/target-quirks.md for details on the ath79 dual-image rationale.
targets:
main:
features:
Expand Down
53 changes: 53 additions & 0 deletions targets/librerouter_librerouter-v1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# LibreRouter v1 (ath79) - single-image variant
#
# This target boots from a self-contained `*-initramfs-kernel.bin` image
# (kernel with LibreMesh CPIO embedded via CONFIG_INITRAMFS_SOURCE). It is
# the default for:
# - Mesh tests (mesh_boot_node.py sets only LG_IMAGE per node).
# - Local single-node runs with a LibreMesh release image.
# - openwrt-tests healthcheck (labnet.yaml maps here).
#
# For pi-lime-packages CI (ImageBuilder cannot build initramfs kernels;
# ships kernel.bin + rootfs.uimage separately) use the dual-TFTP variant:
# targets/librerouter_librerouter-v1-dual-tftp.yaml
targets:
main:
features:
- wan_port
- wifi
resources:
RemotePlace:
name: !template "$LG_PLACE"
drivers:
- PDUDaemonDriver: {}
- TFTPProviderDriver: {}
- SerialDriver:
txdelay: 0.01
- UBootDriver:
login_timeout: 30
# A single newline aborts autoboot within the 2s bootdelay window;
# tftpstrategy._spam_uboot_interrupt blasts these for ~12s to be
# robust against serial-console jitter on the ath79 U-Boot 1.1.x.
interrupt: "\n"
autoboot: "Hit any key to stop autoboot"
prompt: "ath>"
init_commands:
- "tftp 0x82000000"
boot_command: "bootm 0x82000000"
- ShellDriver:
prompt: "(?:\\x1b\\][^\\x07]*\\x07)?(?:\\x1b\\[[\\d;]*m)*root@LiMe-[0-9A-Fa-f]{6}:[^ ]*[#$] "
login_prompt: Please press Enter to activate this console.
await_login_timeout: 15
login_timeout: 180
post_login_settle_time: 5
username: root
- UBootTFTPStrategy: {}
- SSHDriver:
connection_timeout: 120.0
explicit_scp_mode: True

images:
root: !template $LG_IMAGE

imports:
- ../strategies/tftpstrategy.py
Loading