mediatek: add support for CMCC A10
authorTianling Shen <cnsztl@immortalwrt.org>
Wed, 26 Feb 2025 13:52:53 +0000 (21:52 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 8 Mar 2025 14:44:56 +0000 (15:44 +0100)
commit96c6608346758ceffebf30d74cab00db58874bb9
tree3b0df7f814079ff3c494bba30eb28046204235e9
parentea6f3e49d6509f3bddb43364cf7225b4935fee82
mediatek: add support for CMCC A10

This board is also as known as SuperElectron ZN-M5 and ZN-M8. However,
for ZN-M5 and ZN-M8, there's another version uses ZX279128 as CPU
chip, which is unsupported.
You can check it in "高级设置" > "系统日志" > "内核日志" page from webUI.

Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 128 MB SPI-NAND
  RAM: 256MB
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, WPS
  Power: DC 12V 1A

Stock layout flash instructions:
Login into webUI and upload sysupgrade firmware in "系统管理" > "升级固件" page.
Remember to unselect "保留配置" ("Keep configurations") first before doing that.

OpenWrt U-Boot layout flash instructions:
1. Flash stock layout firmware first.
2. Connect to the device via SSH, and backup everything,
   especially 'Factory' partition.
3. Unlock MTD partitions:
   apk update && apk add kmod-mtd-rw
   insmod mtd-rw i_want_a_brick=1
4. Write new BL2 and FIP:
   mtd write openwrt-mediatek-filogic-cmcc_a10-ubootmod-preloader.bin BL2
   mtd write openwrt-mediatek-filogic-cmcc_a10-ubootmod-bl31-uboot.fip FIP
5. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
6. Serve OpenWrt initramfs image using TFTP server.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt has booted, perform sysupgrade.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18121
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/boot/uboot-envtools/files/mediatek_filogic
package/boot/uboot-mediatek/Makefile
package/boot/uboot-mediatek/patches/446-add-cmcc_a10.patch [new file with mode: 0644]
target/linux/mediatek/dts/mt7981b-cmcc-a10-stock.dts [new file with mode: 0644]
target/linux/mediatek/dts/mt7981b-cmcc-a10-ubootmod.dts [new file with mode: 0644]
target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi [new file with mode: 0644]
target/linux/mediatek/filogic/base-files/etc/board.d/02_network
target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
target/linux/mediatek/image/filogic.mk