Skip to content

Commit 9379aa2

Browse files
committed
nix: Save RW and RO sections separately
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent f51e7e5 commit 9379aa2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

flake.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@
116116
installPhase = ''
117117
mkdir $out
118118
cp src/platform/ec/build/zephyr/${build}/output/* $out/
119+
cp src/platform/ec/build/zephyr/${build}/packer/zephyr_ro.bin $out/
120+
cp src/platform/ec/build/zephyr/${build}/packer/zephyr_rw.bin $out/
121+
# Extract RO and RW sections from ec.bin with FRID/FWID intact
122+
dd if=$out/ec.bin of=$out/ec_ro.bin bs=256K count=1
123+
dd if=$out/ec.bin of=$out/ec_rw.bin bs=1 skip=$((0x40000)) count=$((0x3F000))
119124
'';
120125

121126
dontFixup = true;

0 commit comments

Comments
 (0)