restore boot.tftp.freeSpaceBytes

This commit is contained in:
Daniel Barlow 2024-01-26 22:45:59 +00:00
parent 1730cf07b1
commit dd8ec18881
2 changed files with 2 additions and 0 deletions

View file

@ -31,6 +31,7 @@ in rec {
boot.tftp = { boot.tftp = {
ipaddr = "10.0.0.8"; # my address ipaddr = "10.0.0.8"; # my address
serverip = "10.0.0.1"; # build machine or other tftp server serverip = "10.0.0.1"; # build machine or other tftp server
freeSpaceBytes = 1024 * 1024 * 4;
}; };
hostname = "recovery"; hostname = "recovery";

View file

@ -72,6 +72,7 @@ in {
hex() { printf "0x%x" $1; } hex() { printf "0x%x" $1; }
rootfsStart=${toString cfg.loadAddress} rootfsStart=${toString cfg.loadAddress}
rootfsSize=$(binsize64k ${o.rootfs} ) rootfsSize=$(binsize64k ${o.rootfs} )
rootfsSize=$(($rootfsSize + ${toString cfg.freeSpaceBytes} ))
dtbStart=$(($rootfsStart + $rootfsSize)) dtbStart=$(($rootfsStart + $rootfsSize))
dtbSize=$(binsize ${o.dtb} ) dtbSize=$(binsize ${o.dtb} )
imageStart=$(($dtbStart + $dtbSize)) imageStart=$(($dtbStart + $dtbSize))