openwrt/target/linux
Mikhail Zhilkin d413163832 mediatek: Routerich AX3000: add OpenWrt U-Boot layout
This commit adds OpenWrt U-Boot layout support for Routerich AX3000. The
aims:
1. Get open-source U-Boot;
2. Get maximum available free space in OpenWrt.

Install
-------
1. Copy OpenWrt ubootmod-bl31-uboot.fip, ubootmod-preloader.bin, to the
   /tmp folder of the router using scp.

2. Make mtd partitions backups:
   http://192.168.1.1/cgi-bin/luci/admin/system/flash -> Save mtdblock
   contents

3. Install kmod-mtd-rw:
```
opkg update && opkg install kmod-mtd-rw
```

4. Write FIP and preloader:
```
insmod mtd-rw i_want_a_brick=1
mtd unlock BL2
mtd erase BL2
mtd write /tmp/ubootmod-preloader.bin BL2
mtd unlock FIP
mtd erase FIP
mtd write /tmp/ubootmod-bl31-uboot.fip FIP
```

5. Copy OpenWrt ubootmod-initramfs-recovery.itb to the tftp server root
   with IP 192.168.1.254.

6. Reboot router:
```
reboot
```
U-Boot will automatically download from the tftp server and boot OpenWrt
initramfs system.

7. Copy OpenWrt ubootmod-squashfs-sysupgrade.itb to the /tmp dir of the
   router using scp.

8. Run sysupgrade:
```
sysupgrade -n /tmp/squashfs-sysupgrade.itb
```

Recovery
--------
1. Place OpenWrt initramfs-recovery.itb image (with original name) on the
   tftp server (IP: 192.168.1.254).
2. Press "reset" button and power on the router. After ~10 sec release the
   button.
3. Use OpenWrt initramfs system for recovery.

BL2 and FIP recovery
--------------------
Use mtk_uartboot and UART connection if BL2 or FIP in UBI is destroyed:
Link: https://github.com/981213/mtk_uartboot

Return to stock:
----------------
1. Copy partition backups (BL2.bin and FIP.bin) to the /tmp dir of the
   router using scp.

2. Install kmod-mtd-rw:
```
opkg update && opkg install kmod-mtd-rw
```

3. Restore stock U-Boot and reboot:
```
insmod mtd-rw i_want_a_brick=1
mtd unlock BL2
mtd erase BL2
mtd write /tmp/BL2.bin BL2
mtd unlock FIP
mtd erase FIP
mtd write /tmp/FIP.bin FIP
reboot
```

4. Open U-Boot web recovery, upload stock firmware image and start
   upgrade.
Link: http://192.168.1.1

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16791
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-24 23:41:02 +01:00
..
airoha airoha: an7581: sync patch with upstream version and tag them 2024-11-18 15:01:07 +01:00
apm821xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
archs38 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
armsr armsr: don't limit kmods to armsr armv8 subtarget 2024-10-29 00:07:55 +01:00
at91 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
ath79 ath79: add support for TP-Link CPE710-v2 2024-11-23 18:43:20 +01:00
bcm27xx kernel: bump 6.6 to 6.6.63 2024-11-23 14:06:17 +01:00
bcm47xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
bcm53xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
bcm4908 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
bmips kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
d1 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
gemini kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
generic net: phy: broadcom: update dependency condition 2024-11-18 23:01:22 +01:00
imx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
ipq40xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
ipq806x ipq806x: tr4400v2: fix dtc warnings by deleting stock partitions 2024-11-19 13:44:27 +01:00
ixp4xx kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
kirkwood kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
lantiq kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
layerscape kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
loongarch64 kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
malta kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
mediatek mediatek: Routerich AX3000: add OpenWrt U-Boot layout 2024-11-24 23:41:02 +01:00
mpc85xx mpc85xx: p2020: add missing symbols 2024-11-19 19:52:45 +01:00
mvebu mvebu: devm for mutex_init 2024-11-23 17:19:56 +01:00
mxs mxs: run kernel_oldconfig 2024-11-23 16:47:53 +01:00
octeon kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
omap kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
pistachio kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
qoriq kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
qualcommax kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
ramips ramips: dna_valokuitu-plus-ex400: clean-up image creation 2024-11-24 23:36:44 +01:00
realtek realtek: align kernel config with upstream 2024-11-16 18:02:18 +01:00
rockchip kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
sifiveu kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
siflower kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
starfive kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
stm32 stm32: Remove unnecessary kernel options 2024-11-24 22:51:14 +01:00
sunxi kernel: bump 6.6 to 6.6.61 2024-11-16 00:25:14 +01:00
tegra kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
uml uml: fix glibc-static check with GCC14 2024-06-22 22:06:06 +02:00
x86 x86: Deactivate kernel options with extra overhead 2024-11-24 20:03:59 +01:00
zynq kernel: filter out compiler opts from config 2024-11-17 14:55:16 +01:00
Makefile linux: fix missing default packages in profiles.json 2024-11-17 19:29:06 +01:00