Porting guide ar71xx to ath79?

@lucize @juppin I started again with a fresh clone of the TLWR2543ND git pull request, to stay sure that I don't bring my mistake in the ath9 eeprom helper, everything is working, including the aht79 to ath79 sysupgrade procedure :smiley:. many thanks for all your help. You guys spot very quick when something is wrong.

Mr @lucize, In case that you still have some time to check it and still are interested, Could we review the status of the Linksys E2100L? :thinking:

I would like a dmesg if possible, do you have tft and bootm in this one ? or something that can run from ram in uboot ?

there was a comment in github that you need to do it in ath79.dtsi

@lucize Yes, in this device have stock u-boot, it have tftboot and bootm. Here is a complete bootlog from the last openwrt image in the archive and here is the old github commit for this device

U-Boot 1.1.7 (Jan  8 2010 - 14:26:25)

AP81 (ar7100) U-boot
sri
64 MB
WRT160NL u-boot version: 1.0.0
Top of RAM usable for U-Boot at: 84000000
Reserving 279k for U-Boot at: 83fb8000
Reserving 192k for malloc() at: 83f88000
Reserving 44 Bytes for Board Info at: 83f87fd4
Reserving 36 Bytes for Global Data at: 83f87fb0
Reserving 128k for boot params() at: 83f67fb0
Stack Pointer at: 83f67f98
Now running in RAM - U-Boot at: 83fb8000
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
ag7100 get ethaddr for device eth0
Fetching MAC Address from 0x83feb2b0

 --------***** Get the RTL8306SD Manufactory ID=386c *****-------
 Reg6: speed=0 nway=1 duplex=1
 Reg5: speed=0 nway=0 duplex=0
 Reg1: a1=7fd9 a2=3210 a3=16d4 a4=3210 a5=0
 Reg1: a1=7fd9 a2=3210 a3=16d4 a4=3210
 Reg1: a1=7fd9 a2=3210 a3=16d4 a4=3210
 Reg1: a1=7fd9 a2=3210 a3=16d4 a4=3210
 Reg1: a1=7fd9 a2=3210 a3=16d4 a4=3210
eth0: 98:fc:11:70:bb:56
eth0 up
eth0
### main_loop entered: bootdelay=1

Hit any key to stop autoboot:  0 
## Booting WRT160NL ...
Code pattern OK: NL1X  Expect: NL1X
Application code length 0x0015699c
CRC OK
## Booting image at bf04003c ...
   Image Name:   MIPS OpenWrt Linux-4.4.14
   Created:      2017-11-04  21:15:13 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    1403199 Bytes =  1.3 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
kernel: org len = 1403199, new len = 1441792
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...



OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... done!
Starting kernel at 80060000...

