[openwrt/openwrt] mediatek: use CONFIG_TARGET_ROOTFS_PARTSIZE

LEDE Commits lede-commits at lists.infradead.org
Sun Jan 23 12:22:20 PST 2022


dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/a40b4d335a19022745ef6d714f88e6b26615ad50

commit a40b4d335a19022745ef6d714f88e6b26615ad50
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat Jan 22 00:20:53 2022 +0000

    mediatek: use CONFIG_TARGET_ROOTFS_PARTSIZE
    
    Enable 'rootfs-part' feature to make the size of the partition of the
    production image configurable instead of hard-coding it.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/Makefile        | 2 +-
 target/linux/mediatek/image/mt7622.mk | 4 ++--
 target/linux/mediatek/image/mt7623.mk | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/mediatek/Makefile b/target/linux/mediatek/Makefile
index fb2951cc9b..466fe6dee2 100644
--- a/target/linux/mediatek/Makefile
+++ b/target/linux/mediatek/Makefile
@@ -6,7 +6,7 @@ ARCH:=arm
 BOARD:=mediatek
 BOARDNAME:=MediaTek Ralink ARM
 SUBTARGETS:=mt7622 mt7623 mt7629
-FEATURES:=dt-overlay emmc fpu gpio nand pci pcie separate_ramdisk squashfs usb
+FEATURES:=dt-overlay emmc fpu gpio nand pci pcie rootfs-part separate_ramdisk squashfs usb
 
 KERNEL_PATCHVER:=5.10
 
diff --git a/target/linux/mediatek/image/mt7622.mk b/target/linux/mediatek/image/mt7622.mk
index 3b0afa98df..3517748510 100644
--- a/target/linux/mediatek/image/mt7622.mk
+++ b/target/linux/mediatek/image/mt7622.mk
@@ -48,10 +48,10 @@ define Build/mt7622-gpt
 				-N recovery	-r	-p 32M at 6M \
 		$(if $(findstring sdmmc,$1), \
 				-N install	-r	-p 7M at 38M \
-			-t 0x2e -N production		-p 211M at 45M \
+			-t 0x2e -N production		-p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M at 45M \
 		) \
 		$(if $(findstring emmc,$1), \
-			-t 0x2e -N production		-p 980M at 40M \
+			-t 0x2e -N production		-p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M at 40M \
 		)
 	cat $@.tmp >> $@
 	rm $@.tmp
diff --git a/target/linux/mediatek/image/mt7623.mk b/target/linux/mediatek/image/mt7623.mk
index 9a938662c3..1d7745f1d6 100644
--- a/target/linux/mediatek/image/mt7623.mk
+++ b/target/linux/mediatek/image/mt7623.mk
@@ -58,10 +58,10 @@ define Build/mt7623-mbr
 			-t 0x41	-N uboot	-p 3584k at 320k \
 			-t 0xea	-N recovery	-p 40M at 4M \
 		$(if $(findstring sdmmc,$1), \
-			-t 0x2e -N production	-p 208M at 48M \
+			-t 0x2e -N production	-p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M at 48M \
 		) \
 		$(if $(findstring emmc,$1), \
-			-t 0x2e -N production	-p 976M at 48M \
+			-t 0x2e -N production	-p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M at 48M \
 		)
 
 	echo -en \



More information about the lede-commits mailing list