Port to AVM FRITZ!Box 3490

great! thank you and for the quick responses and explainations!!! i'm so happy to have a working openwrt on fb 3490! so much better than 3370 in performance. will test LAN now.
about the wifi LED: maybe it can be linked to the wasp eth port on netdev level? i will check that.

You're welcome - I'm happy for any improvements! Did you or will you also test VDSL?

VDSL immediately worked out of the box!
everything is working fine so far.
now i hope your patches will work on each openwrt update.

Great, I've never tested that either.

Hard to say, let's see - as a first step, I'll port the required patches to the 5.4 kernel which is currently in testing (shouldn't be too difficult).

Hey,
i searched for a working openWRT firmware for the 3490 and google brought me here...
u got it working, can you upload it for me? that would be awesome!

greetings

I don't know exactly who you are addressing, but: If you read through this thread, you get a more-or-less-complete guide on how to compile and install yourself. @DocMAX said he will prepare a step-by-step guide once he sorted everything out, so you might just have to wait a little.

Source Code: https://github.com/andyboeh/openwrt/tree/avm_fritz3490 and https://github.com/andyboeh/openwrt/tree/avm_fritz3490_wasp

Depending on your level of knowledge, I suggest the following as reads:

Im very sorry, its like a different language to me, i dont want to be disrespectful or something but i tried and i dont even know where to start.
I need a guide for "dummies"

But i know how to flash a firmware if i have the file :smiley:

i guess why i cant make it work is because i have only a win os and the firmware builder doesnt support it?

forgot to reply directly to your message

No worries, I'm subscribed to the thread and get notifications anyway.

Sorry to say that, but: that's definitely not enough. We are talking about a device which is not even in snapshot state. Some things haven't been tested extensively (most things on exactly two devices, mine and @DocMAX's).

Anyway, I created a short wrap-up on my website. Please note that the instructions have not been tested, but you should get a rough idea on how it works. Please drop me a line if something doesn't work as expected:

2 Likes

and for the lazy ones like me: here is my build (with my custom config)
https://www.file-upload.net/download-14105886/openwrt_firtzbox3490.zip.html

if you like it please drop the openwrt developers a line to make it official. if there is more interest then we could move something.
all credits go to andyboeh.

@andyboeh
do you have a documentation of all gpios? i'd like to add the red info trigger.
and is there a limit to the wasp image size? i get a segfault if bigger than about 6mb...

edit: never mind, i just read the specs "8MBit Flash".

It's convenient if somebody provides images, but IMHO it's not a good idea to flash a random image from the Internet - especially, if it contains a custom config.
Edit: There is no license specific to the ath_tgt_fw1.fw file that I could find. Since it is included in the AVM firmware, I assume we do not have the necessary rights to redistribute it.

Yes, the DTS :slight_smile: The GPIO information is from the GPL release from AVM. Are you sure there is a red Info LED at all?

This has nothing to do with the 8MBit Flash. The 8MBit refrer to the SPI flash that is used to store the bootloader and some other necessary files. The maximum image size is mostly determined by the amount of RAM available to the WASP, the load address of the image and the execute address. If it doesn't fit, it will not work.

Do you get the segfault on the Lantiq? If yes, then it's a bug in the stage2 firmware uploader.

  1. yes, you can see the red info flashing for a short moment when you start the device.
  2. ok, then the segfault comes from the loader. maybe you can do something about it?

the config is almost openwrt default. just a few additions like tcpdump, iftop, htop, mc....
fingers crossed not being jailed for the "ath_tgt_fw1.fw" file

i'm still on thinking how to make wlan led work. there is a port_mask option available in the network switch section, but that doesnt work on specific ports :frowning:

Hm, I never noticed that. The power LED is defined in green and red, but the Info LED isn't. I suggest you check the AVM tarball if it's defined at all and add it to the DTS. If it's not defined, then you need to figure out the GPIO.

I'm happy to accept patches - the 3390 and 3490 are of rather low priority for me.

Of course it does work on specific ports, this is how the LAN LED is configured! However, it will be constantly lit because the port is configured as a fixed link node and the link state does not change based on the status of the WASP.

could you help me with github please?
what are the commands to merge your commit with the latest master (first with the wifi kernel, then with the lantiq, all in one directory)?

I'm sorry, I'm not very proficient with git (I prefer other tools) and always have to look it up either. Usually, I consult the "Syncing a fork" document from github (https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork).

hi again andy,

since the openwrt guys switched to kernel 5.4 there is an issue loading WASP. can you have a look at it please?

root@router:~# /opt/wasp/upload-wasp.sh
Working on AVM FRITZ!Box 3490
AVM WASP Stage 1 uploader.
Using file     : /opt/wasp/ath_tgt_fw1.fw
Ethernet device: eth0
Checksum       : 0x5bba6771
SIOCGMIIREG on eth0 failed: Not supported
Error: WASP not ready (0x0)
AVM WASP Stage 1 uploader.
Using file     : /opt/wasp/ath_tgt_fw1.fw
Ethernet device: eth0
Checksum       : 0x5bba6771
SIOCGMIIREG on eth0 failed: Not supported
Error: WASP not ready (0x0)
AVM WASP Stage 1 uploader.
Using file     : /opt/wasp/ath_tgt_fw1.fw
Ethernet device: eth0
Checksum       : 0x5bba6771
SIOCGMIIREG on eth0 failed: Not supported
Error: WASP not ready (0x0)
AVM WASP Stage 1 uploader.
Using file     : /opt/wasp/ath_tgt_fw1.fw
Ethernet device: eth0
Checksum       : 0x5bba6771
SIOCGMIIREG on eth0 failed: Not supported
Error: WASP not ready (0x0)
AVM WASP Stage 1 uploader.
Using file     : /opt/wasp/ath_tgt_fw1.fw
Ethernet device: eth0
Checksum       : 0x5bba6771
SIOCGMIIREG on eth0 failed: Not supported
Error: WASP not ready (0x0)
Error uploading stage 1 firmware

Seems like you didn't port the patch for enabling userspace access to the MDIO bus. You need to port at least two patches to 5.4:
target/linux/lantiq/patches-4.19/2001-NET-MIPS-lantiq-add-mdio-ioctl.patch
and
target/linux/lantiq/patches-4.19/2000-NET-MIPS-lantiq-support-fixed-link.patch

If they already switched to the DSA driver (IIRC this is WiP), then you'll have to reimplement it for the mainline DSA driver.

I won't have time to look further into it for quite some time (in the order of months), sorry!

Hello.
Compiling ath79 target doing:

git clone https://github.com/andyboeh/openwrt openwrt_ath79
cd openwrt_ath79
git checkout avm_fritz3490_wasp
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make -j1 V=s

To have:

bin/targets/ath79/openwrt-ath79-generic-avm_fritz3490_wasp-initramfs-kernel.bin

I got errors:

time: package/kernel/ath10k-ct/regular/compile#0.60#0.47#1.02
make[3]: Entering directory '/home/luca/Videos/FritzBox_3490/openwrt_ath79/package/firmware/ath10k-ct-firmware'
mkdir -p /home/luca/Videos/FritzBox_3490/openwrt_ath79/dl
SHELL= flock /home/luca/Videos/FritzBox_3490/openwrt_ath79/tmp/.QCA99X0-firmware-5-ct-full-htt-mgt-community-12.bin-lede.018.flock -c '  	/home/luca/Videos/FritzBox_3490/openwrt_ath79/scripts/download.pl "/home/luca/Videos/FritzBox_3490/openwrt_ath79/dl" "QCA99X0-firmware-5-ct-full-htt-mgt-community-12.bin-lede.018" "e9737538d7379e13ad4e4c8c519a63659b5e34a35455ed9ac4399ae8097caabc" "firmware-5-ct-full-htt-mgt-community-12.bin-lede.018" "https://www.candelatech.com/downloads/ath10k-10-4b"    '
+ curl -f --connect-timeout 20 --retry 5 --location --insecure https://sources.cdn.openwrt.org/firmware-5-ct-full-htt-mgt-community-12.bin-lede.018
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 
Download failed.
+ curl -f --connect-timeout 20 --retry 5 --location --insecure https://www.candelatech.com/downloads/ath10k-10-4b/firmware-5-ct-full-htt-mgt-community-12.bin-lede.018
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  548k  100  548k    0     0   341k      0  0:00:01  0:00:01 --:--:--  341k
Hash of the downloaded file does not match (file: b6e3cb99adfd66c3d60c9aca1644ba7470a9e3ede7a8e089bc288cc3eac27a4a, requested: e9737538d7379e13ad4e4c8c519a63659b5e34a35455ed9ac4399ae8097caabc) - deleting download.
+ curl -f --connect-timeout 20 --retry 5 --location --insecure https://sources.openwrt.org/firmware-5-ct-full-htt-mgt-community-12.bin-lede.018
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
Download failed.
+ curl -f --connect-timeout 20 --retry 5 --location --insecure https://mirror2.openwrt.org/sources/firmware-5-ct-full-htt-mgt-community-12.bin-lede.018
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404 Not Found
Download failed.
No more mirrors to try - giving up.
make[3]: *** [Makefile:141: /home/luca/Videos/FritzBox_3490/openwrt_ath79/dl/QCA99X0-firmware-5-ct-full-htt-mgt-community-12.bin-lede.018] Error 2
make[3]: Leaving directory '/home/luca/Videos/FritzBox_3490/openwrt_ath79/package/firmware/ath10k-ct-firmware'
time: package/firmware/ath10k-ct-firmware/compile#0.53#0.31#2.69
make[2]: *** [package/Makefile:113: package/firmware/ath10k-ct-firmware/compile] Error 2
make[2]: Leaving directory '/home/luca/Videos/FritzBox_3490/openwrt_ath79'
make[1]: *** [package/Makefile:107: /home/luca/Videos/FritzBox_3490/openwrt_ath79/staging_dir/target-mips_24kc_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/luca/Videos/FritzBox_3490/openwrt_ath79'
make: *** [/home/luca/Videos/FritzBox_3490/openwrt_ath79/include/toplevel.mk:220: world] Error 2

It look like files aren't there anymore or sha256sum is different?
Why is that?
Can you help
Thanks
PS: Do I have to change the sha256sum HASH in Makefile?
PS: Also before I got another error for mksquashfs fixed with a patch

Fixes the following build error with GCC 10:
	/usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition of `swap'; mksquashfs.o:(.bss+0x1b2a88): first defined here
And a compile warning.

Fixes: FS#3104, FS#3119
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 1bbc1aa)

Can you help for the ath79 target (read above)
Thanks

Can you help for the ath79 target
Thanks