Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| toh:xiaomi:ax3200 [2024/10/01 09:02] – [Installation] lessload | toh:xiaomi:ax3200 [2024/12/07 15:00] (current) – fix missing partition name from the mtd command 981213 | ||
|---|---|---|---|
| Line 157: | Line 157: | ||
| -> [[docs: | -> [[docs: | ||
| + | === Upgrading from 23.05 and earlier to upcoming 24.10 or snapshot === | ||
| + | |||
| + | From the [[https:// | ||
| + | |||
| + | < | ||
| + | fixed-size kernel partition for vendor u-boot and UBI for rootfs. | ||
| + | However, that fixed partition becomes too small eventually, and | ||
| + | expanding it requires complicated procedure. | ||
| + | |||
| + | This commit changed the flash layout and added a second u-boot | ||
| + | where the kernel supposed to be. | ||
| + | Now the vendor u-boot chainloads our mainline u-boot, and our | ||
| + | u-boot reads kernel+rootfs from UBI, verifies it, and boot | ||
| + | into OpenWrt.</ | ||
| + | |||
| + | There are **two** possible ways to convert from the old fw: | ||
| + | |||
| + | 1. Flash the factory image using mtd (recommended) | ||
| + | |||
| + | Download factory image on the router and rename it to factory.bin. Below, you can find an example command that uses a snapshot image: | ||
| + | < | ||
| + | cd /tmp | ||
| + | wget -O factory.bin https:// | ||
| + | </ | ||
| + | |||
| + | Then flash new layout: | ||
| + | < | ||
| + | mount -o remount,ro / | ||
| + | mount -o remount,ro /overlay | ||
| + | cd /tmp | ||
| + | dd if=factory.bin bs=1M count=4 | mtd write - kernel | ||
| + | dd if=factory.bin bs=1M skip=4 | mtd -r write - ubi | ||
| + | </ | ||
| + | |||
| + | 2. Or, flash the 2nd u-boot via mtd and upload the firmware to the 2nd u-boot using tftp | ||
| + | |||
| + | * prepare a tftp server at 192.168.1.254 to serve the sysupgrade image: | ||
| + | |||
| + | < | ||
| + | openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-squashfs-sysupgrade.itb | ||
| + | </ | ||
| + | |||
| + | * upload the ubi-loader.itb to OpenWrt /tmp, and flash it to the old kernel partition: | ||
| + | |||
| + | < | ||
| + | mtd -r write openwrt-mediatek-mt7622-xiaomi_redmi-router-ax6s-ubi-loader.itb kernel | ||
| + | </ | ||
| + | |||
| + | * The router should reboot and flash the sysupgrade image via TFTP. | ||
| + | |||
| + | Procedure for flashing from vendor firmware shouldn' | ||
| <WRAP BOX> | <WRAP BOX> | ||