ramips: use OKLI loader for TP-Link RE200 v1 and RE210 v1
authorShiji Yang <yangshiji66@qq.com>
Tue, 24 Sep 2024 10:50:01 +0000 (18:50 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Tue, 8 Oct 2024 20:20:23 +0000 (22:20 +0200)
Using OKLI image to fix the booting stuck issue.

Tested with u-boot extracted from TP-Link stock images
"RE200(EU)_V1_171206.zip" and "RE210(US_CA)_V1_171205.zip".

Fixes: https://github.com/openwrt/openwrt/issues/16296
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16473
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit b62e6f5beb2a574c67ba5159f0049e54cdf25d69)

target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi
target/linux/ramips/image/mt7620.mk

index e6d9b8576d98d7042dd0e7e361713e5273228c84..adb383f3c52ac8397a4e926dfc7d0fe452f68dc3 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/mtd/partitions/uimage.h>
 
 / {
        aliases {
                        };
 
                        partition@20000 {
-                               compatible = "tplink,firmware";
+                               compatible = "openwrt,uimage", "denx,uimage";
                                label = "firmware";
                                reg = <0x20000 0x7c0000>;
+                               openwrt,offset = <0x1000>;
+                               openwrt,ih-magic = <IH_MAGIC_OKLI>;
                        };
 
                        partition@7e0000 {
index 61b79c962d8dc2546b63a7ceb25a73aa59057f9f..f7ef1c4832bcbd01b84b7c5ab76f70169ea73c67 100644 (file)
@@ -1245,7 +1245,7 @@ endef
 TARGET_DEVICES += tplink_archer-mr200
 
 define Device/tplink_re200-v1
-  $(Device/tplink-v1)
+  $(Device/tplink-v1-okli)
   SOC := mt7620a
   DEVICE_MODEL := RE200
   DEVICE_VARIANT := v1
@@ -1257,7 +1257,7 @@ endef
 TARGET_DEVICES += tplink_re200-v1
 
 define Device/tplink_re210-v1
-  $(Device/tplink-v1)
+  $(Device/tplink-v1-okli)
   SOC := mt7620a
   DEVICE_MODEL := RE210
   DEVICE_VARIANT := v1