mediatek: use CONFIG_TARGET_ROOTFS_PARTSIZE
authorDaniel Golle <daniel@makrotopia.org>
Sat, 22 Jan 2022 00:20:53 +0000 (00:20 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 23 Jan 2022 19:48:07 +0000 (19:48 +0000)
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@makrotopia.org>
target/linux/mediatek/Makefile
target/linux/mediatek/image/mt7622.mk
target/linux/mediatek/image/mt7623.mk

index fb2951cc9bbc2cab0069def81faea87211da30c3..466fe6dee24b80757f902e8a8bfbb03623382c85 100644 (file)
@@ -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
 
index 3b0afa98dffc888bec325c57fd891817baaf7599..3517748510ab60f7e656d329f5ba919a53ba02f4 100644 (file)
@@ -48,10 +48,10 @@ define Build/mt7622-gpt
                                -N recovery     -r      -p 32M@6M \
                $(if $(findstring sdmmc,$1), \
                                -N install      -r      -p 7M@38M \
-                       -t 0x2e -N production           -p 211M@45M \
+                       -t 0x2e -N production           -p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M@45M \
                ) \
                $(if $(findstring emmc,$1), \
-                       -t 0x2e -N production           -p 980M@40M \
+                       -t 0x2e -N production           -p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M@40M \
                )
        cat $@.tmp >> $@
        rm $@.tmp
index 9a938662c32748c97a6fe52662d56fc2156a0c9e..1d7745f1d699eb61ff01faa47865126c4a75a14c 100644 (file)
@@ -58,10 +58,10 @@ define Build/mt7623-mbr
                        -t 0x41 -N uboot        -p 3584k@320k \
                        -t 0xea -N recovery     -p 40M@4M \
                $(if $(findstring sdmmc,$1), \
-                       -t 0x2e -N production   -p 208M@48M \
+                       -t 0x2e -N production   -p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M@48M \
                ) \
                $(if $(findstring emmc,$1), \
-                       -t 0x2e -N production   -p 976M@48M \
+                       -t 0x2e -N production   -p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M@48M \
                )
 
        echo -en \