OK update.
Curl + python FTP worked OK and was less hassle to configure.
the source release already gives us a device tree file which is nice.
Doesn't look like it has all the dsa and labelling stuff?
Nor does it have the flash partitions.
The directory looks like it's an openwrt build system but I haven't tried to date it.
Kernel looks like 4.4? Also it has compatible as oc200v2 haha. Other parts have copyright 2017?
Device tree says 115200n8 for serial.
I found partition.json and that looks like it has the base address and sizes. Will need to verify on hardware with the actual flash dump.
Please forgive any transcription errors I didn't double check but it should look something like this:
this is the SPI flash for bootloader.
name | base | size |
---|---|---|
u-boot | 0x00000000 | 0x000E8000 |
tddp | 0x000E8000 | 0x00010000 |
u-boot-env | 0x000F8000 | 0x00008000 |
This is the emmc (i.e. the sd card controller in the device tree)
name | base | size |
---|---|---|
mbr | 0x00000000 | 0x00010000 |
partition | 0x00010000 | 0x00010000 |
device-info | 0x00020000 | 0x00010000 |
support-list | 0x00030000 | 0x00010000 |
firmware-info | 0x00040000 | 0x00010000 |
dtb | 0x00070000 | 0x00010000 |
kernel | 0x00080000 | 0x01000000 |
kernel-recovery | 0x01080000 | 0x01000000 |
rootfs | 0x02080000 | 0x10000000 |
rootfs-recovery | 0x12080000 | 0x10000000 |
user-config | 0x22080000 | 0x00A00000 |
data | 0x22A80000 | 0xDB300000 |
edit:
Also looks like they give you the script to make the update flash file and the magic word.
./tplink/configs/er7212pc_un_v1/makeflash.py
edit:
Using strings on the binary of mtd0 yielded the following as the u-boot environment?
I'll try to work on extracting the binaries for the fdt and see if I can map it to what's provided in the source release.
IDK how one triggers the httpd stuff in the bootloader on these targets? I would assume there's TP link documentation somewhere?
bootcmd=run set_bootargs; run loadfdt; run loadkernel; booti $kernel_addr - $fdt_addr; if test ${booti_result} = failed; then httpd; fi
bootdelay=1
baudrate=115200
ethprime=eth1
ipaddr=192.168.0.10
serverip=192.168.0.101
preboot=
gatewayip=192.168.0.1
netmask=255.255.255.0
kernel_addr=0x5000000
initrd_addr=0xa00000
initrd_size=0x2000000
fdt_addr=0x4f00000
loadaddr=0x5000000
fdt_high=0xffffffffffffffff
hostname=oc200v2
netdev=eth0
ethaddr=<mac>
eth1addr=<mac+1>
eth2addr=<mac+2>
eth3addr=<mac+3>