set erase block size to something that works for jffs2

module-based-network
Daniel Barlow 8 months ago
parent 4638092d3d
commit 0a2881914b

@ -87,6 +87,7 @@
flash = {
address = "0x9F060000";
size ="0xfa0000";
eraseBlockSize = "65536";
};
rootDevice = "1f05";
dts = {
@ -163,12 +164,15 @@
AR8216_PHY = "y"; # eth1 is behind a switch
MTD_SPI_NOR = "y";
MTD_SPI_NOR_USE_4K_SECTORS = "n"; # jffs2 needs min 8k erase block
SPI_ATH79 = "y"; # these are copied from OpenWrt.
SPI_MASTER= "y"; # At least one of them is necessary
SPI_MEM= "y";
SPI_AR934X= "y";
SPI_BITBANG= "y";
SPI_GPIO= "y";
GPIO_ATH79 = "y";
GPIOLIB = "y";
EXPERT="y";

@ -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 { };

@ -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

Loading…
Cancel
Save