liminix

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

commit c7b2733beac4f0e6d197f00e6115cc0af474af69
parent dfbc72dd518c79257078edba70b28ee4ff5172eb
Author: Daniel Barlow <dan@telent.net>
Date:   Fri, 22 Dec 2023 20:09:44 +0000

tftpbootlz: put command line in dtb

this makes boot.scr substantially shorter, in anticipation of using it
for first boot of the omnia and not wanting to embed an essay in
a setenv value

Diffstat:
Mmodules/outputs/tftpbootlz.nix | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/outputs/tftpbootlz.nix b/modules/outputs/tftpbootlz.nix @@ -29,6 +29,9 @@ let # can't calculate the actual address here until we know how # big the dtb will be fdtput -t lx $out/dtb /reserved-memory/phram-rootfs reg 0xdead 0xcafe + cmd="liminix ${cmdline} mtdparts=phram0:999999999999(rootfs) phram.phram=phram0,999999999999,999999999999,${toString config.hardware.flash.eraseBlockSize} root=/dev/mtdblock0"; + fdtput -t s $out/dtb /chosen bootargs "$cmd" + dtbStart=$(($kernelStart + $kernelSize)) dtbSize=$(binsize $out/dtb) rootfsOrigSize=$(binsize64k ${o.rootfs}) @@ -38,9 +41,11 @@ let rootfsLzStart=$(($dtbStart + $dtbSize)) rootfsOrigStart=$(($rootfsLzStart + $rootfsLzSize)) fdtput -t lx $out/dtb /reserved-memory/phram-rootfs reg $(printf "%x" $rootfsOrigStart) $(printf "%x" $rootfsOrigSize) - # dtc -I dtb -O dts -o /dev/stdout $out/dtb ; exit 1 - cmd="mtdparts=phram0:''${rootfsOrigSize}(rootfs) phram.phram=phram0,''${rootfsOrigStart},''${rootfsOrigSize},${toString config.hardware.flash.eraseBlockSize} root=/dev/mtdblock0"; + cmd="liminix ${cmdline} mtdparts=phram0:''${rootfsOrigSize}(rootfs) phram.phram=phram0,''${rootfsOrigStart},''${rootfsOrigSize},${toString config.hardware.flash.eraseBlockSize} root=/dev/mtdblock0"; + fdtput -t s $out/dtb /chosen bootargs "$cmd" + + # dtc -I dtb -O dts -o /dev/stdout $out/dtb | grep -A10 reserved-memory; exit 1 (cd $out; ln -s ${o.zimage} zImage @@ -50,7 +55,6 @@ let cat > $out/boot.scr << EOF setenv serverip ${cfg.serverip} setenv ipaddr ${cfg.ipaddr} - setenv bootargs "liminix ${cmdline} $cmd" tftpboot $(hex $kernelStart) result/zImage; tftpboot $(hex $dtbStart) result/dtb ; tftpboot $(hex $rootfsLzStart) result/rootfs.lz lzmadec $(hex $rootfsLzStart) $(hex $rootfsOrigStart) bootz $(hex $kernelStart) - $(hex $dtbStart)