From 3a2f074199e0ec88af33a245dee8bce5866d47c5 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Wed, 27 Sep 2023 22:10:17 +0100 Subject: [PATCH] disable 4k flash erase blocks everywhere --- devices/gl-ar750/default.nix | 1 - devices/gl-mt300a/default.nix | 1 - modules/flashimage.nix | 2 ++ 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/devices/gl-ar750/default.nix b/devices/gl-ar750/default.nix index 5f80509..d10337e 100644 --- a/devices/gl-ar750/default.nix +++ b/devices/gl-ar750/default.nix @@ -171,7 +171,6 @@ 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 diff --git a/devices/gl-mt300a/default.nix b/devices/gl-mt300a/default.nix index 9c29af9..5cb71da 100644 --- a/devices/gl-mt300a/default.nix +++ b/devices/gl-mt300a/default.nix @@ -142,7 +142,6 @@ MTD = "y"; MTD_CMDLINE_PARTS = "y"; MTD_BLOCK = "y"; # fix undefined ref to register_mtd_blktrans_devs - MTD_SPI_NOR_USE_4K_SECTORS = "n"; CMDLINE_PARTITION = "y"; EARLY_PRINTK = "y"; diff --git a/modules/flashimage.nix b/modules/flashimage.nix index 085d7b2..2f68e2e 100644 --- a/modules/flashimage.nix +++ b/modules/flashimage.nix @@ -38,6 +38,8 @@ in { kernel = { config = { MTD_SPLIT_UIMAGE_FW = "y"; + # https://stackoverflow.com/questions/26466470/can-the-logical-erase-block-size-of-an-mtd-device-be-increased + MTD_SPI_NOR_USE_4K_SECTORS = "n"; }; };