[openwrt/openwrt] mediatek: filogic: provide custom GPT table for Arcadyan Mozart

LEDE Commits lede-commits at lists.infradead.org
Wed May 28 02:34:39 PDT 2025


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/11c936e1414bda39f09373d44d46bb2100a701fe

commit 11c936e1414bda39f09373d44d46bb2100a701fe
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Tue May 27 18:57:06 2025 +0200

    mediatek: filogic: provide custom GPT table for Arcadyan Mozart
    
    New revision Arcadyan Mozart apply a new partition table and moved the
    factory partition to a new location. This conflicts with the standard
    partition layout and also make the nvmem cells to not correctly identify
    the MAC address anymore.
    
    Generate and Provide a new GPT partition table that account for the new
    calibration partition.
    The previous revision of the Arcadyan Mozart device is considered
    pre-production devices and should not be intended for real support.
    
    Link: https://github.com/openwrt/openwrt/pull/18874
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/mediatek/image/filogic.mk | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index ba6bf7e279..8b18e252a1 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -52,6 +52,24 @@ define Build/mt798x-gpt
 	rm $@.tmp
 endef
 
+# Variation of the normal partition table to account
+# for factory and mfgdata partition
+#
+# Keep fip partition at standard offset to keep consistency
+# with uboot commands
+define Build/mt7988-mozart-gpt
+	cp $@ $@.tmp 2>/dev/null || true
+	ptgen -g -o $@.tmp -a 1 -l 1024 \
+			-t 0x83	-N ubootenv	-r	-p 512k at 4M \
+			-t 0xef	-N fip		  -r	-p 4M at 6656k \
+			-t 0x83	-N factory	-r	-p 8M at 25M \
+			-t 0x2e	-N mfgdata	-r	-p 8M at 33M \
+			-t 0xef -N recovery	-r	-p 32M at 41M \
+			-t 0x2e -N production		-p $(CONFIG_TARGET_ROOTFS_PARTSIZE)M at 73M
+	cat $@.tmp >> $@
+	rm $@.tmp
+endef
+
 define Build/append-openwrt-one-eeprom
 	dd if=$(STAGING_DIR_IMAGE)/mt7981_eeprom_mt7976_dbdc.bin >> $@
 endef
@@ -244,7 +262,7 @@ define Device/arcadyan_mozart
   IMAGES := sysupgrade.itb
   IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-with-rootfs | pad-rootfs | append-metadata
   ARTIFACTS := emmc-preloader.bin emmc-bl31-uboot.fip emmc-gpt.bin
-  ARTIFACT/emmc-gpt.bin := mt798x-gpt emmc
+  ARTIFACT/emmc-gpt.bin := mt7988-mozart-gpt
   ARTIFACT/emmc-preloader.bin	:= mt7988-bl2 emmc-comb
   ARTIFACT/emmc-bl31-uboot.fip	:= mt7988-bl31-uboot arcadyan_mozart
   SUPPORTED_DEVICES += arcadyan,mozart




More information about the lede-commits mailing list