From 67768004eedf86608e14951f38892168700bdb13 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Wed, 26 Apr 2023 22:19:01 +0100 Subject: [PATCH] erase full flash, it seems to help with jffs2 --- modules/flashimage.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/flashimage.nix b/modules/flashimage.nix index b5f0fe1..4e7675b 100644 --- a/modules/flashimage.nix +++ b/modules/flashimage.nix @@ -53,7 +53,7 @@ in { setenv serverip ${tftp.serverip} setenv ipaddr ${tftp.ipaddr} tftp 0x$(printf %x ${tftp.loadAddress}) result/firmware.bin - erase 0x$(printf %x ${flash.address}) +\''${filesize}) + erase 0x$(printf %x ${flash.address}) +${flash.size} cp.b 0x$(printf %x ${tftp.loadAddress}) 0x$(printf %x ${flash.address}) \''${filesize} echo command line was ${builtins.toJSON (concatStringsSep " " config.boot.commandLine)} EOF