set erase block size to something that works for jffs2

This commit is contained in:
Daniel Barlow
2023-04-10 20:39:26 +01:00
parent 4638092d3d
commit 0a2881914b
3 changed files with 6 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ in {
# for wireless devices, etc
address = mkOption { type = types.str; };
size = mkOption { type = types.str; };
eraseBlockSize = mkOption { type = types.str; };
};
loadAddress = mkOption { default = null; };
entryPoint = mkOption { };

View File

@@ -33,7 +33,7 @@ in
}}
cp $pkgClosure/registration nix-path-registration
grafts=$(sed < $pkgClosure/store-paths 's/^\(.*\)$/--graft \1:\1/g')
mkfs.jffs2 ${endian} --pad --root $TMPDIR/empty --output $out $grafts
mkfs.jffs2 ${endian} -e ${config.hardware.flash.eraseBlockSize} --pad --root $TMPDIR/empty --output $out $grafts
'';
jffs2boot =
let o = config.outputs; in