ATH79: Try to port TP-RE450v1

Hi,
currently I'm trying to port one of my favorite travel router (TP-RE450v1) to ATH79. I have no experience in those things, therefore I've adapted most changes from existing TP-RE450v2 config. Tests with an initramfs image via tftpboot are working OK. Unfortunately I'm stuck with the "real" sysupgrade in a bootloop (init not found) - attached you see the latest bootlog. Any hints where should I dig to get the root cause?

The serial adapter is soldered, therefore it's no problem to going back to stock or stable 19.07 ... :wink:

Thanks, any help is appreciated!

U-Boot 1.1.4 (Jul 27 2016 - 17:23:50)

ap135 - Scorpion 1.0

DRAM:  128 MB
Top of RAM usable for U-Boot at: 88000000
Reserving 133k for U-Boot at: 87fdc000
Reserving 192k for malloc() at: 87fac000
Reserving 44 Bytes for Board Info at: 87fabfd4
Reserving 36 Bytes for Global Data at: 87fabfb0
Reserving 128k for boot params() at: 87f8bfb0
Stack Pointer at: 87f8bf98
Now running in RAM - U-Boot at: 87fdc000
Flash Manuf Id 0xc8, DeviceId0 0x40, DeviceId1 0x17
flash size 16MB, sector count = 256
Flash: 16 MB
Using default environment

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
Scorpion  ----> AR8033 PHY *
AR8033 PHY init
eth0: 00:03:7f:09:0b:ad
eth0 up
eth0
Setting 0x18116290 to 0x50a0214f
Autobooting in 1 seconds
## Booting image at 9f020000 ...
    Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 134217728

Starting kernel ...