[    0.000000] Linux version 4.4.14 (buildbot@owrtbuild01) (gcc version 5.3.0 (OpenWrt GCC 5.3.0 12009) ) #1 Wed Dec 6 23:56:36 UTC 2017
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9130 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] No valid device tree found, continuing without
[    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] 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: 16256
[    0.000000] Kernel command line: board=E2100L console=ttyS0,115200 rootfstype=squashfs,jffs2 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: 59904K/65536K available (3134K kernel code, 174K rwdata, 784K rodata, 316K init, 206K bss, 5632K 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:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007884] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.090589] pid_max: default: 32768 minimum: 301
[    0.095359] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.101971] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.112334] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.123784] NET: Registered protocol family 16
[    0.129999] MIPS: machine is Linksys E2100L
[    0.685768] clocksource: Switched to clocksource MIPS
[    0.692498] NET: Registered protocol family 2
[    0.698132] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.705110] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.711529] TCP: Hash tables configured (established 1024 bind 1024)
[    0.718014] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.723854] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.730469] NET: Registered protocol family 1
[    0.736268] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.764014] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.769914] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.782684] io scheduler noop registered
[    0.786687] io scheduler deadline registered (default)
[    0.792147] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.802379] console [ttyS0] disabled
[    0.825996] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 12500000) is a 16550A
[    0.834684] console [ttyS0] enabled
[    0.834684] console [ttyS0] enabled
[    0.841701] bootconsole [early0] disabled
[    0.841701] bootconsole [early0] disabled
[    0.855970] m25p80 spi0.0: found mx25l6405d, expected m25p80
[    0.861699] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    0.867722] 6 cybertan partitions found on MTD device spi0.0
[    0.873420] Creating 6 MTD partitions on "spi0.0":
[    0.878303] 0x000000000000-0x000000040000 : "u-boot"
[    0.885080] 0x000000040000-0x0000001a0000 : "kernel"
[    0.892095] 0x0000001a0000-0x0000007e0000 : "rootfs"
[    0.899088] mtd: device 2 (rootfs) set to be root filesystem
[    0.904860] 1 squashfs-split partitions found on MTD device rootfs
[    0.911148] 0x000000390000-0x0000007e0000 : "rootfs_data"
[    0.918593] 0x0000007e0000-0x0000007f0000 : "nvram"
[    0.925487] 0x0000007f0000-0x000000800000 : "art"
[    0.932328] 0x000000040000-0x0000007e0000 : "firmware"
[    0.954308] libphy: ag71xx_mdio: probed
[    1.366275] Registering RTL8306SD switch with Chip ID: 0x5988, version: 0x0000
[    1.373586] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=00008306, driver=Realtek RTL8306S]
[    1.384133] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RMII
[    1.785821] ag71xx ag71xx.1: connected to PHY at ag71xx-mdio.0:04 [uid=00008306, driver=Realtek RTL8306S]
[    1.796421] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:RMII
[    1.805304] NET: Registered protocol family 10
[    1.814729] NET: Registered protocol family 17
[    1.819370] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.832135] Bridge firewalling registered
[    1.836332] 8021q: 802.1Q VLAN Support v1.8
[    1.849430] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    1.858546] Freeing unused kernel memory: 316K (80461000 - 804b0000)
[    3.317817] init: Console is alive
[    3.321496] init: - watchdog -
[    4.672078] usbcore: registered new interface driver usbfs
[    4.677809] usbcore: registered new interface driver hub
[    4.683267] usbcore: registered new device driver usb
[    4.694671] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.703142] ehci-platform: EHCI generic platform driver
[    4.708582] ehci-platform ehci-platform: EHCI Host Controller
[    4.714412] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    4.722524] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    4.745818] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    4.753321] hub 1-0:1.0: USB hub found
[    4.757525] hub 1-0:1.0: 1 port detected
[    4.764977] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.772957] ohci-platform: OHCI generic platform driver
[    4.788916] init: - preinit -
[    5.544662] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    5.575409] random: procd urandom read with 9 bits of entropy available
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    6.546128] eth0: link up (100Mbps/Full duplex)
[    6.550737] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    8.771004] jffs2: notice: (382) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    8.788502] mount_root: switching to jffs2 overlay
[    8.828729] eth0: link down
[    8.844016] procd: - early -
[    8.847860] procd: - watchdog -
[    9.552327] procd: - ubus -
[    9.608503] procd: - init -
Please press Enter to activate this console.
[   10.571325] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.594688] Loading modules backported from Linux version wt-2016-05-12-0-g7a54796
[   10.602377] Backport generated by backports.git backports-20160216-0-ge3c56e4
[   10.613667] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.632223] nf_conntrack version 0.5.0 (940 buckets, 3760 max)
[   10.680254] xt_time: kernel timezone is -0000
[   10.756875] PPP generic driver version 2.4.2
[   10.764524] NET: Registered protocol family 24
[   10.864193] ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2122 RF Rev:a2 mem=0xb80c0000, irq=2
[   21.920228] device eth0 entered promiscuous mode
[   21.937167] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   21.998337] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   23.546242] eth0: link up (100Mbps/Full duplex)
[   23.550870] br-lan: port 1(eth0) entered forwarding state
[   23.556391] br-lan: port 1(eth0) entered forwarding state
[   23.585866] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   25.555784] br-lan: port 1(eth0) entered forwarding state
[   80.875814] random: nonblocking pool is initialized

can you try a build without

	memory@0 {
		device_type = "memory";
		reg = <0x0 0x4000000>;
	};

and see if the amount of memory is properly detected ?
you can report success here or on https://github.com/openwrt/openwrt/pull/1091

Thanks!

at a first glance, I see no OF support for this switch we would need to add it, I'll prepare a dts anyway and we'll test further

The new build without

	memory@0 {
		device_type = "memory";
		reg = <0x0 0x4000000>;
	};

The memory is properly detected, here is th dmesg if you want to review it

