Porting guide ar71xx to ath79?

Any chance 1043N V5 can be added to ath79 ?

Other sister routers like V4 already seem to have builds available, but not V5. I have a unit to test, if that is necessery.

post a dmesg with current firmware, it should be the same as v4, if you know how to use tft recovery maybe you can try the v4 image, but first, post the dmesg, maybe I'll have time for it

edit:
looked into tplink-safeloader.c and it will not work with v4 image, the flash layout is different
maybe a cat /proc/mtd is also needed

1 Like

Here is my dmesg

[    0.000000] Linux version 4.9.120 (buildbot@builds-03.infra.lede-project.org) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7102-3f3a2c9) ) #0 Thu Aug 16 07:51:15 2018
[    0.000000] MyLoader: sysp=0d33d2d9, boardp=91ae65ac, parts=57f0380d
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] SoC: Qualcomm Atheros QCA956X ver 1 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 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-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 80442044, node_mem_map 81000020
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=TL-WR1043N-v5 mtdparts=spi0.0:128k(factory-uboot)ro,128k(u-boot)ro,15104k(firmware),128k(product-info)ro,640k(config)ro,64k(partition-table)ro,128k(logs)ro,64k(art)ro console=ttyS0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 60020K/65536K available (3363K kernel code, 172K rwdata, 444K rodata, 300K init, 219K bss, 5516K 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] Clocks: CPU:775.000MHz, DDR:650.000MHz, AHB:258.333MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4932285024 ns
[    0.000007] sched_clock: 32 bits at 387MHz, resolution 2ns, wraps every 5541893118ns
[    0.008222] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.071035] pid_max: default: 32768 minimum: 301
[    0.075987] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.082968] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.092724] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.103126] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.110600] NET: Registered protocol family 16
[    0.116624] MIPS: machine is TP-LINK TL-WR1043N v5
[    0.355563] Can't analyze schedule() prologue at 803a5594
[    0.372119] clocksource: Switched to clocksource MIPS
[    0.378382] NET: Registered protocol family 2
[    0.383772] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.391128] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.397876] TCP: Hash tables configured (established 1024 bind 1024)
[    0.404662] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.410826] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.417696] NET: Registered protocol family 1
[    0.422343] PCI: CLS 0 bytes, default 32
[    0.425438] Crashlog allocated RAM at address 0x3f00000
[    0.431863] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.444553] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.450696] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.469219] io scheduler noop registered
[    0.473392] io scheduler deadline registered (default)
[    0.479149] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.488055] console [ttyS0] disabled
[    0.511896] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    0.520992] console [ttyS0] enabled
[    0.528541] bootconsole [early0] disabled
[    0.542411] m25p80 spi0.0: found w25q128, expected m25p80
[    0.558428] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.563341] 8 cmdlinepart partitions found on MTD device spi0.0
[    0.569452] Creating 8 MTD partitions on "spi0.0":
[    0.574418] 0x000000000000-0x000000020000 : "factory-uboot"
[    0.581773] 0x000000020000-0x000000040000 : "u-boot"
[    0.588663] 0x000000040000-0x000000f00000 : "firmware"
[    0.619596] 2 uimage-fw partitions found on MTD device firmware
[    0.625750] 0x000000040000-0x0000001c0000 : "kernel"
[    0.632046] 0x0000001c0000-0x000000f00000 : "rootfs"
[    0.638642] mtd: device 4 (rootfs) set to be root filesystem
[    0.644572] 1 squashfs-split partitions found on MTD device rootfs
[    0.650963] 0x0000003f0000-0x000000f00000 : "rootfs_data"
[    0.658328] 0x000000f00000-0x000000f20000 : "product-info"
[    0.665764] 0x000000f20000-0x000000fc0000 : "config"
[    0.672661] 0x000000fc0000-0x000000fd0000 : "partition-table"
[    0.680262] 0x000000fd0000-0x000000ff0000 : "logs"
[    0.686938] 0x000000ff0000-0x000001000000 : "art"
[    0.694374] libphy: Fixed MDIO Bus: probed
[    0.709903] switch0: Atheros AR8337 rev. 2 switch registered on ag71xx-mdio.0
[    1.400093] libphy: ag71xx_mdio: probed
[    2.033580] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
[    2.045145] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:SGMII
[    2.053297] NET: Registered protocol family 10
[    2.061572] NET: Registered protocol family 17
[    2.066260] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.079731] 8021q: 802.1Q VLAN Support v1.8
[    2.085588] hctosys: unable to open rtc device (rtc0)
[    2.095777] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    2.104728] Freeing unused kernel memory: 300K
[    2.109317] This architecture does not have kernel memory protection.
[    2.552131] random: fast init done
[    2.763649] init: Console is alive
[    2.767350] init: - watchdog -
[    3.550858] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.596415] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.605251] init: - preinit -
[    4.223579] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    4.246758] random: procd: uninitialized urandom read (4 bytes read)
[    5.303593] eth0: link up (1000Mbps/Full duplex)
[    5.308497] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.489864] jffs2: notice: (445) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    7.507179] mount_root: switching to jffs2 overlay
[    7.534663] urandom-seed: Seeding with /etc/urandom.seed
[    7.686182] eth0: link down
[    7.698663] procd: - early -
[    7.701724] procd: - watchdog -
[    8.328223] procd: - watchdog -
[    8.331702] procd: - ubus -
[    8.431776] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.440700] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.448142] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.455689] procd: - init -
[    8.766781] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.776917] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    8.791600] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    8.799919] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    8.809292] ip_tables: (C) 2000-2006 Netfilter Core Team
[    8.821386] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    8.869359] xt_time: kernel timezone is -0000
[    8.916524] PPP generic driver version 2.4.2
[    8.923036] NET: Registered protocol family 24
[    8.962192] ath: EEPROM regdomain: 0x0
[    8.962199] ath: EEPROM indicates default country code should be used
[    8.962202] ath: doing EEPROM country->regdmn map search
[    8.962214] ath: country maps to regdmn code: 0x3a
[    8.962218] ath: Country alpha2 being used: US
[    8.962221] ath: Regpair used: 0x3a
[    8.972915] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    8.976508] ieee80211 phy0: Atheros AR9561 Rev:0 mem=0xb8100000, irq=47
[    9.069548] kmodloader: done loading kernel modules from /etc/modules.d/*
[    9.924384] urandom_read: 5 callbacks suppressed
[    9.924390] random: jshn: uninitialized urandom read (4 bytes read)
[   15.955644] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   15.963207] eth0: link up (1000Mbps/Full duplex)
[   15.972202] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   15.993857] br-lan: port 1(eth0.1) entered blocking state
[   15.999448] br-lan: port 1(eth0.1) entered disabled state
[   16.005514] device eth0.1 entered promiscuous mode
[   16.010464] device eth0 entered promiscuous mode
[   16.052242] br-lan: port 1(eth0.1) entered blocking state
[   16.057832] br-lan: port 1(eth0.1) entered forwarding state
[   16.063742] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   16.982325] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   18.169273] ath: EEPROM regdomain: 0x82c1
[   18.173456] ath: EEPROM indicates we should expect a country code
[   18.179743] ath: doing EEPROM country->regdmn map search
[   18.185242] ath: country maps to regdmn code: 0x37
[   18.190180] ath: Country alpha2 being used: SI
[   18.194776] ath: Regpair used: 0x37
[   18.198370] ath: regdomain 0x82c1 dynamically updated by user
[   20.357545] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   20.387992] br-lan: port 2(wlan0) entered blocking state
[   20.393539] br-lan: port 2(wlan0) entered disabled state
[   20.399364] device wlan0 entered promiscuous mode
[   21.040421] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   21.047186] br-lan: port 2(wlan0) entered blocking state
[   21.052705] br-lan: port 2(wlan0) entered forwarding state
[   72.572158] random: crng init done

And here is cat /proc/mtd


dev:    size   erasesize  name
mtd0: 00020000 00010000 "factory-uboot"
mtd1: 00020000 00010000 "u-boot"
mtd2: 00ec0000 00010000 "firmware"
mtd3: 00180000 00010000 "kernel"
mtd4: 00d40000 00010000 "rootfs"
mtd5: 00b10000 00010000 "rootfs_data"
mtd6: 00020000 00010000 "product-info"
mtd7: 000a0000 00010000 "config"
mtd8: 00010000 00010000 "partition-table"
mtd9: 00020000 00010000 "logs"
mtd10: 00010000 00010000 "art"

Unit is running 18.06.1 if thats of any significance.

Hi all,

I've raised a pull request with a port to ath79 for my D-Link DIR-825-C1 (Link). I included support for DIR-835-A1 as well, as it's included also in the "mach" file for ar71xx.

The two routers are similar, except for some LEDs. Anyway, I don't have an 835 myself, so I would be glad if somebody could test this. I'd be interested in knowing if it works in general (it should) and especially if the interfaces get the correct MAC addresses and if the LEDs are fine.

I don't know if anybody still uses this router. I've seen some forum posts that suggest some do (hello @terry98 and @br14).

It'd be cool if I could get some feedback on the DIR-835-A1. My mail address is in the pull request.

Thanks!
Seb

2 Likes

FYI

I have created a new target page to reflect the status of ar71xx->ath79 migration:
https://openwrt.org/docs/techref/targets/ar71xx-ath79 - shows ar71xx-ath79 only (=migrated devices)

The already existing pages for ar71xx + ath79 have been modified to show both, ar71xx + ath79:
https://openwrt.org/docs/techref/targets/ar71xx - shows ath79 + ar71xx
https://openwrt.org/docs/techref/targets/ath79 - shows ath79 + ar71xx

I updated the status of the devices listed further above accordingly.

For already existing (ar71xx-) devices, you can update the status yourself by editing the respective dataentry:

  • Set target = ath79 → devices with this target can be found only in ath79
  • Set target = ar71xx-ath79 → devices with this target can be found in both, ar71xx and ath79
  • Set Unsupported functions = ath79 WIP → incomplete ath79 migration; work in progress
  • Set Unsupported functions = <empty> → 100% complete ath79 migration; no manual adjustment of configuration necessary when migrating from ar71xx to ath79
6 Likes

please backup those mtd partitions, especially art !!!
the PR is here
if you don't know how to build them I can link you an image, but it would be better to build it yourself, also please have a functioning serial ttl connected to the board (you can find in the wiki what pins you need to use and connect)

maybe others can review this on flash layout calculations

Regards

1 Like

@lucize
i will try to make a backup. Can you link me an image i can test ? Dont really know how to properly build one myself, but i would like to test.

im really after flow offloading, that comes with newer kernels.

please don't try, just DO it, or also you could end with an useless box
cat /dev/mtd0ro > /tmp/mtd0.img etc.. and copy them from the device (scp, or move them under /www/ and use the browser to download the image 192.168.1.1/mtd0.img) maybe just the ones mentioned above

there is a high chance that you'll need a serial ttl adapter (3.3v) so you can see if something goes wrong with the image (like the wireless or the switch part)

you can use sysupgrade, maybe you need to use -F option
the images factory and sysupgrade

@lucize
As instructed, i've made a backup of the partitions. So your image should just flash over existing openwrt installation or do i need extra (besides the -F option) ?

Also, if something goes bad, i assume i need to flash back backuped partitions from serial, correct ?

use sysupgrade without saving changes. If is not working you will write a normal ar71xx image via uboot, the backup is for the scenario if I didn't calculated the partitions correctly and overwrite the them, openwrt doesn't write those partitions.

Looks like the image is broken, because when i hook up serial, i get a kernel panic

U-Boot 1.1.4-g6ce9309a-dirty (Oct 26 2016 - 09:20:53)

ap152 - Dragonfly 1.0

DRAM:  64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 393k for U-Boot at: 83f9c000
Reserving 16448k for malloc() at: 82f8c000
Reserving 44 Bytes for Board Info at: 82f8bfd4
Reserving 36 Bytes for Global Data at: 82f8bfb0
Reserving 128k for boot params() at: 82f6bfb0
Stack Pointer at: 82f6bf98
Now running in RAM - U-Boot at: 83f9c000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
athr_mgmt_init ::done
Dragonfly  ----> S17 PHY *
athrs17_reg_init: complete
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x80000000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
eth0 up
eth0
Setting 0x181162c0 to 0x20402100
factory boot check integer ok.
factory boot load fs uboot len 131072 to addr 0x80010000.
Hit any key to stop autoboot:  0
## Starting application at 0x80010000 ...


U-Boot 1.1.4-g6ce9309a-dirty (Oct 26 2016 - 09:24:21)

ap152 - Dragonfly 1.0

DRAM:  64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 122k for U-Boot at: 83fe0000
Reserving 16448k for malloc() at: 82fd0000
Reserving 44 Bytes for Board Info at: 82fcffd4
Reserving 36 Bytes for Global Data at: 82fcffb0
Reserving 128k for boot params() at: 82faffb0
Stack Pointer at: 82faff98
Now running in RAM - U-Boot at: 83fe0000
Flash Manuf Id 0xef, DeviceId0 0x40, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
No valid address in Flash. Using fixed address
ath_gmac_enet_initialize: reset mask:c02200
athr_mgmt_init ::done
Dragonfly  ----> S17 PHY *
athrs17_reg_init: complete
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x80000000 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
eth0 up
eth0
Setting 0x181162c0 to 0x20402100
Hit any key to stop autoboot:  0
## Booting image at 9f040000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.87
   Created:      2018-12-10  15:32:22 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1604589 Bytes =  1.5 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum at 0x9f040040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[    0.000000] Linux version 4.14.87 (luci@srv.domain.local) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7410-d3a7587)) #0 Mon Dec 10 15:32:22 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] MIPS: machine is TP-Link TL-WR1043N Version 5
[    0.000000] SoC: Qualcomm Atheros QCA956X ver 1 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 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-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 58272K/65536K available (3746K kernel code, 150K rwdata, 904K rodata, 1208K init, 204K bss, 7264K 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: 775.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4932285024 ns
[    0.000007] sched_clock: 32 bits at 387MHz, resolution 2ns, wraps every 5541893118ns
[    0.008212] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.074760] pid_max: default: 32768 minimum: 301
[    0.079779] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.086762] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.097792] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.108180] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.114671] pinctrl core: initialized pinctrl subsystem
[    0.121005] NET: Registered protocol family 16
[    0.145845] clocksource: Switched to clocksource MIPS
[    0.152086] NET: Registered protocol family 2
[    0.157332] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.164683] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.171427] TCP: Hash tables configured (established 1024 bind 1024)
[    0.178256] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.184420] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.191274] NET: Registered protocol family 1
[    0.199553] Crashlog allocated RAM at address 0x3f00000
[    0.206232] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.217064] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.223210] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.241355] io scheduler noop registered
[    0.245491] io scheduler deadline registered (default)
[    0.252527] pinctrl-single 1804002c.pinmux: 512 pins at pa b804002c size 64
[    0.260313] gpio-export gpio-export: 1 gpio(s) exported
[    0.266584] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.273854] console [ttyS0] disabled
[    0.277688] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 1562500) is a 16550A
[    0.286792] console [ttyS0] enabled
[    0.286792] console [ttyS0] enabled
[    0.294335] bootconsole [early0] disabled
[    0.294335] bootconsole [early0] disabled
[    0.318747] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.323659] 8 fixed-partitions partitions found on MTD device spi0.0
[    0.330232] Creating 8 MTD partitions on "spi0.0":
[    0.335187] 0x000000000000-0x000000020000 : "factory-uboot"
[    0.341667] 0x000000020000-0x000000040000 : "u-boot"
[    0.347497] 0x000000040000-0x000000f00000 : "firmware"
[    0.353697] 0x000000f00000-0x000000f20000 : "product-info"
[    0.360037] 0x000000f20000-0x000000fc0000 : "config"
[    0.365797] 0x000000fc0000-0x000000fd0000 : "partition-table"
[    0.372413] 0x000000fd0000-0x000000ff0000 : "logs"
[    0.378027] 0x000000ff0000-0x000001000000 : "art"
[    0.384456] libphy: Fixed MDIO Bus: probed
[    0.726207] libphy: ag71xx_mdio: probed
[    0.733158] switch0: Atheros AR8337 rev. 2 switch registered on mdio-bus.0
[    1.727008] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
[    1.738611] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:SGMII
[    1.747288] NET: Registered protocol family 10
[    1.756064] Segment Routing with IPv6
[    1.759928] NET: Registered protocol family 17
[    1.764549] 8021q: 802.1Q VLAN Support v1.8
[    1.770907] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.778685] Please append a correct "root=" boot option; here are the available partitions:
[    1.787323] 1f00             128 mtdblock0
[    1.787326]  (driver?)
[    1.794074] 1f01             128 mtdblock1
[    1.794077]  (driver?)
[    1.800830] 1f02           15104 mtdblock2
[    1.800833]  (driver?)
[    1.807586] 1f03             128 mtdblock3
[    1.807589]  (driver?)
[    1.814340] 1f04             640 mtdblock4
[    1.814343]  (driver?)
[    1.821097] 1f05              64 mtdblock5
[    1.821100]  (driver?)
[    1.827853] 1f06             128 mtdblock6
[    1.827857]  (driver?)
[    1.834608] 1f07              64 mtdblock7
[    1.834610]  (driver?)
[    1.841363] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.850445] Rebooting in 1 seconds..

The usual "tpl" doesn't seem to be working (to get to bootloader and flash the image back). Is it any different with V5 hw ?

Was able to resurrect the device using tftp flash back to stock and again to openwrt stable. Looks like the image needs some work.

hmm, I think the firmware splitter is not working, I"ll check that, but seems promising //

Great stuff! When you have a build ready, id be happy to test.

I think I was wrong with the firmware splitter, is not tplink type but denx,uimage, try this new image

also the recovery u-boot from first commit

Set your Ethernet adapter to 192.168.0.10. Enable your TFTP
server with the firmware image in the root named fw.bin
(can be any name, just change the tftp command that comes later)
When the router starts its boot process,
press “enter” to interrupt auto boot.

Enter the following commands:
tftp 0x80060000 fw.bin
erase 0x9f040000 +${filesize}
cp.b 0x80060000 0x9f040000 ${filesize}
reset

here are the links
factory https://drive.google.com/open?id=1rsiW0SB58mQ9BI9QhoiQyWbQQOR8xd94
sysupgrade https://drive.google.com/open?id=1jwfTodOhkVQavTMxbG-4a1yNk1_iOuZA

Based on Archer A7/C7 v5 work, I created ath79 DTS for Archer C7 v4 (see https://github.com/openwrt/openwrt/pull/1726). There are some fixes that I think should be also in C7 v5 (like missing LED aliases led-boot and others, and fixing ar8327 init values - if there are no LEDs on the back panel with ethernet ports, LED initialization is useless), but because I do not have one, I have not tried to fix them. So enjoy C7 v4 :slight_smile:

1 Like

What is the current status of NAND drivers with the ath79 target?

I've found a few posts from the June, 2018 timeframe suggesting that there was work to be done, as well as an inquiry in October, 2018.

The contents of build_dir/target-mips_24kc_musl/linux-ath79_nand/linux-4.14.93/drivers/mtd/, including nand/Kconfig, didn't provide any insight about available NAND drivers for the qca95xx chips (qca9563, of particular interest to me). Yes, my branch is a bit behind, based on commit 62dadcb86c from January 19, 2019.

Edit: I have since found https://github.com/openwrt/openwrt/pull/1428 which, in closing comment, states:

But it requires 4.19 to not have to backport pretty much the whole MTD and SPI subsystems_

Please re-spin the patch as soon as we have kernel 4.19 support. The approach was already NAK'ed upstream and I don't see much gain in adding the hack if the next major kernel in OpenWrt will provide a suitable solution.

Still interested in any updates on the topic.

At least 19.0x would still be on 4.14 AFAIK. But I suppose you're comfortable enough running master once that bumps to 4.19 :slight_smile:.

FYI, I have some ar71xx devices that don't seem to have been ported to ath79 :

  • HORNETUB (this seems to have disappeared from ar71xx snapshots ...)
  • onion-omega
  • carambola2
  • wpj344
  • wrt160nl

If there's anything I can do to help, let me know. In particular, I'm happy to test snapshots.

Thanks