liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit dd8ec18881789c09dd971979570786bfcc34f988
parent 1730cf07b17738fa82fc9477a9a49d71f83025e1
Author: Daniel Barlow <dan@telent.net>
Date:   Fri, 26 Jan 2024 22:45:59 +0000

restore boot.tftp.freeSpaceBytes

Diffstat:
Mexamples/recovery.nix | 1+
Mmodules/outputs/tftpboot.nix | 1+
2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/examples/recovery.nix b/examples/recovery.nix @@ -31,6 +31,7 @@ in rec { boot.tftp = { ipaddr = "10.0.0.8"; # my address serverip = "10.0.0.1"; # build machine or other tftp server + freeSpaceBytes = 1024 * 1024 * 4; }; hostname = "recovery"; diff --git a/modules/outputs/tftpboot.nix b/modules/outputs/tftpboot.nix @@ -72,6 +72,7 @@ in { hex() { printf "0x%x" $1; } rootfsStart=${toString cfg.loadAddress} rootfsSize=$(binsize64k ${o.rootfs} ) + rootfsSize=$(($rootfsSize + ${toString cfg.freeSpaceBytes} )) dtbStart=$(($rootfsStart + $rootfsSize)) dtbSize=$(binsize ${o.dtb} ) imageStart=$(($dtbStart + $dtbSize))