commit f77da6f14ce8d58cd1c0a0ab78857247c76d154a
parent 61eaaa82eba6d4ea9ee17c8103e4f0d59ea336a4
Author: Daniel Barlow <dan@telent.net>
Date: Sun, 5 Jan 2025 17:22:30 +0000
remove remaining refs to kexecboot
Diffstat:
7 files changed, 18 insertions(+), 81 deletions(-)
diff --git a/devices/gl-ar750/default.nix b/devices/gl-ar750/default.nix
@@ -41,10 +41,11 @@
:ref:`system-outputs-mtdimage` can be flashed using the
vendor web UI or the U-Boot emergency "unbrick" routine.
- For flashing from an existing Liminix system (we believe that) it
- is necessary to first boot into a :ref:`system-outputs-kexecboot`
- system, otherwise you'll be overwriting flash partitions while
- they're in use - and that might not end well.
+ Flashing over an existing Liminix system is not possible while
+ that system is running, otherwise you'll be overwriting flash
+ partitions while they're in use - and that might not end well.
+ Configure the system with :ref:`levitate` if you need to
+ make it upgradable.
Vendor web page: https://www.gl-inet.com/products/gl-ar750/
diff --git a/devices/gl-mt300a/default.nix b/devices/gl-mt300a/default.nix
@@ -32,10 +32,11 @@
binary created by :ref:`system-outputs-mtdimage` can be flashed
using the vendor web UI or the U-Boot emergency "unbrick" routine.
- For flashing from an existing Liminix system (we think) it
- is necessary to first boot into a :ref:`system-outputs-kexecboot`
- system, otherwise you'll be overwriting flash partitions while
- they're in use - and that might not end well.
+ Flashing over an existing Liminix system is not possible while
+ that system is running, otherwise you'll be overwriting flash
+ partitions while they're in use - and that might not end well.
+ Configure the system with :ref:`levitate` if you need to
+ make it upgradable.
Vendor web page: https://www.gl-inet.com/products/gl-mt300a/
diff --git a/devices/gl-mt300n-v2/default.nix b/devices/gl-mt300n-v2/default.nix
@@ -25,10 +25,11 @@
binary created by :ref:`system-outputs-mtdimage` can be flashed
using the vendor web UI or the U-Boot emergency "unbrick" routine.
- For flashing from an existing Liminix system (we think) it
- is necessary to first boot into a :ref:`system-outputs-kexecboot`
- system, otherwise you'll be overwriting flash partitions while
- they're in use - and that might not end well.
+ Flashing over an existing Liminix system is not possible while
+ that system is running, otherwise you'll be overwriting flash
+ partitions while they're in use - and that might not end well.
+ Configure the system with :ref:`levitate` if you need to
+ make it upgradable.
Vendor web page: https://www.gl-inet.com/products/gl-mt300n-v2/
diff --git a/modules/all-modules.nix b/modules/all-modules.nix
@@ -22,7 +22,6 @@
./outputs/ext4fs.nix
./outputs/initramfs.nix
./outputs/jffs2.nix
- ./outputs/kexecboot.nix
./outputs/mtdimage.nix
./outputs/tftpboot.nix
./outputs/ubifs.nix
diff --git a/modules/outputs/kexecboot.nix b/modules/outputs/kexecboot.nix
@@ -1,65 +0,0 @@
-{
- config
-, pkgs
-, lib
-, ...
-}:
-let
- inherit (lib) mkOption types concatStringsSep;
-in {
- imports = [ ../ramdisk.nix ];
- options.system.outputs = {
- kexecboot = mkOption {
- type = types.package;
- description = ''
- kexecboot
- *********
-
- Directory containing files needed for kexec booting.
- Can be copied onto the target device using ssh or similar
- '';
- };
- boot-sh = mkOption {
- type = types.package;
- description = ''
- Shell script to run on the target device that invokes
- kexec with appropriate options
- '';
- };
- };
- config = {
- boot.ramdisk.enable = true;
- system.outputs = {
- kexecboot =
- let o = config.system.outputs; in
- pkgs.runCommand "kexecboot" {} ''
- mkdir $out
- cd $out
- ln -s ${o.rootfs} rootfs
- ln -s ${o.kernel} kernel
- ln -s ${o.manifest} manifest
- ln -s ${o.boot-sh} boot.sh
- ln -s ${pkgs.kexec-tools-static}/bin/kexec ./kexec
- ln -s ${o.dtb} dtb
- '';
-
- boot-sh =
- let
- inherit (config.system.outputs) rootfs;
- cmdline = concatStringsSep " " config.boot.commandLine;
- in
- pkgs.buildPackages.runCommand "boot.sh.sh" {
- } ''
- rootfsStart=${toString (100 * 1024 * 1024)}
- rootfsBytes=$(stat -L -c %s ${rootfs})
- append_cmd="mtdparts=phram0:''${rootfsBytes}(rootfs) phram.phram=phram0,''${rootfsStart},''${rootfsBytes} memmap=''${rootfsBytes}\$''${rootfsStart}";
- cat > $out <<EOF
- #!/bin/sh
- test -d \$1
- cd \$1
- ./kexec -f -d --map-file rootfs@$rootfsStart --dtb dtb --command-line '${cmdline} $append_cmd' kernel
- EOF
- '';
- };
- };
-}
diff --git a/modules/outputs/mtdimage.nix b/modules/outputs/mtdimage.nix
@@ -34,7 +34,8 @@ in {
This creates an image called :file:`firmware.bin` suitable for
squashfs or jffs2 systems. It can be flashed from U-Boot (if
you have a serial console connection), or on some devices from
- the vendor firmware, or from a Liminix kexecboot system.
+ the vendor firmware, or from Liminix when using
+ :ref:`levitate`
If you are flashing from U-Boot, the file
:file:`flash.scr` is a sequence of commands
diff --git a/modules/ramdisk.nix b/modules/ramdisk.nix
@@ -7,8 +7,7 @@ in {
ramdisk = {
enable = mkEnableOption ''
reserving part of memory as
- an MTD-based RAM disk. Needed for TFTP booting or for
- kexec-based revertable upgrade
+ an MTD-based RAM disk. Needed for TFTP booting
'';
};
};