Port to AVM FRITZ!Box 3490

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

The files seem to be missing. You might need to forward-port my patches to a newer OpenWrt revision, my fork is already quite old - I'm not working on this anymore.

That said, looking at http://sources.openwrt.org, the file seems to have been renamed to QCA99X0-firmware-5-ct-full-htt-mgt-community-12.bin-lede.018 (at least, that's the sha256sum that your error log contains). I'd try to download it manually and put it into the download directory. The build system should find it an carry on.

It worked! Thanks..

I have added the 3490 to my fork as it shares the WASP image and most of the configuration with 7490.

2 Likes

In order to support the device, I have created a pull request, which needs testing. Please share your experiences.

1 Like

Any prediction about a stable working without DECT & ISDN version?

Thank you, I have seen that before folowing the links in this tread, that's why i wrote "without DECT & ISDN". I mean a stable release in Table of Hardware, eazy for me to install.

In the hypothetical case that the PR is merged into main today, as-is, it will feature in the next major stable release (e.g. 24.xy.0, not 23.05.3).

Keep in mind that the 3490/ 7490 will never be 'easy', as you will have to download the ath79 initramfs-like image separately, after flashing the corresponding lantiq image first (at least if you'd like wlan support).

1 Like

This is good, because when I try to compile the Lantiq Image an add Luci it throws lots of errors:
WARNING: Makefile 'package/feeds/luci/luci-theme-openwrt/Makefile' has a build dependency on 'luasrcdiet/host', which does not exist

In the old fork from Andreas are many deps missing....i can only compile the basic image, but cannot get luci (after opkg install luci or wireguard) running.