1 (edited by qca9558 2013-05-14 08:33:39)

Topic: Quallcomm qca9558/TP-Link WDR7500 support

Hi all,

I've got a tp-link wdr7500 (qualcomm qca9558) hooked up over serial to my laptop and I'm trying to tftpboot the ar71xx generic kernel on it but I'm only getting as far as:

ap135> bootm
## Booting image at 81000000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

There is no further output from the serial port until I reboot the unit.

Unfortunately I don't have the root password so the best I can do is break into uboot or watch their kernel boot.

I've seen backported changes from linux 3.9 into the 3.8.12 ar71xx code to support the qca9558 cpu and I was wondering if anyone had sucessfully managed to boot a kernel on it?

The kernel I'm trying is openwrt-ar71xx-generic-vmlinux.bin that I built on my laptop with the default .config file.

I've put the boot sequence here: http://pastebin.com/69NgMuwM
and the uboot environment here: http://pastebin.com/28FXcLQM

If anyone wants me to test anything I'm more than happy to try so long as it doesn't overwrite uboot.

I'm interested in getting kernel 3.9 on it as quallcomm has promoted a decent amount of code for the qca955x cips into it.

Re: Quallcomm qca9558/TP-Link WDR7500 support

For anyone who's interested here's an image of the serial pinout that I figured out through trial and error:

http://i.imgur.com/tSuDMaA.jpg

Re: Quallcomm qca9558/TP-Link WDR7500 support

So I emailed tp-link with a gpl source code request and they linked me to the Archer C-7 code here: http://www.tp-link.com/resources/gpl/Archer_C7_1.0.tar.gz saying that the devices use the same code. I will try building their kernel and tftp booting it.

Re: Quallcomm qca9558/TP-Link WDR7500 support

I can get the kernel to boot if I run:

ipaddr 192.168.1.51; set serverip 192.168.1.50; tftp 0x80060000 openwrt-ar71xx-generic-vmlinux-initramfs.bin
dup 1 speed 1000
Using eth1 device
TFTP from server 192.168.1.50; our IP address is 192.168.1.51
Filename 'openwrt-ar71xx-generic-vmlinux-initramfs.bin'.
Load address: 0x80060000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################
done
Bytes transferred = 8762684 (85b53c hex)
ap135> go 0x80060000

And I get

