[OpenWrt-Devel] [RFC 0/2]

Matthias Schiffer mschiffer at universe-factory.net
Fri Nov 21 03:41:59 EST 2014

this adds support for the new TP-LINK outdoor series CPE210/220/510/520
("Pharos"). I'm sending this as a RFC as there is a still a number of open

eth0 configuration
Looking at the log output of the stock firmware, it seems like the to ethernet
ports both have their own MAC.

After booting OpenWrt, both ethernet ports are connected to the internal switch,
which is connected to the CPUs GMAC1; I haven't been able to get a link on GMAC0
at all, so the current code of these patches only initializes GMAC1. I don't
know if using both GMACs would be preferable, but it seems a bit strange like
this, so maybe someone with some more insight into the Atheros SoCs could look
at it or give me some hints?

LED configuration
The CPEs have 6 controllable LEDs: LAN0, LAN1 and four WLAN signal indicators.
Currently my patches configure all signal indicators using rssileds, but no
status or WLAN activity LEDs are left like this.

Image generation
The new TP-LINK bootloader ("TP-LINK Safeloader") expects the kernel image in
ELF format. I've tried building the ELF LZMA loader via Image/BuildLoader, but
as soon as I added a kernel command line there, the image wouldn't boot at all.
As a workaround, I'm using PatchKernelLzma and then build the LZMA loader using
the patched kernel as LOADER_DATA.

Also, there's no initramfs support so far. (I've never used initramfs with
OpenWrt, but it seems like all other image types support it?)

Apart from these issues, everything seems to work fine. I've only tested this
on the CPE510 so far, but I don't see why it shouldn't work the same on the
CPE210 (the stock firmware, "PharOS", also uses just one image for both
devices). The CPE220 and CPE520 variants aren't available yet, but as far as I
can tell from the information in the manual book, the only difference is the
antenna (lower angle, higher gain), so I've included them as supported devices
as well.

Matthias Schiffer (2):
  firmware-utils: add new tool mktplinkfw3 for the new TP-LINK Pharos
    devices (CPE210/220/510/520)
  ar71xx: add support for TP-LINK CPE210/220/510/520

 target/linux/ar71xx/base-files/etc/diag.sh         |   3 +
 .../ar71xx/base-files/etc/uci-defaults/01_leds     |  10 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   7 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh       |  40 +-
 .../ar71xx/base-files/lib/upgrade/platform.sh      |  32 ++
 target/linux/ar71xx/config-3.10                    |   1 +
 .../ar71xx/files/arch/mips/ath79/mach-cpe510.c     | 107 +++++
 target/linux/ar71xx/generic/profiles/tp-link.mk    |  11 +
 target/linux/ar71xx/image/Makefile                 |  27 ++
 .../610-MIPS-ath79-openwrt-machines.patch          |  23 +-
 tools/firmware-utils/Makefile                      |   1 +
 tools/firmware-utils/src/mktplinkfw3.c             | 469 +++++++++++++++++++++
 12 files changed, 724 insertions(+), 7 deletions(-)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
 create mode 100644 tools/firmware-utils/src/mktplinkfw3.c

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list