liminix

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

commit dbf1ecdcb7d55a187c76962e048356d3267b03a0
parent aecc44aaa0e86ebc573527fa1bc09ab4dd384f89
Author: Daniel Barlow <dan@telent.net>
Date:   Sat, 23 Dec 2023 15:34:01 +0000

swap zimage and dtb in ram

kernel uncompression code creates a stack directly
after the compressed payload, which was trashing the dtb

Diffstat:
Mmodules/outputs/tftpboot.nix | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/modules/outputs/tftpboot.nix b/modules/outputs/tftpboot.nix @@ -72,18 +72,19 @@ in { hex() { printf "0x%x" $1; } rootfsStart=${toString cfg.loadAddress} rootfsSize=$(binsize64k ${o.rootfs} ) - imageStart=$(($rootfsStart + $rootfsSize)) - imageSize=$(binsize ${image}) - dtbStart=$(($imageStart + $imageSize)) + dtbStart=$(($rootfsStart + $rootfsSize)) dtbSize=$(binsize ${o.dtb} ) + imageStart=$(($dtbStart + $dtbSize)) + imageSize=$(binsize ${image}) ln -s ${o.manifest} manifest ln -s ${image} image + ln -s ${o.kernel} vmlinux # handy for gdb ${if cfg.compressRoot then '' lzma -z9cv ${o.rootfs} > rootfs.lz - rootfsLzStart=$(($dtbStart + $dtbSize)) + rootfsLzStart=$(($imageStart + $imageSize)) rootfsLzSize=$(binsize rootfs.lz) '' else "ln -s ${o.rootfs} rootfs"