## Starting application at 0x80060000 ...
[    0.000000] Linux version 3.8.12 (leslie@leslie-lappy) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r36617) ) #1 Thu May 16 08:14:41 NZST 2013
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019750 (MIPS 74Kc)
[    0.000000] SoC: Qualcomm Atheros QCA9558 rev 0
[    0.000000] Clocks: CPU:720.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  0x80060000 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 120748k/131072k available (2187k kernel code, 10324k reserved, 586k data, 5800k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 512
[    0.070000] NET: Registered protocol family 16
[    0.070000] MIPS: machine is Generic AR71XX/AR724X/AR913X based board
[    0.080000] bio: create slab <bio-0> at 0
[    0.090000] Switching to clocksource MIPS
[    0.090000] NET: Registered protocol family 2
[    0.100000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.100000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.100000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.110000] TCP: reno registered
[    0.110000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.120000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.130000] NET: Registered protocol family 1
[    0.230000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.230000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.240000] msgmni has been set to 235
[    0.250000] io scheduler noop registered
[    0.250000] io scheduler deadline registered (default)
[    0.260000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.280000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) 

and then it stops.

Does anyone know how to boot a kernel using bootm? Eveytime I try it either stops after uncompressing the kernel or giving me errors like this:

ap135> set ipaddr 192.168.1.51; set serverip 192.168.1.50; tftp 0x80060000 openwrt-ar71xx-generic-uImage-initramfs-lzma.bin
dup 1 speed 1000
Using eth1 device
TFTP from server 192.168.1.50; our IP address is 192.168.1.51
Filename 'openwrt-ar71xx-generic-uImage-initramfs-lzma.bin'.
Load address: 0x80060000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##########################################################
done
Bytes transferred = 2625489 (280fd1 hex)
ap135> bootm
## Booting image at 80060000 ...
   Uncompressing Kernel Image ... Too big uncompressed streamLZMA ERROR 1 - must RESET board 

***the board then resets and u-boot comes up again**

Re: Quallcomm qca9558/TP-Link WDR7500 support

sorry for my noob advice, but maybe you have to write both kern and rootfs on the flash? and maybe with same offsets of stock fw? and maybe use mktplinkfw with

right parameters to have a valid image?

i only saw what is needed usually to add a new model:

https://dev.openwrt.org/changeset/32607/

Re: Quallcomm qca9558/TP-Link WDR7500 support

qca9558 wrote:

Does anyone know how to boot a kernel using bootm? Eveytime I try it either stops after uncompressing the kernel or giving me errors like this:

ap135> set ipaddr 192.168.1.51; set serverip 192.168.1.50; tftp 0x80060000 openwrt-ar71xx-generic-uImage-initramfs-lzma.bin
dup 1 speed 1000
Using eth1 device
TFTP from server 192.168.1.50; our IP address is 192.168.1.51
Filename 'openwrt-ar71xx-generic-uImage-initramfs-lzma.bin'.
Load address: 0x80060000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##########################################################
done
Bytes transferred = 2625489 (280fd1 hex)
ap135> bootm
## Booting image at 80060000 ...
   Uncompressing Kernel Image ... Too big uncompressed streamLZMA ERROR 1 - must RESET board 

***the board then resets and u-boot comes up again**

Try to use a higher memory address, 0x81000000 for example. It seems that the kernel overwrites your image during decompression.

7 (edited by qca9558 2013-05-15 21:21:01)

Re: Quallcomm qca9558/TP-Link WDR7500 support

nebbia88 wrote:

sorry for my noob advice, but maybe you have to write both kern and rootfs on the flash? and maybe with same offsets of stock fw? and maybe use mktplinkfw with

right parameters to have a valid image?

i only saw what is needed usually to add a new model:

https://dev.openwrt.org/changeset/32607/

Any advice is better than nothing smile I've tried writing the kernel t the same memory address as the stock kernel and that just ended up booting their factory image instead. I'm not too worried about getting a rootfs on the device yet. A kernel that boots and tells me it can't mount a rootfs is still further than I've gotten.

snk wrote:
qca9558 wrote:

Does anyone know how to boot a kernel using bootm? Eveytime I try it either stops after uncompressing the kernel or giving me errors like this:

ap135> set ipaddr 192.168.1.51; set serverip 192.168.1.50; tftp 0x80060000 openwrt-ar71xx-generic-uImage-initramfs-lzma.bin
dup 1 speed 1000
Using eth1 device
TFTP from server 192.168.1.50; our IP address is 192.168.1.51
Filename 'openwrt-ar71xx-generic-uImage-initramfs-lzma.bin'.
Load address: 0x80060000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##########################################################
done
Bytes transferred = 2625489 (280fd1 hex)
ap135> bootm
## Booting image at 80060000 ...
   Uncompressing Kernel Image ... Too big uncompressed streamLZMA ERROR 1 - must RESET board 

***the board then resets and u-boot comes up again**

Try to use a higher memory address, 0x81000000 for example. It seems that the kernel overwrites your image during decompression.

Will do. I saw in tp-links code that they were loading the kernel to 0x80060000 before writing it to the flash so I assumed it would be a reasonably safe place.


I think the reason I'm not seeing serial output once the kernel boots is because the driver is looking at the wrong address in the openwrt kernel.

If you compare their kernel output:

Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A

To mine

[    0.260000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.280000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) 

The mmio is different on my driver and it doesn't recognise it as a 16550A uart.

Re: Quallcomm qca9558/TP-Link WDR7500 support

I've managed to get a shell running on the device by creating an initial ramdisk image openwrt-ar71xx-generic-vmlinux-initramfs.bin, changing the default command line options in the kernel to :

CONFIG_CMDLINE="console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART)"

and making u-boot jump directly to the memory address the kernel is starting at

ap135> go 0x80060000
## Starting application at 0x80060000 ...
[    0.000000] Linux version 3.8.12 (dev@not-work) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r36617) ) #2 Mon May 16 08:13:04 AWST 2013
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019750 (MIPS 74Kc)
[    0.000000] SoC: Qualcomm Atheros QCA9558 rev 0
[    0.000000] Clocks: CPU:720.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  0x80060000 console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART)
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 120940k/131072k available (2187k kernel code, 10132k reserved, 586k data, 5608k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 512
[    0.070000] NET: Registered protocol family 16
[    0.070000] MIPS: machine is Generic AR71XX/AR724X/AR913X based board
[    0.080000] bio: create slab <bio-0> at 0
[    0.090000] Switching to clocksource MIPS
[    0.090000] NET: Registered protocol family 2
[    0.100000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.100000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.100000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.110000] TCP: reno registered
[    0.110000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.120000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.130000] NET: Registered protocol family 1
[    0.230000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.230000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.240000] msgmni has been set to 236
[    0.250000] io scheduler noop registered
[    0.250000] io scheduler deadline registered (default)
[    0.250000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.280000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.290000] console [ttyS0] enabled, bootconsole disabled
[    0.290000] console [ttyS0] enabled, bootconsole disabled
[    0.300000] TCP: cubic registered
[    0.310000] NET: Registered protocol family 17
[    0.310000] 8021q: 802.1Q VLAN Support v1.8
[    0.340000] Freeing unused kernel memory: 5608k freed
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode

- regular preinit -
- init -
[    3.710000] compat-drivers backport release: compat-drivers-2013-03-28-5
[    3.720000] Backport based on wireless-testing.git master-2013-04-16
[    3.720000] compat.git: wireless-testing.git
[    3.740000] cfg80211: Calling CRDA to update world regulatory domain
[    3.750000] cfg80211: World regulatory domain updated:
[    3.750000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    3.760000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    3.770000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    3.780000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    3.790000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    3.790000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    3.840000] NET: Registered protocol family 10
[    3.890000] usbcore: registered new interface driver usbfs
[    3.890000] usbcore: registered new interface driver hub
[    3.900000] usbcore: registered new device driver usb
[    3.990000] PPP generic driver version 2.4.2
[    4.030000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    4.100000] NET: Registered protocol family 24
[    4.110000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.120000] ehci-platform: EHCI generic platform driver
[    4.140000] nf_conntrack version 0.5.0 (1977 buckets, 7908 max)
[    4.280000] ip6_tables: (C) 2000-2006 Netfilter Core Team

Please press Enter to activate this console. 


BusyBox v1.19.4 (2013-05-17 08:05:27 NZST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r36642)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/# uname -a
Linux OpenWrt 3.8.12 #2 Fri May 17 08:13:04 NZST 2013 mips GNU/Linux

Unfortunately I can't see any filesystems in /dev/ and /proc/mtd is empty sad

Re: Quallcomm qca9558/TP-Link WDR7500 support

As a bit of an update, I've managed to add a little kernel support for the board and flashed it sucessfully smile. Just need to figure out how to mount the rootfs now.

Here's the current output I'm getting from the board:

U-Boot 1.1.4 (Jan 26 2013 - 13:35:40)

ap135 - Scorpion 1.0DRAM:  
sri
Scorpion 1.0
ath_ddr_initial_config(178): (32bit) ddr2 init
tap = 0x00000003
Tap (low, high) = (0x3, 0x1f)
Tap values = (0x11, 0x11, 0x11, 0x11)
128 MB
Flash Manuf Id 0x1c, DeviceId0 0x30, DeviceId1 0x17
flash size 8MB, sector count = 128
Flash:  8 MB
Using default environment

*** Warning *** : PCIe WLAN Module not found !!!
In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
athrs_sgmii_res_cal: cal value = 0xe
No valid address in Flash. Using fixed address
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200 
Scorpion  ----> S17 PHY *
Vlan config...
TEST: FINAL REG VAL after TX Calibration - 0x46000000
TEST: FINAL XMII VAL after RX Calibration - 0x56000000
TEST: FINAL ETH_CFG VAL after RX Calibration - 0x00028001
athrs17_reg_init: complete
: cfg1 0x80000000 cfg2 0x7335
eth0: ba:be:fa:ce:08:41
eth0 up
athrs17_reg_init_wan done
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x800c0000 cfg2 0x7214
eth1: ba:be:fa:ce:08:41
eth1 up
eth0, eth1
Setting 0x18116290 to 0x54a9214f
Autobooting in 1 seconds
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 3.8.12 (dev@not-work) (gcc version 4.6.4 (OpenWrt/Linaro GCC 4.6-2012.12 r36655) ) #1 Mon May 20 07:56:04 BSST 2013
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00019750 (MIPS 74Kc)
[    0.000000] SoC: Qualcomm Atheros QCA9558 rev 0
[    0.000000] Clocks: CPU:720.000MHz, DDR:600.000MHz, AHB:200.000MHz, Ref:40.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=TL-WDR7500 console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 126316k/131072k available (2187k kernel code, 4756k reserved, 586k data, 232k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 512
[    0.070000] NET: Registered protocol family 16
[    0.070000] MIPS: machine is TP-LINK WDR7500
[    0.480000] ar724x-pci ar724x-pci.0: PCIe link is down
[    0.480000] registering PCI controller with io_map_base unset
[    0.490000] registering PCI controller with io_map_base unset
[    0.500000] bio: create slab <bio-0> at 0
[    0.500000] PCI host bridge to bus 0000:00
[    0.510000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
[    0.510000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.520000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.520000] PCI host bridge to bus 0000:01
[    0.530000] pci_bus 0000:01: root bus resource [mem 0x12000000-0x13ffffff]
[    0.530000] pci_bus 0000:01: root bus resource [io  0x0001]
[    0.540000] pci_bus 0000:01: No busn resource found for root bus, will use [bus 01-ff]
[    0.540000] pci 0000:01:00.0: BAR 0: assigned [mem 0x12000000-0x121fffff 64bit]
[    0.550000] pci 0000:01:00.0: BAR 6: assigned [mem 0x12200000-0x1220ffff pref]
[    0.550000] pci 0000:01:00.0: using irq 41 for pin 1
[    0.560000] Switching to clocksource MIPS
[    0.560000] NET: Registered protocol family 2
[    0.570000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.570000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.570000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.580000] TCP: reno registered
[    0.580000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.590000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.600000] NET: Registered protocol family 1
[    0.610000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.620000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.630000] msgmni has been set to 246
[    0.630000] io scheduler noop registered
[    0.630000] io scheduler deadline registered (default)
[    0.640000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.670000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.670000] console [ttyS0] enabled, bootconsole disabled
[    0.670000] console [ttyS0] enabled, bootconsole disabled
[    0.680000] ath79-spi ath79-spi: master is unqueued, this is deprecated
[    0.690000] m25p80 spi0.0: found en25q64, expected m25p80
[    0.700000] m25p80 spi0.0: en25q64 (8192 Kbytes)
[    0.730000] switch0: Atheros AR8327 switch registered on ag71xx-mdio.0
[    1.920000] libphy: ag71xx_mdio: probed
[    1.930000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    2.480000] ag71xx ag71xx.0 eth0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    2.490000] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:SGMII
[    3.050000] TCP: cubic registered
[    3.050000] NET: Registered protocol family 17
[    3.060000] 8021q: 802.1Q VLAN Support v1.8
[    3.060000] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    3.070000] Please append a correct "root=" boot option; here are the available partitions:
[    3.080000] 1f00            8192 mtdblock0  (driver?)
[    3.080000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

If anyone knows how to mount the rootfs support would be welcome. I'm using my custom openwrt-ar71xx-generic-tl-wdr7500-v1-squashfs-factory.bin image, haven't tried the jffs one.

Re: Quallcomm qca9558/TP-Link WDR7500 support

Nevermind, got it to work! Just had to call

ath79_register_m25p80(&wdr7500_flash_data);

with

static const char *wdr7500_part_probes[] = {
        "tp-link",
        NULL,
};

static struct flash_platform_data wdr7500_flash_data = {
        .part_probes    = wdr7500_part_probes,
};

The raw code I was using from the mach-ap136.c file was just passing in null which doesn't seem to work nicely with the mktplink firmware thing.

If anyone is interested I'll post my patches/code on github sometime in the next few days for everyone to review.

Re: Quallcomm qca9558/TP-Link WDR7500 support

Source code changes available here: https://github.com/qca9558/openwrt-wdr7500

The kernel seems to be pretty stable, all ethernet ports and wireless 2.4ghz are working. I'll start cleaning up the userspace side soon and adding support for 5ghz.

Re: Quallcomm qca9558/TP-Link WDR7500 support

Cool and thank you.

Mazi

Re: Quallcomm qca9558/TP-Link WDR7500 support

Nice work, qca9558!! I'm very interested in this equipment, as I think it has an excellent price/quality relationship, that would be unbeatable with OpenWRT support!! cool

I've created an early entry for this router in the OpenWRT hardware wiki, and I've included the serial pinout photo that you have provided.

Thanks a lot!

Re: Quallcomm qca9558/TP-Link WDR7500 support

frikinet wrote:

Nice work, qca9558!! I'm very interested in this equipment, as I think it has an excellent price/quality relationship, that would be unbeatable with OpenWRT support!! cool

I've created an early entry for this router in the OpenWRT hardware wiki, and I've included the serial pinout photo that you have provided.

Thanks a lot!

You're welcome smile I've almost got an image that should be ready for testing if you do end up buying the device.

If you need anymore images/info just ask, I'm having lots of fun doing this port.

Re: Quallcomm qca9558/TP-Link WDR7500 support

I'm glad you are having fun with this project, and that you share with all of us!

I like the TL-WDR7500, but I've read that some people are having troubles with the wireless conection in the stock firmware... Hopefully, those problems won't occur with OpenWRT... Maybe you can tell us your first impressions!

My biggest complain with this router is the small amount of flash ROM (8MB) that it has, although it may be remediated with extroot and an external USB stick.

As you said, if the 3.9 kernel has a lot of code for the qca955x chipset, probably this router will be a promising platform to port OpenWRT to! wink

Regards!

Re: Quallcomm qca9558/TP-Link WDR7500 support

frikinet wrote:

I'm glad you are having fun with this project, and that you share with all of us!

I like the TL-WDR7500, but I've read that some people are having troubles with the wireless conection in the stock firmware... Hopefully, those problems won't occur with OpenWRT... Maybe you can tell us your first impressions!

I'm still trying to get the ethernet working reliably at the moment, the current code I'm using that's based on the ap135 reference board puts the wan port on the wrong side of the board (lan4 comes up as the wan port instead of wan1). I've barely tested the wireless!

frikinet wrote:

My biggest complain with this router is the small amount of flash ROM (8MB) that it has, although it may be remediated with extroot and an external USB stick.

As you said, if the 3.9 kernel has a lot of code for the qca955x chipset, probably this router will be a promising platform to port OpenWRT to! wink

Regards!

The small amount of ROM is an annoyance but there aren't many board with more than 8MB. If you were keen it wouldn't be too difficult to solder a larger flash chip on it but you'd need jtag to program the bootloader onto it.

It looks like much of the 3.9 kernel stuff came from the openwrt project so we'll see how useful it is when we move off 3.8.12.

Re: Quallcomm qca9558/TP-Link WDR7500 support

I am considering buying a wdr7500 but I am concerned with its usb speed.If qca9558 has equal usb speed as ar7161.I will be happy to buy one.Could you test ftp or samba on it with a usb hdd?

Re: Quallcomm qca9558/TP-Link WDR7500 support

qca9558 wrote:

I'm still trying to get the ethernet working reliably at the moment, the current code I'm using that's based on the ap135 reference board puts the wan port on the wrong side of the board (lan4 comes up as the wan port instead of wan1). I've barely tested the wireless!

A working wired ethernet is even more important than a working wireless, so is normal that it is your #1 priority wink

qca9558 wrote:

The small amount of ROM is an annoyance but there aren't many board with more than 8MB. If you were keen it wouldn't be too difficult to solder a larger flash chip on it but you'd need jtag to program the bootloader onto it.

I've been considering this option, but the idea of messing up with PCB soldering keeps me away... And I don't even know how to program the bootloader through JTAG... But is good to know that it eventually could be a solution!

qca9558 wrote:

It looks like much of the 3.9 kernel stuff came from the openwrt project so we'll see how useful it is when we move off 3.8.12.

Let' see... Keep us on the loop! wink
Thanks and regards!

Re: Quallcomm qca9558/TP-Link WDR7500 support

Joined in thread,
To cheer and thank qca9558 for his time and effort, I have two of these units and very interested in an English open source firmware.
Thanks

Re: Quallcomm qca9558/TP-Link WDR7500 support

ranfish wrote:

I am considering buying a wdr7500 but I am concerned with its usb speed.If qca9558 has equal usb speed as ar7161.I will be happy to buy one.Could you test ftp or samba on it with a usb hdd?

Hi Ranfish, I'm still working on getting usb support working and the fastest usb hdd I have is from a 6 year old laptop so that might affect things. I had a go testing the usb today and it's detecting the device but I forgot to build the kernel modules required to mount it.

For everyone else watching this thread:

I've got the lan ports working properly, hooray! The wan port is now the wan port and will get a dhcp address from my adsl router and the lan ports all give out ip addresses. It's a bit slow to connect to the device so when I ping/ssh in to 192.168.1.1 it fails the first few times but then works.

I've done some quick testing on the wireless. There's no support for wireless ac in openwrt/luci yet so I'll investigate a bit and see if how hard that is to change. I don't have anything to test the 5ghz or wireless ac band so I cant say if they're working anyway. On 2.4ghz the best I can get is dual channel n even though the box supports tri channel.

The usb lights don't light up properly. The usb ports are coming up as usb hubs 1-0 and 2-0 which is different to any other openwrt devices.

Flashing the firmware image may work using the original chinese firmware, I erased the firmware long ago using tftp without backing it up so I can't verify if it works or not. My concern is that the stock firmware may try to overwrite the bootloader when updating. Do the other wdr devices overwrite the bootloader if you updating using the stock firmware?

Re: Quallcomm qca9558/TP-Link WDR7500 support

Firmwares released in Chinese website all have bootloaders and it will update uboot if you update.But those released in global website mostly don't have bootloader.
I hope you can test usb speed soon.My existing device wdr4310 is nice but usb is too slow(11m/s).

22 (edited by qca9558 2013-05-25 03:27:38)

Re: Quallcomm qca9558/TP-Link WDR7500 support

ranfish wrote:

Firmwares released in Chinese website all have bootloaders and it will update uboot if you update.But those released in global website mostly don't have bootloader.
I hope you can test usb speed soon.My existing device wdr4310 is nice but usb is too slow(11m/s).

Hmm might be tricky trying to flash the routers for those of you who don't have bootloader access then. I'll try and get usb tested sometime this weekend, fixed an issue today with power not being delivered to one of the ports.

I've also been looking at how to get the wireless ac chip running (qca9880). Best bet is to try the ath10k driver that is currently in development here:
https://github.com/kvalo/ath10k and the firmware https://github.com/kvalo/ath10k-firmware into the build. This will take me a bit of time though. Would be good if the ath10k driver gets mainline kernel support soon.

**edit:  They're trying to get the ath10k driver into the 3.11 kernel. I'll wait until then so it's stable and well integrated. Source http://lwn.net/Articles/550686/

Re: Quallcomm qca9558/TP-Link WDR7500 support

Update for ranfish:

I'm having some issues with the kmod-fs-msdos kernel driver. There's lots of undefined reference errors. I've tested the write speed by dd-ing onto my usb stick and that was at ~4MB/s. I'm hesitant to dd onto any of my external harddrives though.

Re: Quallcomm qca9558/TP-Link WDR7500 support

qca9558 wrote:

Update for ranfish:

I'm having some issues with the kmod-fs-msdos kernel driver. There's lots of undefined reference errors. I've tested the write speed by dd-ing onto my usb stick and that was at ~4MB/s. I'm hesitant to dd onto any of my external harddrives though.

Hi qca9558

Maybe you should try the kmod-fs-vfat module to use a fat32 formatted usb stick. I didn't need the msdos module in my OpenWRT compilation to make my USB stick work with SMB.

Regards!

Re: Quallcomm qca9558/TP-Link WDR7500 support

I've bought one and tested with original firmware using a ADATA 16G ultra fast disk which is formatted to NTFS.The resulte is over 15mb/s.Pretty awesome,I think it will faster if using ext4 in openwrt.I will keep an eye on your git:)