ramips: rename mtd partition of ipTIME NAND devices
authorSungbo Eo <mans0n@gorani.run>
Sun, 4 Feb 2024 12:46:14 +0000 (21:46 +0900)
committerSungbo Eo <mans0n@gorani.run>
Sun, 10 Mar 2024 07:32:14 +0000 (16:32 +0900)
Contrary to common ipTIME NOR devices, the "Config" partition of T5004
and AX2004M contain normal U-Boot environment variables. Renaming the
partition into "u-boot-env" serves for better description, and it also
conforms to common naming practice in OpenWrt.

This patch might also be extended to A3004T, but its u-boot-env
partition layout has not been confirmed yet.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
package/boot/uboot-envtools/files/ramips
target/linux/ramips/dts/mt7621_iptime_ax2004m.dts
target/linux/ramips/dts/mt7621_iptime_t5004.dts
target/linux/ramips/image/mt7621.mk
target/linux/ramips/mt7621/base-files/etc/board.d/02_network

index 30bf635b6df33bdce1a863c5f2b8e1c6cf7e7725..317121f2beae8371f41537a5e7dc7447f525a857 100644 (file)
@@ -73,6 +73,7 @@ belkin,rt1800|\
 h3c,tx1800-plus|\
 h3c,tx1801-plus|\
 h3c,tx1806|\
+iptime,ax2004m|\
 jcg,q20|\
 linksys,e7350|\
 netgear,eax12|\
@@ -92,6 +93,7 @@ ravpower,rp-wd03)
                ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
        ;;
 beeline,smartbox-flash|\
+iptime,t5004|\
 linksys,ea6350-v4|\
 linksys,ea7300-v1|\
 linksys,ea7300-v2|\
index 7237bf822f46a948e47bca8985b3f731b8225f02..88067a4fa5476c92aadb990552059ae50c89becf 100644 (file)
@@ -74,9 +74,8 @@
                };
 
                partition@80000 {
-                       label = "config";
+                       label = "u-boot-env";
                        reg = <0x80000 0x80000>;
-                       read-only;
                };
 
                partition@100000 {
index bba039a63ccdfc40124ae97e86f9fd3c33bf6e72..f7a5e8ca17bf5fc6dcf96016d038f081b99c3574 100644 (file)
@@ -53,9 +53,8 @@
                };
 
                partition@80000 {
-                       label = "config";
+                       label = "u-boot-env";
                        reg = <0x80000 0xc0000>;
-                       read-only;
                };
 
                partition@140000 {
index 7b7266b73ed1166f5755b8f76b226f38f2930c0b..23e328a090f52769384cd8d5a4135f6add0b2a96 100644 (file)
@@ -1460,7 +1460,7 @@ define Device/iptime_ax2004m
        check-size | iptime-crc32 ax2004m
   DEVICE_VENDOR := ipTIME
   DEVICE_MODEL := AX2004M
-  DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3 -uboot-envtools
+  DEVICE_PACKAGES := kmod-mt7915-firmware kmod-usb3
   DEVICE_COMPAT_VERSION := 2.0
   DEVICE_COMPAT_MESSAGE := NMBM has been newly enabled, and its flash block \
        mapping might be incompatible with existing installation. \
@@ -1474,7 +1474,7 @@ define Device/iptime_t5004
   UIMAGE_NAME := t5004
   DEVICE_VENDOR := ipTIME
   DEVICE_MODEL := T5004
-  DEVICE_PACKAGES := -wpad-basic-mbedtls -uboot-envtools
+  DEVICE_PACKAGES := -wpad-basic-mbedtls
 endef
 TARGET_DEVICES += iptime_t5004
 
index ae29da4adc3f768991067a243ee4f9abe873817d..d0481b78e90134d06b54c93c5182ee725a590c3d 100644 (file)
@@ -260,7 +260,7 @@ ramips_setup_macs()
                label_mac=$wan_mac
                ;;
        iptime,t5004)
-               lan_mac=$(mtd_get_mac_ascii config ethaddr)
+               lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
                wan_mac=$(macaddr_add "$lan_mac" 1)
                ;;
        linksys,e5600|\