1
0
mirror of https://github.com/cjdelisle/openwrt.git synced 2025-10-26 02:54:29 +00:00
Files
openwrt/target/linux/econet/image/Makefile
Caleb James DeLisle 442f91c117 econet: Add new target TP-Link Archer VR1200v (v2)
The TP-Link Archer VR1200v (v2) is a low end DSL modem based on the
EcoNet EN751221 processor platform.

While it does have an unlocked bootloader, the factory upgrade feature
requires a cryptographic signature so flashing from the web UI is not
feasible.

The Archer VR1200v (v2) uses a dual-image layout. I have chosen to reuse
this to support dual-boot between OpenWRT and the factory firmware.

Flashing instructions (from bootloader):

Build and then locate the squashfs-sysupgrade.bin image file
Get the length of that file in hex: printf '%X\n' "$(stat -c%s the-file-squashfs-sysupgrade.bin)"
Connect to device with xmodem capability, e.g. picocom --send-cmd lsx -vv -b 115200 /dev/ttyUSB0
Switch device on and press a key within 3 seconds, you should get to a `bldr>` prompt
Type: xmdm 80020000 <file length hex>
Quickly start xmodem and send the file, in picocom that is ctrl+a ctrl+s <paste-the-file-name> enter If the transfer fails to start, wait 30 seconds to a minute for the bootloader prompt to return and then try the command again.
Once the transfer has completed successfully, type the following flash 80000 80020000 <file length hex>
Type `re` or simply restart the device to boot into OpenWRT

Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
Link: https://github.com/openwrt/openwrt/pull/19021
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-09-12 00:51:58 +02:00

52 lines
1.5 KiB
Makefile

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
define Target/Description
Build firmware images for EcoNet MIPS based boards.
endef
# tclinux-trx is the default format used in the SDK
define Build/tclinux-trx
./tclinux-trx.sh $@ $(IMAGE_ROOTFS) $(VERSION_DIST)-$(REVISION) > $@.new
mv $@.new $@
endef
# tclinux bootloader requires LZMA, BUT only provides 7.5MB of space
# to decompress into. So we use vmlinuz and decompress twice.
define Device/Default
DEVICE_DTS_DIR := ../dts
KERNEL_SIZE := 7480k
KERNEL_NAME := vmlinuz.bin
KERNEL_LOADADDR := 0x80020000
KERNEL := kernel-bin | append-dtb
endef
define Device/smartfiber_xp8421-b
DEVICE_VENDOR := SmartFiber
DEVICE_MODEL := XP8421-B
DEVICE_DTS := en751221_smartfiber_xp8421-b
IMAGES := tclinux.trx
IMAGE/tclinux.trx := append-kernel | lzma | tclinux-trx
endef
TARGET_DEVICES += smartfiber_xp8421-b
# NOTE: This will not work for upgrading from factory because it requires a cryptographic signature
# however, it it can be flashed, then it will boot correctly.
define Device/tplink_archer-vr1200v-v2
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := Archer vr1200v
DEVICE_VARIANT := v2
TPLINK_FLASHLAYOUT := 16Mmtk
TPLINK_HWID := 0x0b473502
TPLINK_HWREV := 0x0006007c
TPLINK_HWREVADD := 0x0
TPLINK_HVERSION := 3
DEVICE_DTS := en751221_tplink_archer-vr1200v-v2
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin := append-kernel | lzma | pad-to 4193792 | append-rootfs | \
tplink-v2-header -R 0x400000
endef
TARGET_DEVICES += tplink_archer-vr1200v-v2
$(eval $(call BuildImage))