[OpenWrt-Devel,RFC] ath79-tiny: enable 4k sectors
diff mbox series

Message ID 20191126130111.31134-1-fercerpav@gmail.com
State Accepted
Headers show
Series
  • [OpenWrt-Devel,RFC] ath79-tiny: enable 4k sectors
Related show

Commit Message

Paul Fertser Nov. 26, 2019, 1:01 p.m. UTC
This enables using 4kiB sectors as erase blocks for 4MiB NOR flash ICs
that support it.

Writeable jffs2 overlay used to store settings requires a partition with
at least 5 erase blocks, so using small sectors is essential for devices
with 4MiB flash.

Sysupgrading a device running firmware without this feature will likely
not allow to preserve configs automatically but since ath79 is
considered to be in a "technology preview" state it shouldn't be a
problem.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
---
 target/linux/ath79/tiny/config-default | 1 +
 1 file changed, 1 insertion(+)

Comments

Adrian Schmutzler Nov. 26, 2019, 3:44 p.m. UTC | #1
Hi,

> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] On
> Behalf Of Paul Fertser
> Sent: Dienstag, 26. November 2019 14:01
> To: openwrt-devel@lists.openwrt.org
> Cc: Paul Fertser <fercerpav@gmail.com>
> Subject: [OpenWrt-Devel] [RFC][PATCH] ath79-tiny: enable 4k sectors
> 
> This enables using 4kiB sectors as erase blocks for 4MiB NOR flash ICs
> that support it.
> 
> Writeable jffs2 overlay used to store settings requires a partition with
> at least 5 erase blocks, so using small sectors is essential for devices
> with 4MiB flash.
> 
> Sysupgrading a device running firmware without this feature will likely
> not allow to preserve configs automatically but since ath79 is
> considered to be in a "technology preview" state it shouldn't be a
> problem.

Because of this reason, we should ask ourselves whether we want to backport this to 19.07, so all (non-RC) released ath79-tiny images have 4k sectors, while we still can.
Otherwise, with 20.xx having different sectors than 19.xx, users will be more confused than with us now changing behavior during rc-period.

Best

Adrian
Stijn Segers Nov. 26, 2019, 8:22 p.m. UTC | #2
Op dinsdag 26 november 2019 om 16:44 schreef Adrian Schmutzler 
<mail@adrianschmutzler.de>:
> Hi,
> 
>>  -----Original Message-----
>>  From: openwrt-devel 
>> [mailto:openwrt-devel-bounces@lists.openwrt.org] On
>>  Behalf Of Paul Fertser
>>  Sent: Dienstag, 26. November 2019 14:01
>>  To: openwrt-devel@lists.openwrt.org
>>  Cc: Paul Fertser <fercerpav@gmail.com>
>>  Subject: [OpenWrt-Devel] [RFC][PATCH] ath79-tiny: enable 4k sectors
>> 
>>  This enables using 4kiB sectors as erase blocks for 4MiB NOR flash 
>> ICs
>>  that support it.
>> 
>>  Writeable jffs2 overlay used to store settings requires a partition 
>> with
>>  at least 5 erase blocks, so using small sectors is essential for 
>> devices
>>  with 4MiB flash.
>> 
>>  Sysupgrading a device running firmware without this feature will 
>> likely
>>  not allow to preserve configs automatically but since ath79 is
>>  considered to be in a "technology preview" state it shouldn't be a
>>  problem.
> 
> Because of this reason, we should ask ourselves whether we want to 
> backport this to 19.07, so all (non-RC) released ath79-tiny images 
> have 4k sectors, while we still can.
> Otherwise, with 20.xx having different sectors than 19.xx, users will 
> be more confused than with us now changing behavior during rc-period.

As a non-voting small time contributor I'd say: yes to pushing it to 
19.07 now. People are already being encouraged not to keep settings 
migrating from pre-19.07 ar71xx to 19.07 ath79, so two birds with one 
stone.

Cheers

Stijn

> 
> Best
> 
> Adrian
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Patch
diff mbox series

diff --git a/target/linux/ath79/tiny/config-default b/target/linux/ath79/tiny/config-default
index 90cd5534c7..9b845abbff 100644
--- a/target/linux/ath79/tiny/config-default
+++ b/target/linux/ath79/tiny/config-default
@@ -1,4 +1,5 @@ 
 CONFIG_LEDS_RESET=y
+CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
 CONFIG_NET_DSA=y
 CONFIG_NET_DSA_MV88E6060=y
 CONFIG_NET_DSA_TAG_TRAILER=y