[    0.000000] Linux version 4.19.57 (dirk@blackserve) (gcc version 
8.3.0 (OpenW                               rt GCC 8.3.0 
r10493-14e0e4f138)) #0 Thu Jul 11 19:32:39 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] MIPS: machine is TP-Link RE450 v1
[    0.000000] SoC: Qualcomm Atheros QCA9558 ver 1 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 
0x0000000000000000-0x0000000007ffffff]
[    0.000000] random: get_random_bytes called from 0x804fd76c with 
crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200n8 
rootfstype=squashfs,j                               ffs2
[    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] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 123344K/131072K available (4059K kernel code, 
153K rwdata                               , 504K rodata, 1228K init, 
199K bss, 7728K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 720.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 
0xffffffff, max_i                               dle_ns: 5309056796 ns
[    0.000007] sched_clock: 32 bits at 360MHz, resolution 2ns, wraps 
every 59652                               32126ns
[    0.008290] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.074974] pid_max: default: 32768 minimum: 301
[    0.080066] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.087101] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 
bytes)
[    0.098183] clocksource: jiffies: mask: 0xffffffff max_cycles: 
0xffffffff, ma                               x_idle_ns: 19112604462750000 ns
[    0.108676] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.115233] pinctrl core: initialized pinctrl subsystem
[    0.121555] NET: Registered protocol family 16
[    0.128843] PCI host bridge /ahb/apb/pcie-controller@18250000 ranges:
[    0.135752]  MEM 0x0000000012000000..0x0000000013ffffff
[    0.141305]   IO 0x0000000000000001..0x0000000000000001
[    0.146871] ar724x-pci 18250000.pcie-controller: PCIe link is down
[    0.169402] PCI host bridge to bus 0000:00
[    0.173769] pci_bus 0000:00: root bus resource [mem 
0x12000000-0x13ffffff]
[    0.181127] pci_bus 0000:00: root bus resource [io  0x0001]
[    0.187052] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.194281] pci_bus 0000:00: No busn resource found for root bus, 
will use [b                               us 00-ff]
[    0.206088] clocksource: Switched to clocksource MIPS
[    0.212371] NET: Registered protocol family 2
[    0.217679] tcp_listen_portaddr_hash hash table entries: 512 (order: 
0, 4096                                bytes)
[    0.225841] TCP established hash table entries: 1024 (order: 0, 4096 
bytes)
[    0.233302] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.240080] TCP: Hash tables configured (established 1024 bind 1024)
[    0.246964] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.253188] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.260139] NET: Registered protocol family 1
[    0.268117] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.279525] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.285730] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) 
(CMODE_PRIORIT                               Y) (c) 2001-2006 Red Hat, Inc.
[    0.305184] io scheduler noop registered
[    0.309393] io scheduler deadline registered (default)
[    0.316615] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[    0.323645] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.331040] console [ttyS0] disabled
[    0.334862] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, 
base_baud = 250                               0000) is a 16550A
[    0.344082] console [ttyS0] enabled
[    0.344082] console [ttyS0] enabled
[    0.351502] bootconsole [early0] disabled
[    0.351502] bootconsole [early0] disabled
[    0.367376] m25p80 spi0.0: gd25q64 (8192 Kbytes)
[    0.372102] 6 fixed-partitions partitions found on MTD device spi0.0
[    0.378571] Creating 6 MTD partitions on "spi0.0":
[    0.383440] 0x000000000000-0x000000020000 : "u-boot"
[    0.389163] 0x000000020000-0x000000600000 : "firmware"
[    0.397404] 2 tplink-fw partitions found on MTD device firmware
[    0.403409] Creating 2 MTD partitions on "firmware":
[    0.408492] 0x000000000000-0x000000181177 : "kernel"
[    0.414215] 0x000000181177-0x0000005e0000 : "rootfs"
[    0.419884] mtd: device 3 (rootfs) set to be root filesystem
[    0.426908] 1 squashfs-split partitions found on MTD device rootfs
[    0.433189] 0x0000004f0000-0x0000005e0000 : "rootfs_data"
[    0.439410] 0x000000600000-0x000000610000 : "partition-table"
[    0.445865] 0x000000610000-0x000000630000 : "info"
[    0.451422] 0x000000630000-0x000000650000 : "config"
[    0.457147] 0x0000007f0000-0x000000800000 : "art"
[    0.463320] libphy: GPIO Bitbanged MDIO: probed
[    0.472591] libphy: Fixed MDIO Bus: probed
[    0.817492] ag71xx 1a000000.eth: connected to PHY at gpio-0:04 
[uid=00000000,                                driver=Generic PHY]
[    0.827054] eth0: Atheros AG71xx at 0xba000000, irq 5, mode: sgmii
[    0.835501] NET: Registered protocol family 10
[    0.844122] Segment Routing with IPv6
[    0.847991] NET: Registered protocol family 17
[    0.852534] 8021q: 802.1Q VLAN Support v1.8
[    0.860515] jffs2: Flash size not aligned to erasesize, reducing to 
4416KiB
[    0.891552] jffs2: notice: (1) jffs2_build_xattr_subsystem: complete 
building                                xattr subsystem, 0 of xdatum (0 
unchecked, 0 orphan) and 0 of xref (0 dead, 0 
o                               rphan) found.
[    0.907067] VFS: Mounted root (jffs2 filesystem) readonly on device 31:3.
[    0.918408] Freeing unused kernel memory: 1228K
[    0.923003] This architecture does not have kernel memory protection.
[    0.929557] Run /sbin/init as init process
[    0.933750] Run /etc/init as init process
[    0.937851] Run /bin/init as init process
[    0.941924] Run /bin/sh as init process
[    0.945823] Kernel panic - not syncing: No working init found. Try 
passing i                               nit= option to kernel. See Linux 
Documentation/admin-guide/init.rst for 
guidance                               .
[    0.960188] Rebooting in 1 seconds..

Can you share your dts file?

1 Like

Of course, I've put all my changes in this preliminary PR: https://github.com/dibdot/openwrt/commit/b151245cc29c2ba2ec3b77d1cf82906e00e4f330

I'm currently preparing a patch for this device and its hardware clone RE355v1 as well.
I've tested these changes on my RE355 yesterday without issues. Have to check the LED & button assignment as well as the ar71xx upgrade path.
I will update my commit and create a pull request tonight if everything runs well.

Edit: Pull Request opened.

1 Like

Works quite well - many thanks for your great work!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.