First try to support CPE210 v2 - will not boot

Ok, i build a image which is flashing and starting the kernel with the modified u-boot. I couldn´t get it to boot with the stock u-boot.
But it panics.
I think theres something wrong with the bootargs, its not reading the rootfs. I dont know how to set these up properly.
Here is the bootlog:

That looks more like wrong kernel arguments.
Building another image you can try now.

On which code did you make the image?

I used your code from your github to build it. I modified the device profile slightly to get it to flash on the modified u-boot and experimented with the CMDLINE but with no success.

define Device/cpe210-v2
  DEVICE_TITLE := TP-LINK CPE210 v2
  DEVICE_PACKAGES := rssileds
  MTDPARTS := spi0.0:128k(u-boot)ro,64k(pation-table)ro,64k(product-info)ro,1536k(kernel),6144k(rootfs),192k(config)ro,64k(ART)ro,7680k@0x40000(firmware)
  IMAGE_SIZE := 7680k
  BOARDNAME := CPE210-V2
  CONSOLE := ttyS0,115200
  CMDLINE = console=ttyS0,115200 rootfstype=squashfs init=/sbin/init mtdparts=$$(MTDPARTS)
  TPLINK_BOARD_ID := CPE210-V2
  DEVICE_PROFILE := CPE210-V2
  LOADER_TYPE := elf
  KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma
  IMAGES := sysupgrade.bin factory.bin
  IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
  IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef

That won't work also changes you made are already by default.
I am now building a version without safeloader.
Should be done in a couple of minutes.
Although I think that with that modded U-boot we can only have sysupgrade image without any custom arguments.
If this one does not work we can try that.

You can see default arguments here:
https://github.com/robimarko/source/blob/CPE210v2-safeloader/target/linux/ar71xx/image/Makefile#L50
My programmer should arrive in a week or so.

That is on this branch:https://github.com/robimarko/source/tree/CPE210v2-safeloader

Building done:https://drive.google.com/drive/folders/0B1VOQQ-_EIXKd0xkaGtLa3huejQ

try building image based on my changes: https://github.com/lede-project/source/compare/master...psyborg55:master

safeloader part is completely stripped so you will need to put hwid 00210200 at u-boot offset 1FD00. mac address goes at 1FC00.

Thanks, will build.
Just gotta check if my port for Mikrotik Powerbox works.
Already found a bug there and I am currently fixing that.

@robimarko I flashed your image it says

Booting image from 0x9F040000...
## Error: unsupported image header

## Error: failed to execute 'bootcmd'!
   Starting web server for update...

Maybe IMAGE/sysupgrade.bin := append-rootfs is not including the kernel as they do IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) by default. The filesize of the image also seams too small.

It looks like you are right.
We can then give a try @psyborg proposition.

Will get it compiling now

You got error with LEDS.
I will add missing LEDs tommorow

@MartinS Build on @psyborg proposition with fixed LEDs is ready.
You can find it here:https://drive.google.com/drive/folders/0B1VOQQ-_EIXKd0xkaGtLa3huejQ

Here is the bootlog from that, still panics.

Hm,this time it actually finds one partition.
It lacks partitions defined as they are not the same as other generic TP Link devices

New ones with partitions defined are up


Seams to make no difference.

It looks like those partitions are not created at all.
You can see that only one that takes whole 8MB of flash is created

you might need to add partitions to tplinkpart.c or remove partitions from u-boot to match the ones in tplinkpart.c (make backup of these from flash) then you can also change bootargs to boot from 9f020000. double check that i put right board names (CPE210-v2 vs CPE210-V2 etc.)

I think that this issue is due to startup script looking for firmware partition with kernel and squashfs.
I had the same issue with LigoDLB Propeller 5 and having only firmware partition instead of kernel and roofs separate solved it.

I will prepare one image like that

Here are new images:
https://drive.google.com/drive/folders/0B1VOQQ-_EIXKd0xkaGtLa3huejQ

Hello there!
I tryed to connect to the cpe via UART. I see boot log, but keyboard not work, however TX led on usb2ttl adapter (pl2303) is lighting after key press. RX blocked on CPE board?

Model: CPE210(UN) Ver:2.0

You need to add resistor or just bridge the pads under RX pin on board.
Right to already existing resistor

So, I did bridge and keyboard is working only after kernel setup, control part of u-boot still inaccessible for me.

I wanted to upload your build through TFPT (via reset button), however don't know how to look to the boot string of "printenv"

You need too quickly type tpl when CPE starts booting and then you wil get into console