Hardware specification: SoC: MediaTek MT7986A 4x A53 Flash: 128GB eMMC RAM: 1GB DDR4 Ethernet: 4x 1GbE, 1x 2.5GbE (RTL8221B) Switch: MediaTek MT7531AE WiFi: MediaTek MT7976C Button: Reset, Joylink Power: DC 12V 2A Flash instructions: 1. Download and flash the vendor migration firmware via webUI: https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7986-jdcloud_re-cp-03-vendor-migration.bin (Default address is 192.168.68.1, user root, no password) 2. After device has booted up, write new GPT table: dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-gpt.bin of=/dev/mmcblk0 bs=512 seek=0 count=34 conv=fsync 3. Erase and write new BL2: echo 0 > /sys/block/mmcblk0boot0/force_ro dd if=/dev/zero of=/dev/mmcblk0boot0 bs=512 count=8192 conv=fsync dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-preloader.bin of=/dev/mmcblk0boot0 bs=512 conv=fsync 4. Erase and write new FIP: dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=13312 count=8192 conv=fsync dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-bl31-uboot.fip of=/dev/mmcblk0 bs=512 seek=13312 conv=fsync 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. 9. Additionally, if you want to have eMMC recovery boot feature: (Don't worry! You will always have TFTP recovery boot feature.) dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-initramfs-recovery.itb of=/dev/mmcblk0p4 bs=512 conv=fsync Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
84 lines
1.5 KiB
Bash
84 lines
1.5 KiB
Bash
#!/bin/sh
|
|
|
|
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
|
|
|
. /lib/functions/caldata.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$FIRMWARE" in
|
|
"mediatek/mt7915_eeprom.bin")
|
|
case "$board" in
|
|
smartrg,sdg-8622)
|
|
caldata_extract_mmc "factory" 0xa0000 0x1000
|
|
;;
|
|
esac
|
|
;;
|
|
"mediatek/mt7916_eeprom.bin")
|
|
case "$board" in
|
|
acer,predator-w6|\
|
|
smartrg,sdg-8632)
|
|
caldata_extract_mmc "factory" 0xa0000 0x1000
|
|
;;
|
|
esac
|
|
;;
|
|
"mediatek/mt7981_eeprom_mt7976_dbdc.bin")
|
|
case "$board" in
|
|
cmcc,rax3000m)
|
|
case "$(cmdline_get_var root)" in
|
|
/dev/mmc*)
|
|
caldata_extract_mmc "factory" 0x0 0x1000
|
|
;;
|
|
esac
|
|
;;
|
|
ubnt,unifi-6-plus)
|
|
caldata_extract_mmc "factory" 0x0 0x1000
|
|
;;
|
|
esac
|
|
;;
|
|
"mediatek/mt7986_eeprom_mt7975_dual.bin")
|
|
case "$board" in
|
|
mercusys,mr90x-v1)
|
|
ln -sf /tmp/tp_data/MT7986_EEPROM.bin \
|
|
/lib/firmware/$FIRMWARE
|
|
;;
|
|
smartrg,sdg-8612|\
|
|
smartrg,sdg-8614|\
|
|
smartrg,sdg-8622|\
|
|
smartrg,sdg-8632)
|
|
caldata_extract_mmc "factory" 0x0 0x1000
|
|
;;
|
|
esac
|
|
;;
|
|
"mediatek/mt7986_eeprom_mt7976.bin")
|
|
case "$board" in
|
|
acer,predator-w6)
|
|
caldata_extract_mmc "factory" 0x0 0x1000
|
|
;;
|
|
esac
|
|
;;
|
|
"mediatek/mt7986_eeprom_mt7976_dbdc.bin")
|
|
case "$board" in
|
|
asus,rt-ax59u|\
|
|
asus,tuf-ax4200)
|
|
CI_UBIPART="UBI_DEV"
|
|
caldata_extract_ubi "Factory" 0x0 0x1000
|
|
;;
|
|
esac
|
|
;;
|
|
"mediatek/mt7986_eeprom_mt7976_dual.bin")
|
|
case "$board" in
|
|
asus,tuf-ax6000)
|
|
CI_UBIPART="UBI_DEV"
|
|
caldata_extract_ubi "Factory" 0x0 0x1000
|
|
;;
|
|
glinet,gl-mt6000|\
|
|
jdcloud,re-cp-03)
|
|
caldata_extract_mmc "factory" 0x0 0x1000
|
|
;;
|
|
esac
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|