modules/zyxel-dual-image: init

This adds a simple boot blessing module, to be used, with the Zyxel NWA50AX.

There's a lot of elephant in the rooms: how do you upgrade kernel, etc.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
Raito Bezarius
2024-02-18 22:35:27 +01:00
parent c14b2f6356
commit 422f3edab1
4 changed files with 107 additions and 0 deletions

View File

@@ -94,6 +94,7 @@
../../modules/arch/mipsel.nix
../../modules/outputs/tftpboot.nix
../../modules/outputs/zyxel-nwa-fit.nix
../../modules/zyxel-dual-image
];
filesystem = dir {
@@ -168,6 +169,7 @@
};
};
};
boot = {
# Critical because NWA50AX will extend your cmdline with the image number booted.
# and some bootloader version.
@@ -182,6 +184,15 @@
};
};
# Dual image management service in userspace.
services.zyxel-dual-image = config.boot.zyxel-dual-image.build {
ensureActiveImage = "primary";
# TODO: use mtd names rather…
primaryMtdPartition = "/dev/mtd3";
secondaryMtdPartition = "/dev/mtd6";
bootConfigurationMtdPartition = "/dev/mtd10";
};
# DEVICE_VENDOR := ZyXEL
# KERNEL_SIZE := 8192k
# DEVICE_PACKAGES := kmod-mt7915-firmware zyxel-bootconfig