First try to support CPE210 v2 - will not boot

@robimarko
Thank's for quick reply!

Now I run tftpboot and see "magic" name of boot filename.

ap143-2.0> tftpboot
eth1 link down
enet0 port4 up
dup 1 speed 100
*** Warning: no boot file name; using '0101A8C0.img'
Using eth0 device
TFTP from server 192.168.1.10; our IP address is 192.168.1.1
Filename '0101A8C0.img'.
Load address: 0x81000000
Loading: T T T

I have a questions:

  1. Need I to modify u-boot version before I will upload the lede-ar71xx-generic-cpe210-v2-initramfs-kernel.bin file?
  2. If u-boot necessary to modify, can I back to the stock (PHAROS) firmware also via TFTP?

I did not deal with such raw device before.

There is no point loading any of current images.
They dont work on either stock or modified u-boot currently.

Ok, I just made sure that only flashrom is still possible for now.

Finally got GPL sources from TP-Link.
Unfortunately, they did not include U-boot and I already contacted them about that.
They gave me a link to Baidu and that is painfully slow so I reuploaded it to my drive:
https://drive.google.com/file/d/0B1VOQQ-_EIXKUjJkaXZ6Tmsxelk/view?usp=sharing

Finally got a programmer.
If I manually return that CPE210 v2 has DDR1 RAM in u-boot code that bootloader does not work at all.
No serial and booting happening, I am not the only one that this happens to.
I gotta compile a working one to continue work

what do you mean with this? check if you soldered flash correctly which you don't have to remove completely at all. it is enough to disconnect 3.3V pin only and use clips.

By that, I mean that if I manually specify that CPE210 V2 uses DDR1 instead of letting auto-detect based on bootstrap do its thing bootloader does not work.

I already desoldered the flash and now I can read it without issues.
My Pomona clips quality is terrible.

you might wish to try @lynxis git tree build for more complete support https://git.lede-project.org/?p=lede/lynxis/staging.git;a=shortlog;h=refs/heads/cpe210v2

Hi,
i've also started to work on the cpe210v2 together with Arne. The cpe210v2 is using an uncommon image format. In difference to the cpe210v1 it's using binary kernels instead of ELF. It's also have a mktplinkfw version 1 header around the kernel.

tpsafeloader(mktplinkfw(kernel | cmdline | lzma) + rootfs).

TP-Link is ignoring the bootstrap pins which result in a wrong detected reference clock. For this reason the serial output was broken after early_printk stopped. Limited ethernet support is working, but not yet finished. wlan gets detected, log says wlan is up, but it's not working.

1 Like

Awesome, gotta take a look at your code tommorow

probably due to reference clock detection

I think we patched that out, have a look:

https://git.lede-project.org/?p=lede/lynxis/staging.git;a=blob;f=target/linux/ar71xx/patches-4.4/999-qca953x-clock-25mhz.patch;h=6a632cb32edfde22ee348072d2207245315c887a;hb=f81d33d74b2237ed3a4392aafe6855d9578555ad

@arne @psyborg there was an addional detection within dev-wmac. I've updated the branch.
https://git.lede-project.org/?p=lede/lynxis/staging.git;a=blob;f=target/linux/ar71xx/patches-4.4/999-qca953x-clock-25mhz.patch;h=240fbf150ea54d86b9dd98f803fa19e9f9605867;hb=7d710a2b0487755c09d0caf6a1ab910ac5732dc6

It would be nice if someone could test it.

I used parts of your branch in mine.
Will test it today.

Update: Was just about to try it and then I saw that pad that I shorted so RX would work is completely gone.
I dont know how but it is gone so RX wont work.

Anybody maybe knows any other point on the board where RX is also present?

@lynxis Used your patch and pharos board detection code in my branch.
https://github.com/robimarko/source/tree/CPE210-v2-new
Gave images a test and now it boots but kernel panics at partition detection.
But clocks are detected correctly with your patch.
Also:

spi0.0: no TP-Link header found
mtd: failed to find partitions; one or more parsers reports errors (-19)

I built your cpe210v2 branch rebased on current master, and tftpboot'd an initramfs image. Have not tried to sysupgrade yet. So far so good.

flash partitions detected like so:

[    7.804044] m25p80 spi0.0: found gd25q64, expected m25p80
[    7.809664] m25p80 spi0.0: gd25q64 (8192 Kbytes)
[    7.814612] 8 cmdlinepart partitions found on MTD device spi0.0
[    7.820733] Creating 8 MTD partitions on "spi0.0":
[    7.825719] 0x000000000000-0x000000020000 : "u-boot"
[    7.834962] 0x000000020000-0x000000030000 : "pation-table"
[    7.843610] 0x000000030000-0x000000040000 : "product-info"
[    7.852143] 0x000000040000-0x0000001c0000 : "kernel"
[    7.860045] 0x0000001c0000-0x0000007c0000 : "rootfs"
[    7.868083] mtd: device 4 (rootfs) set to be root filesystem
[    7.874137] 1 squashfs-split partitions found on MTD device rootfs
[    7.880541] 0x0000005a0000-0x0000007c0000 : "rootfs_data"
[    7.888869] 0x0000007c0000-0x0000007f0000 : "config"
[    7.896963] 0x0000007f0000-0x000000800000 : "ART"
[    7.904731] 0x000000040000-0x0000007c0000 : "firmware"

Sysupgrade to flash, still working. Yay!

@russell I rebased it also today and rebuilt.
I had a minor error in my branch regarding safe loader.
Space was missing.
Now it boots.

Everything seems to be working.
Images are here: https://drive.google.com/drive/folders/0B1VOQQ-_EIXKMThPdnRqS1BTd1U?usp=sharing
I have been looking at GPL and it seems that V2 does not have LNA GPIO defined.
That is suspicious to me as there are external LNA-s under metal can.

Just a heads up to people with a CPE210v2 who find youtube videos of people opening the CPE210 case, I discovered not only two screws under the label, but there was double stick tape holding the case closed as well. A guitar pick or three worked wonders.