Porting guide ar71xx to ath79?

so the remaining qca956x and qca955x problems seems to be solved by @hackpascal (if is the same user as on github) ! :sunny:

Since your comment, the 1043nd-v1 support is live.

But my build doesn't have network access: can't ping/ssh/... to it and it doesn't serve dhcp too.

How should I build an image that works?

@xabolcs The same for me, only sometimes after is unplugged, but after 2-3 restarts it will not work anymore, so there are still problems on v1, the strange thing is that you can see traffic using tcpdump, maybe @blogic didn't test it enough

I tried the dsa drivers, but the driver was written for 4.17 and is not starting, I understand that there were API changes, I can boot only 4.15, 4,16+ is hanging at boot and I try to understand what changed between 4.15 and 4.16
The last line is different

4.15

[    0.000000] Linux version 4.15.18 (build@droid) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7177-3b6f865b01)) #0 Mon Jun 11 17:25:40 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is TP-Link TL-WR1043ND Version 1
[    0.000000] SoC: Atheros AR9132 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 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-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0

4.16

[    0.000000] Linux version 4.16.15 (build@droid) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7177-3b6f865b01)) #0 Mon Jun 11 17:25:40 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is TP-Link TL-WR1043ND Version 1
[    0.000000] SoC: Atheros AR9132 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 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-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x46c with crng_init=0

Meh.

Looks like I have to be more patient. :sweat_smile:

add a comment on https://github.com/openwrt/openwrt/commit/253095131d7b1a22d9a97cf81640bb3cacc941e4#diff-d19b20626cf3561ab899f4784aa9570d maybe it helps, so he can see that I'n not the only one

Ohh you tried that commit? Then I won't build it.

I'm just an end user, I don't have OpenWrt-fu to fix something like this. It's hard to understand these dts things for me. :blush:

the commit is already in the master, adding a comment that it is also not working for you could help for him to try to debug the problem.
when I worked on the target I always had this problem after I flashed the image, but when I ran the image from ram everything worked

1 Like

Hi,I am working on adding support for UBNT Toughswitch 5 POE.
Its relatively simple AR7242 based "switch" with 24V POE OUT on 5 ports.
Switch used is AR8327 and there is additional 100Mbit port built in CPU that is used as management port and even USB 2.0 port.

I got it to boot,but I cant get the built in 100mbit port to work at all.
Does anybody know how to configure initvals for AR8327?
I looked at the datasheet but values I found for other devices make no sense to me

hmm I have a problem with tplink-safeloader on 1043nd-v4
I'm trying to actually write an image to flash but I always get os-image partition too big (more than 1572864 bytes): Success and no image is created, somehow I ignored this before submitting, I only tested the device with initramfs
the command line executed seems to be the same as ar71xx

search the initvals in the match file

That wont do since the device is not supported in ar71xx and UBNT still hasnt provided me with GPL

ok, so you have 2 mdio none of them is working ?

Yes,that is correct.

Whats the size of kernel image for 1043 v4?
It could be that it does not fit in the 1536k assigned here:
https://github.com/lucize/openwrt/blob/ath79-1043nd-v4/tools/firmware-utils/src/tplink-safeloader.c#L782

ah yes is larger (~1581), I saw the source code but I always thought about the image size is not well calculated, I think is safe to grow it.. file-system has enough space

It would be good to set it to 2MB then it should be safe for a while

did you tried to use

	fixed-link {
		speed = <1000>;
		full-duplex;
	};

just to see if you have traffic ?
the leds are blinking ? swconfig dev switch0 show is showing that you have link ?
dmesg for libphy: and ag71xx
do you have the original dmesg with verbose enabled ?

anyway @juppin calculated the switch initvals with no sweat :slight_smile:

I used these initvals just for testing.

AR8327 is detected and swconfig showed link up when I connected to one of the ports.
LEDS were not blinking,but they should be connected to the switch and without good initvals they wont really work.

I dont have the original dmesg with verbose,gotta look into activating verbose for dmesg.
Maybe it has something interesting

so I changed like

{"os-image", 0x20000, 0x200000},
{"file-system", 0x220000, 0xd30000},

but is not booting

I used

tftp 0x80060000 firmware.bin
erase 0x9f020000 +${filesize}
cp.b 0x80060000 0x9f020000 ${filesize}
bootm 0x9f020000
## Booting image at 9f020000 ...
   Uncompressing Kernel Image ... Stream with EOS marker is not supportedLZMA ERROR 1 - must RESET board to recover

Why not simply use TFTP recovery?

first time I used sysupgrade from the old kernel, I'll try