aboutsummaryrefslogtreecommitdiff
path: root/target/linux/mediatek/image/filogic.mk
diff options
context:
space:
mode:
authorTianling Shen <cnsztl@immortalwrt.org>2023-11-01 14:46:15 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2024-01-19 21:43:32 +0100
commitc0c3234e17207a9287a08757fc1752490144a1cd (patch)
treee0c6ce377a738f7d32e3f3592a56281834ffbf26 /target/linux/mediatek/image/filogic.mk
parent6fa4fbbc5293886aa6bae6e0cac4b99a4c472fc4 (diff)
mediatek: add support for JDCloud RE-CP-03
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>
Diffstat (limited to 'target/linux/mediatek/image/filogic.mk')
-rw-r--r--target/linux/mediatek/image/filogic.mk26
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index d0c9907635..8a8879ca32 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -450,6 +450,32 @@ define Device/jcg_q30-pro
endef
TARGET_DEVICES += jcg_q30-pro
+define Device/jdcloud_re-cp-03
+ DEVICE_VENDOR := JDCloud
+ DEVICE_MODEL := RE-CP-03
+ DEVICE_DTS := mt7986a-jdcloud-re-cp-03
+ DEVICE_DTS_DIR := ../dts
+ DEVICE_DTC_FLAGS := --pad 4096
+ DEVICE_DTS_LOADADDR := 0x43f00000
+ DEVICE_PACKAGES := kmod-mt7986-firmware mt7986-wo-firmware \
+ e2fsprogs f2fsck mkf2fs
+ KERNEL_LOADADDR := 0x44000000
+ KERNEL := kernel-bin | gzip
+ KERNEL_INITRAMFS := kernel-bin | lzma | \
+ fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
+ KERNEL_INITRAMFS_SUFFIX := -recovery.itb
+ IMAGES := sysupgrade.itb
+ IMAGE_SIZE := $$(shell expr 64 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m
+ IMAGE/sysupgrade.itb := append-kernel | \
+ fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | \
+ pad-rootfs | append-metadata
+ ARTIFACTS :=gpt.bin preloader.bin bl31-uboot.fip
+ ARTIFACT/gpt.bin := mt798x-gpt emmc
+ ARTIFACT/preloader.bin := mt7986-bl2 emmc-ddr4
+ ARTIFACT/bl31-uboot.fip := mt7986-bl31-uboot jdcloud_re-cp-03
+endef
+TARGET_DEVICES += jdcloud_re-cp-03
+
define Device/mediatek_mt7981-rfb
DEVICE_VENDOR := MediaTek
DEVICE_MODEL := MT7981 rfb