[    0.000000] Linux version 4.14.50 (valkyria@Valkyria-Z) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7291-e67356401d)) #0 Sun Jun 24 20:40:08 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is TP-LINK TL-WR2543N/ND
[    0.000000] SoC: Atheros AR7242 rev 1
[    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 804ed420, node_mem_map 81006ba0
[    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] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 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=0005f860
[    0.000000] Readback ErrCtl register=0005f860
[    0.000000] Memory: 58400K/65536K available (3709K kernel code, 146K rwdata, 808K rodata, 1216K init, 212K bss, 7136K 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: 460.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 8309828030 ns
[    0.000011] sched_clock: 32 bits at 230MHz, resolution 4ns, wraps every 9336885245ns
[    0.007851] Calibrating delay loop... 305.97 BogoMIPS (lpj=1529856)
[    0.094116] pid_max: default: 32768 minimum: 301
[    0.099014] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.105670] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.117616] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.127520] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.133729] pinctrl core: initialized pinctrl subsystem
[    0.140122] NET: Registered protocol family 16
[    0.152045] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.158532]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.163827]   IO 0x0000000000000000..0x0000000000000000
[    0.186718] PCI host bridge to bus 0000:00
[    0.190848] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.197799] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.203386] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.210204] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.218191] pci 0000:00:00.0: [168c:0030] type 00 class 0x028000
[    0.218261] pci 0000:00:00.0: reg 0x10: [mem 0x10000000-0x1001ffff 64bit]
[    0.218349] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.218431] pci 0000:00:00.0: supports D1
[    0.218444] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.218740] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.218773] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    0.226167] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    0.234168] clocksource: Switched to clocksource MIPS
[    0.240554] NET: Registered protocol family 2
[    0.245969] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.252982] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.259423] TCP: Hash tables configured (established 1024 bind 1024)
[    0.265985] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.271866] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.278488] NET: Registered protocol family 1
[    0.282904] PCI: CLS 0 bytes, default 32
[    0.287565] Crashlog allocated RAM at address 0x3f00000
[    0.294028] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.306916] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.312762] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.331445] io scheduler noop registered
[    0.335445] io scheduler deadline registered (default)
[    0.341002] ar7200-usb-phy usb-phy: phy reset is missing
[    0.346893] pinctrl-single 18040028.pinmux: 64 pins at pa b8040028 size 8
[    0.354958] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.362149] console [ttyS0] disabled
[    0.365837] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 14375000) is a 16550A
[    0.374591] console [ttyS0] enabled
[    0.381578] bootconsole [early0] disabled
[    0.396062] m25p80 spi0.0: s25sl064p (8192 Kbytes)
[    0.400911] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.407338] Creating 3 MTD partitions on "spi0.0":
[    0.412149] 0x000000000000-0x000000020000 : "u-boot"
[    0.418137] 0x000000020000-0x0000007f0000 : "firmware"
[    0.439155] 2 tplink-fw partitions found on MTD device firmware
[    0.445130] 0x000000020000-0x00000019ee8a : "kernel"
[    0.451010] 0x00000019ee8c-0x0000007f0000 : "rootfs"
[    0.456905] mtd: device 3 (rootfs) set to be root filesystem
[    0.462619] 1 squashfs-split partitions found on MTD device rootfs
[    0.468884] 0x000000690000-0x0000007f0000 : "rootfs_data"
[    0.475233] 0x0000007f0000-0x000000800000 : "art"
[    0.481527] rtl8367 rtl8367: using GPIO pins 1 (SDA) and 6 (SCK)
[    0.488214] rtl8367 rtl8367: RTL8367R ver. 0 chip found
[    2.560974] libphy: rtl8367: probed
[    2.568946] libphy: Fixed MDIO Bus: probed
[    2.584204] random: fast init done
[    3.205947] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    3.215719] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    3.224353] NET: Registered protocol family 10
[    3.233222] Segment Routing with IPv6
[    3.237082] NET: Registered protocol family 17
[    3.241595] 8021q: 802.1Q VLAN Support v1.8
[    3.252663] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    3.268364] Freeing unused kernel memory: 1216K
[    3.272908] This architecture does not have kernel memory protection.
[    4.000164] init: Console is alive
[    4.003807] init: - watchdog -
[    6.149993] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.361985] usbcore: registered new interface driver usbfs
[    6.367658] usbcore: registered new interface driver hub
[    6.373087] usbcore: registered new device driver usb
[    6.421862] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.439632] SCSI subsystem initialized
[    6.449446] ehci-platform: EHCI generic platform driver
[    6.455027] ehci-platform 1b000000.usb: EHCI Host Controller
[    6.460732] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    6.468760] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    6.504192] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    6.511388] hub 1-0:1.0: USB hub found
[    6.515568] hub 1-0:1.0: 1 port detected
[    6.525627] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.533544] ohci-platform: OHCI generic platform driver
[    6.541837] uhci_hcd: USB Universal Host Controller Interface driver
[    6.553722] usbcore: registered new interface driver usb-storage
[    6.560523] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.570467] init: - preinit -
[    7.649146] random: jshn: uninitialized urandom read (4 bytes read)
[    7.829667] random: jshn: uninitialized urandom read (4 bytes read)
[    8.091079] random: jshn: uninitialized urandom read (4 bytes read)
[   10.227295] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   10.233226] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[   10.320749] urandom_read: 2 callbacks suppressed
[   10.320758] random: procd: uninitialized urandom read (4 bytes read)
[   11.315314] eth0: link up (1000Mbps/Full duplex)
[   11.320015] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   11.328531] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   13.489812] mount_root: loading kmods from internal overlay
[   13.553510] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   13.563401] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   14.186348] block: attempting to load /etc/config/fstab
[   14.191859] block: unable to load configuration (fstab: Entry not found)
[   14.198738] block: no usable configuration
[   14.203782] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   14.265714] urandom-seed: Seed file not found (/etc/urandom.seed)
[   14.421336] procd: - early -
[   14.424587] procd: - watchdog -
[   14.434301] eth0: link down
[   15.073833] procd: - watchdog -
[   15.077334] procd: - ubus -
[   15.155737] random: ubusd: uninitialized urandom read (4 bytes read)
[   15.170497] random: ubusd: uninitialized urandom read (4 bytes read)
[   15.177477] random: ubusd: uninitialized urandom read (4 bytes read)
[   15.185001] procd: - init -
[   15.666032] kmodloader: loading kernel modules from /etc/modules.d/*
[   15.694033] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   15.732236] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   15.773543] cryptodev: driver 1.9 loaded.
[   15.855242] u32 classifier
[   15.857969]     input device check on
[   15.861636]     Actions configured
[   15.880263] Mirror/redirect action on
[   15.906242] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   15.938564] fuse init (API version 7.26)
[   15.968564] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   15.976656] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   16.033502] ip_tables: (C) 2000-2006 Netfilter Core Team
[   16.170214] xt_time: kernel timezone is -0000
[   16.259971] usbcore: registered new interface driver mt7601u
[   16.273807] PPP generic driver version 2.4.2
[   16.281284] NET: Registered protocol family 24
[   16.303135] usbcore: registered new interface driver rt73usb
[   16.314571] usbcore: registered new interface driver rtl8187
[   16.341052] usbcore: registered new interface driver zd1211rw
[   16.390303] usbcore: registered new interface driver rt2500usb
[   16.413083] usbcore: registered new interface driver rt2800usb
[   16.439129] usbcore: registered new interface driver rtl8192cu
[   16.463420] ath9k 0000:00:00.0: Direct firmware load for ath9k-eeprom-pci-0000:00:00.0.bin failed with error -2
[   16.473601] ath9k 0000:00:00.0: Falling back to user helper
[   16.633515] ath: EEPROM regdomain: 0x0
[   16.633526] ath: EEPROM indicates default country code should be used
[   16.633530] ath: doing EEPROM country->regdmn map search
[   16.633545] ath: country maps to regdmn code: 0x3a
[   16.633552] ath: Country alpha2 being used: US
[   16.633556] ath: Regpair used: 0x3a
[   16.646421] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   16.651479] ieee80211 phy0: Atheros AR9300 Rev:3 mem=0xb0000000, irq=13
[   16.691722] kmodloader: done loading kernel modules from /etc/modules.d/*
[   35.926411] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   35.933423] eth0: link up (1000Mbps/Full duplex)
[   35.954424] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   35.998228] br-lan: port 1(eth0.1) entered blocking state
[   36.003653] br-lan: port 1(eth0.1) entered disabled state
[   36.009555] device eth0.1 entered promiscuous mode
[   36.014416] device eth0 entered promiscuous mode
[   36.095753] br-lan: port 1(eth0.1) entered blocking state
[   36.101200] br-lan: port 1(eth0.1) entered forwarding state
[   36.107073] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   36.994441] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   76.232397] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   76.259154] jffs2_build_filesystem(): unlocking the mtd device... 
[   76.259167] done.
[   76.267352] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   83.334919] done.
[   83.344408] jffs2: notice: (2005) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   84.770880] overlayfs: upper fs does not support tmpfile.
[  108.897431] random: crng init done
[  108.900859] random: 1 urandom warning(s) missed due to ratelimiting

Ok, I'll be checking the thread if you need to try the E2100L dts. Many thanks

Can you report this on the mentioned pr?

Hello again.
How can I owerride gpio led in dsti profile with profile from dst configuration?
For example, i have profile with common hw-layout ar7241_tl-mr3x20-v1_tl-wr841-v7.dtsi:

...
	// Submitted separately to be able to disable.
	usb-leds {
		compatible = "gpio-leds";

		led3g {
			label = "tp-link:green:3g";
			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
			default-state = "off";
			trigger-sources = <&hub_port>;
			linux,default-trigger = "usbport";
		};
	};
...

Now I want to disable this led in dst profile ar7241_tl-wr841-v7.dts:

...
#include "ar7241_tl-mr3x20-v1_tl-wr841-v7.dtsi"
...
&usb-leds {
	compatible = "gpio-leds";

	status = "disabled";
};
...

But compiler gets this error:

Error: ../dts/ar7241_tl-wr841-v7.dts:10.2-8 syntax error
FATAL ERROR: Unable to parse input tree

(if I comment those lines - then it compile fine)

There is no status = "disabled" for leds!

Why are you doing this?

You should define it only if you need it instead of disabling it afterwards!

Sorry, but you were wrong.
I successfully disabled the led.

status "disabled" or "okey" is the scope of the visible variable (or in this case the groups of variables enclosed in curly braces). By default all variables in "label {...}" have status "okey".

I created the following ar7241_tl-mr3x20-v1_tl-wr841-v7.dtsi (common profile):

		led3g: led3g {
			label = "tp-link:green:3g";
			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
			default-state = "off";
			trigger-sources = <&hub_port>;
			linux,default-trigger = "usbport";
		};

And one of dts profile:

&led3g {
	status = "disabled";
};

And it disabled (it does not exist) on worked device.

By the way, to quickly check dts profiles for errors, you can use the following commands:

cpp -nostdinc -I ~/Openwrt-trunk/build_dir/target-mips_24kc_musl/linux-ath79_tiny/linux-4.14.50/include -undef -x assembler-with-cpp ~/Openwrt-trunk/target/linux/ath79/dts/file.dts > file.tmp.dts
~/Openwrt-trunk/build_dir/target-mips_24kc_musl/linux-ath79_tiny/linux-4.14.50/scripts/dtc/dtc -O dtb -o file.dtb file.tmp.dts

1 Like

thanks this is useful for cleaning up all the warnings or as much as we can

1 Like

To wet some appetites: Here's a rejected patch for boosting ath79 ethernet speeds: https://gist.github.com/neheb/613ed787f55e34b040f26fa27839fbd7

Will probably have a bigger impact on devices with weaker CPUs.

ok so the problem, for now, is that the image creation is somewhere in legacy.mk, it looks complicated to add append-dtb to it (CyberTAN) I think I need to append somewhere in PatchKernelGzip
would be better to use the updated image creation but for now I lack the knowledge
anyway I added the PR for future use or review
the target creates some *-initramfs images that you could try tft bootm but now for sure you'll get No valid device tree found, continuing without and it will stop somewhere

It's 'whet' :slight_smile: Why was it rejected? Must have missed that on the ML (not that I have the technical background to weigh in on it).

Felix did not understand the patch. Neither do I. I just know it works.

Has anybody else tried to get WNDR3800 wifi working?
I tried three weeks ago, but with no success (see above).
My other fixes were merged, so otherwise the device is already ok.

(WNDR3800 seems to be alone with ar7100.dtsi and ar7161... based dts, so I guess that the developments/fixes for the other devices do not help much.)

Sadly your WNDR3800 is at the moment the only target which does use the pci driver arch/mips/pci/pci-ar71xx.c
(compatible = "qca,ar7100-pci").

If iยดm right there was a problem with the interrupt assignment...
You could collect some useful information as kernel logs. probably output of /proc/interrupts and other stuff that will help to tear that problem down...

Probably in a extra thread or here...

I have an u4ea fusion70 based on the same chipset, I'll try maybe the next week, maybe now the lzma-loader is fixed

@lucize, Thanks again for your interest in porting the E2100L, here are the result that I get from you repo.

These are the files generated and the end of the compilation
Pantallazo-2018-06-30%2014-38-43

I've tried to boot the openwrt-ath79-generic-uImage-initramfs-lzma.bin, here are the results

ar7100> tftpboot 0x81800000
 check link duplex:Full/speed:100
*** Warning: no boot file name; using '0101A8C0.img'
Using eth0 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename '0101A8C0.img'.
Load address: 0x81800000
Loading: send option "timeout 5"
len bad 60 < 2048
Got OACK: timeout 5
#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##########################################################
done
Bytes transferred = 3953840 (3c54b0 hex)
ar7100> bootm 0x81800000
## Booting image at 81800000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.51
   Created:      2018-06-28  17:58:55 UTC
   Image Type:   MIPS Linux Kernel Image (unknown compression)
   Data Size:    3953776 Bytes =  3.8 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
Unimplemented compression type 3