1
1
openwrt/target/linux
Keno Fischer c7e8cffcb2
x86: add onie-installer image type
The current documentation for using OpenWRT on Mellanox Spectrum
switches (https://openwrt.org/toh/mellanox/spectrum) suggests
reflashing the entire harddrive from the recovery USB. This is not
the most friendly way to install a new OS on these switches. From
factory, they come with ONIE (Open Network Install Environment),
which is a linux-based preboot environment for fetching an OS
image from the network and installing it on disk. The installer
is a self-executing bash script that executes inside the ONIE
environment. The installer is expected to preserve the ONIE partition
for use as recovery environement. To be a better citizen on
these platforms, it would be preferrable to provide OpenWRT as
an ONIE-compatible installer.

This PR adds an ONIE_INSTALLER_IMAGES build option that produces
an ONIE compatible .bin. The generated .bin follows the ONIE demo
installer pattern [1]: it creates a new GPT partition
labelled OPENWRT-ROOT on the ONIE install device, formats ext4, extracts
the OpenWrt rootfs and kernel into it, installs GRUB into the existing
UEFI ESP under bootloader-id "OpenWrt", and adds a NVRAM boot entry via
efibootmgr.  ONIE-BOOT is preserved so ONIE rescue remains available.

Tested with the config at [2] on a Mellanox Spectrum SN3800 to produce
a booting OpenWRT install.

[1] https://github.com/opencomputeproject/onie/demo/installer/grub-arch/install.sh
[2] https://gist.github.com/Keno/abc8c5b72645e73fadd1ff0d9616b23d

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Keno Fischer <keno@juliahub.com>
Link: https://github.com/openwrt/openwrt/pull/23062
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-05-23 17:23:53 +02:00
..
airoha airoha: backport GDM2 loopback fixup for Ethernet driver 2026-05-22 12:43:00 +02:00
apm821xx apm821xx: remove fixed-partitions nvmem hack 2026-05-14 23:02:47 +02:00
armsr kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
at91 kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
ath79 ath79: tiny: set default BLOCKSIZE to 4 KB 2026-05-16 10:24:08 +02:00
bcm27xx kernel: bump 6.12 to 6.12.88 2026-05-16 21:26:01 +02:00
bcm47xx kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
bcm53xx bcm53xx: add ramdisk to FEATURES 2026-04-29 09:56:37 +02:00
bcm4908 kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
bmips treewide: use _scoped for loop 2026-04-16 21:17:43 +02:00
d1 d1: drop support for 6.12 2026-04-21 16:13:37 +02:00
econet econet: add EN751627 subtarget and Zyxel EX3301-T0 board 2026-05-14 21:12:46 +02:00
gemini gemini/kernel: drop v6.12 and default to v6.18 2026-04-17 18:01:06 +02:00
generic generic: 6.18: drop downstream RTL8261N driver 2026-05-21 17:04:55 +01:00
imx imx: cortexa9: ventana, fix profiles names in profiles.json 2026-04-23 01:13:36 +02:00
ipq40xx ipq40xx: add support for Cisco Meraki Z3C 2026-05-13 11:33:17 +02:00
ipq806x ipq806x: fix caldata loading for mr42/mr52 2026-05-18 21:14:22 +02:00
ixp4xx ixp4xx/kernel: drop v6.12 and default to v6.18 2026-04-16 08:35:38 +02:00
kirkwood kirkwood: switch to 6.18 kernel 2026-04-27 09:39:21 +02:00
lantiq lantiq: vr200: switch to nvmem eeprom 2026-05-09 14:08:12 +02:00
layerscape generic: 6.12: backport PCS standalone feature 2026-05-13 00:19:29 +02:00
loongarch64 kernel: sync target configs after JUMP_LABEL changes 2026-05-11 10:33:46 +02:00
malta malta: drop 6.12 support 2026-05-07 18:15:54 +02:00
mediatek generic: 6.18: drop downstream RTL8261N driver 2026-05-21 17:04:55 +01:00
microchipsw kernel: sync target configs after JUMP_LABEL changes 2026-05-11 10:33:46 +02:00
mpc85xx mpc85xx: unify wrapper address of simple image devices 2026-05-05 14:09:38 +02:00
mvebu mvebu: disable WRT1900AC v1 builds by default 2026-05-12 21:01:06 +02:00
mxs mxs: drop support for 6.12 2026-04-16 14:55:36 +02:00
octeon octeon: enable 6.18 testing kernel 2026-04-26 10:03:37 +02:00
omap kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
pistachio pistachio: drop support for 6.12 2026-04-18 12:02:48 +02:00
qoriq kernel: sync target configs after JUMP_LABEL changes 2026-05-11 10:33:46 +02:00
qualcommax qualcommax: ipq50xx: add support for Xiaomi Redmi AX5400 2026-05-18 21:39:52 +02:00
qualcommbe kernel: bump 6.12 to 6.12.88 2026-05-16 21:26:01 +02:00
ramips ramips: pax1800-lite: fix label-mac-device 2026-05-20 10:27:38 +02:00
realtek realtek: pcs: derive SerDes link count from DT at probe time 2026-05-23 11:02:15 +02:00
rockchip rockchip: add support for FriendlyELEC NanoPi M5 2026-05-14 17:52:56 +02:00
sifiveu sifiveu: drop support for 6.12 2026-04-19 13:21:21 +02:00
siflower kernel: sync target configs after JUMP_LABEL changes 2026-05-11 10:33:46 +02:00
starfive starfive: drop support for 6.12 2026-05-17 15:27:17 +02:00
stm32 kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
sunxi sunxi: add T113-S3 support 2026-05-09 11:19:22 +02:00
tegra kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
uml kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
x86 x86: add onie-installer image type 2026-05-23 17:23:53 +02:00
zynq kernel: 6.12: move CONFIG_CRYPTO_LIB_SHA1 to generic 2026-04-06 01:38:41 +02:00
Makefile linux: fix missing default packages in profiles.json 2024-11-17 19:29:06 +01:00