ramips: improve compatibility for Youku YK-L2 and YK-L1 series
authorShiji Yang <yangshiji66@qq.com>
Sat, 5 Nov 2022 11:52:08 +0000 (19:52 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 12 Nov 2022 20:55:11 +0000 (21:55 +0100)
Add UIMAGE_NAME and UIMAGE_MAGIC to allow users to directly install
initramfs-kernel.bin from the stock firmware Web UI. At the same time,
this change makes it possible to boot OpenWrt with the official u-boot.

Notice:
Since the stock firmware is based on OpenWrt and the configuration
will be retained by default during the upgrade process, so we must use
initramfs-kernel.bin to do a initial installation. After the system
restarts, install sysupgrade.bin and do not retain any configuration.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
(cherry picked from commit eba0a8deb65de70b0d913f9ec8910640a79d0191)

target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi
target/linux/ramips/dts/mt7621_youku_yk-l2.dts
target/linux/ramips/image/mt7620.mk
target/linux/ramips/image/mt7621.mk

index d15d2c0f4b66ec25d32cbd923f01d98b4be88473..210b0d7d1957505b40ba46c98344f4e9df2d0956 100644 (file)
@@ -86,8 +86,9 @@
                        };
 
                        firmware: partition@50000 {
-                               compatible = "denx,uimage";
+                               compatible = "openwrt,uimage", "denx,uimage";
                                label = "firmware";
+                               openwrt,ih-magic = <0x12291000>;
                                /* reg property is set based on flash size in DTS files */
                        };
                };
index 19ba7c08de34e30fe60d533fb1397b2eca35c069..96e0b73bdd938cad137c1ec5d67761d4e3049531 100644 (file)
@@ -95,8 +95,9 @@
                        };
 
                        partition@50000 {
-                               compatible = "denx,uimage";
+                               compatible = "openwrt,uimage", "denx,uimage";
                                label = "firmware";
+                               openwrt,ih-magic = <0x12291000>;
                                reg = <0x50000 0xfb0000>;
                        };
                };
index d2a2c90460b26e8e87194f2e92c0172e4836b8ab..6089750407424512f7ffa55196496b8a932266da 100644 (file)
@@ -1256,6 +1256,8 @@ define Device/youku_yk-l1
   DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 \
        kmod-usb-ledtrig-usbport
   SUPPORTED_DEVICES += youku-yk1 youku,yk1
+  UIMAGE_MAGIC := 0x12291000
+  UIMAGE_NAME := 400000000000000000000000
 endef
 TARGET_DEVICES += youku_yk-l1
 
@@ -1266,6 +1268,8 @@ define Device/youku_yk-l1c
   DEVICE_MODEL := YK-L1c
   DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 \
        kmod-usb-ledtrig-usbport
+  UIMAGE_MAGIC := 0x12291000
+  UIMAGE_NAME := 400000000000000000000000
 endef
 TARGET_DEVICES += youku_yk-l1c
 
index adf8382002dd70bf3e863209ca0bc03e14fe1d7a..4057c4ea11b29233be7673a77fc2c8100209d8b3 100644 (file)
@@ -2079,6 +2079,8 @@ define Device/youku_yk-l2
   DEVICE_MODEL := YK-L2
   DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 \
        kmod-usb-ledtrig-usbport
+  UIMAGE_MAGIC := 0x12291000
+  UIMAGE_NAME := 400000000000000000003000
 endef
 TARGET_DEVICES += youku_yk-l2