diff mbox series

ramips: mt76x8: enable small_flash feature

Message ID 20240110160003.3065-1-tmn505@terefe.re
State Accepted
Delegated to: Sander Vanheule
Headers show
Series ramips: mt76x8: enable small_flash feature | expand

Commit Message

Tomasz Maciej Nowak Jan. 10, 2024, 3:59 p.m. UTC
From: Tomasz Maciej Nowak <tmn505@gmail.com>

Some of devices in this target have only 8 MiB space and are closing to
borders of usable space. Particularly, TP-Link RE305 v1 already suffers
from this issue[1], where with current partition layout, on release
images, there's not enough space for overlay. So activate small_flash
feature, which will remove some userspace hardening but will gain almost
1 MiB additional flash memory space. Here is small size comparison of
similar device (RE365 v1) with default config + LuCI:

		kernel		rootfs		sysupgrade
current:	2305728		3635044		5964584
small_flash:	1713571		3320132		5047080

1. https://github.com/openwrt/openwrt/issues/14215

Suggested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
---
 target/linux/ramips/mt76x8/target.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sander Vanheule Jan. 10, 2024, 7:39 p.m. UTC | #1
Hi Tomasz,

On Wed, 2024-01-10 at 16:59 +0100, Tomasz Maciej Nowak wrote:
> From: Tomasz Maciej Nowak <tmn505@gmail.com>
> 
> Some of devices in this target have only 8 MiB space and are closing to
> borders of usable space. Particularly, TP-Link RE305 v1 already suffers
> from this issue[1], where with current partition layout, on release
> images, there's not enough space for overlay. So activate small_flash
> feature, which will remove some userspace hardening but will gain almost
> 1 MiB additional flash memory space. Here is small size comparison of
> similar device (RE365 v1) with default config + LuCI:
> 
> 		kernel		rootfs		sysupgrade
> current:	2305728		3635044		5964584
> small_flash:	1713571		3320132		5047080
> 
> 1. https://github.com/openwrt/openwrt/issues/14215
> 
> Suggested-by: Sander Vanheule <sander@svanheule.net>
> Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
> ---
>  target/linux/ramips/mt76x8/target.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/linux/ramips/mt76x8/target.mk b/target/linux/ramips/mt76x8/target.mk
> index 862736cb2f38..cfc2655cac18 100644
> --- a/target/linux/ramips/mt76x8/target.mk
> +++ b/target/linux/ramips/mt76x8/target.mk
> @@ -4,7 +4,7 @@
>  
>  SUBTARGET:=mt76x8
>  BOARDNAME:=MT76x8 based boards
> -FEATURES+=usb ramdisk
> +FEATURES+=usb ramdisk small_flash

Thanks for the patch. More than half the devices in this subtarget have a flash size < 16
MB (the current recommended minimum), so I agree with the approach here.

If somebody has strong opinions on this, and would for example rather see something like
ath79/tiny, feel free to speak up (and to send a patch ;-)

Otherwise I'll probably merge this patch early next week. Or sooner if some stakeholders
send their Acked-by.


Best,
Sander
Sander Vanheule Jan. 22, 2024, 11:35 a.m. UTC | #2
On Wed, 2024-01-10 at 16:59 +0100, Tomasz Maciej Nowak wrote:
> From: Tomasz Maciej Nowak <tmn505@gmail.com>
> 
> Some of devices in this target have only 8 MiB space and are closing to
> borders of usable space. Particularly, TP-Link RE305 v1 already suffers
> from this issue[1], where with current partition layout, on release
> images, there's not enough space for overlay. So activate small_flash
> feature, which will remove some userspace hardening but will gain almost
> 1 MiB additional flash memory space. Here is small size comparison of
> similar device (RE365 v1) with default config + LuCI:
> 
> 		kernel		rootfs		sysupgrade
> current:	2305728		3635044		5964584
> small_flash:	1713571		3320132		5047080
> 
> 1. https://github.com/openwrt/openwrt/issues/14215
> 
> Suggested-by: Sander Vanheule <sander@svanheule.net>
> Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
> ---

Took a bit longer than promised, but now applied to main. Thanks!


Best,
Sander
diff mbox series

Patch

diff --git a/target/linux/ramips/mt76x8/target.mk b/target/linux/ramips/mt76x8/target.mk
index 862736cb2f38..cfc2655cac18 100644
--- a/target/linux/ramips/mt76x8/target.mk
+++ b/target/linux/ramips/mt76x8/target.mk
@@ -4,7 +4,7 @@ 
 
 SUBTARGET:=mt76x8
 BOARDNAME:=MT76x8 based boards
-FEATURES+=usb ramdisk
+FEATURES+=usb ramdisk small_flash
 CPU_TYPE:=24kc
 
 DEFAULT_PACKAGES += kmod-mt7603 wpad-basic-mbedtls swconfig