Build for Fritzbox 4040, switch and LUCI working

Hi Thomas,

I have used your build openwrt-19.07.7-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin
and made the echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor into
System -> Startup -> Local Startup

I have now 4 VLAN's including the WAN Port!

Thank you very much it is working fine. :wink:

ChriWo

Hi Wolfgang,
here is my preferred way:

wget "https://downloads.openwrt.org/releases/19.07.7/targets/ipq40xx/generic/config.buildinfo"
copy/move to .config
make menuconfig
Target Profile, change from "Multiple devices" to "AVM Fritz!Box 4040"
Deselect "Build the OpenWrt Image Builder"
Deselect "Build the OpenWrt SDK"
Save & done

Short but important hint, snippet from my openwrt-19.07.7/target/linux/ipq40xx/base-files/etc/board.d/02_network

avm,fritzbox-4040|\
linksys,ea6350v3|\
linksys,ea8300)
	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
	ucidef_add_switch "switch0" \
		"0t@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
	;;

Software flow offloading can be found in Network --> Firewall

Cheers,
Thomas

Thanks Thomas, I will try :wink:

Found an issue when trying to install a "kmod"-package from the official repository , looks like my .config was too different.
New start from "https://downloads.openwrt.org/releases/19.07.7/targets/ipq40xx/generic/config.buildinfo", make, wait, sysupgrade and issue is gone.
New build and SHA256 sums are here:

openwrt-19.07.7-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin
https://drive.google.com/file/d/19t3dMOuvQ34ehMuXRMtj8zEgdWV4zCXF/view?usp=sharing
17CDFF74E2A1C1215E0E96EFE5BC8526640FA6D5108EBBB1A19F93E0F77B9C2C

openwrt-19.07.7-ipq40xx-generic-avm_fritzbox-4040-squashfs-sysupgrade.bin
https://drive.google.com/file/d/1AXEBYrjTfEWav7uWvk6tHKXy3TGFyK2m/view?usp=sharing
3D77B5BA46033A12E197A0F1265561419924331DF04E80CC7296B0F0EABEE890

Cheers,
Thomas

1 Like

Hey Thomas, after trying many days to implement a VLAN an my FritzBox 4040 i found this thread an it works! Many thanks.

Are you willing to do this magic kind of stuff with the latest firmware?

Hi Gustavoo,
I have a 21.02.0 build, and it basically works, not much testing done till now.
Your feedback would be welcome ...

openwrt-21.02.0-r16279-5cc0535800-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin
https://drive.google.com/file/d/1nWVNmS52qLAJAeXgxgHBoiIr2NgdmAw7/view?usp=sharing
4B51D00A9B5B27D6E99877AF595C46F0D1B20DC28C09A18FB46CBE23405FFECF
openwrt-21.02.0-r16279-5cc0535800-ipq40xx-generic-avm_fritzbox-4040-squashfs-sysupgrade.bin
https://drive.google.com/file/d/1pV5kX63IIgRhKkGSGP4l85bYLcti4c_U/view?usp=sharing
156189F97DB9208492E8F088458E47DCE92C7ABE29863B2E36485DD3BA486983

You could also have a look here:

Cheers,
Thomas

2 Likes

Hi Thomas,

I just got a new FB4040, ran into the same VLAN troubles, and just ended up having to go into rescue mode to pseudo-fix it. :expressionless: so, first of all, thank you for making this! Any chance of a 21.02.1 build, and perhaps a custom attendedsysupgrade URL for future builds? Also, since you're linking to that other thread, is the implication that these builds from over there should work directly on the FB4040? (I'm guessing not, but it's been a loooong time since I last used OpenWRT)

Also, one thing I noticed:

The MTU setting on this device seems to malfunction weirdly, at least with the official build. Configure an MTU of 9018, jumbo frames stop working. Configure no MTU at all, jumboframes work just fine-->wth?

Hi,
Here is my (untested) 21.02.1 build, just compiled but not flashed yet.
I never touched MTU size as I have no need for jumbo frames.
I've tried notengo's build, working fine, but for me, too much stuff inside.
In between he also offers a "slim" version of his build.

One question:
How did you manage to get into rescue mode on the FB4040 ?

Cheers,
Thomas

Update, now with links.

openwrt-21.02.1-ipq40xx-generic-avm_fritzbox-4040-squashfs-eva.bin
c6ab3eb4d986a3c2fa28bd0c91912b1c50ae6e780a8aa235dbc2d5e316f281b4
https://drive.google.com/file/d/1qi97F3OfxUkqFjo3NIsd5OBwbbz_3Iph/view?usp=sharing
openwrt-21.02.1-ipq40xx-generic-avm_fritzbox-4040-squashfs-sysupgrade.bin
af777584269730ae6dd11ae463d40734edb14238d8d9475f9df49a872b755f95
https://drive.google.com/file/d/1bEuQNfy6Xo3KUh38vW0p4Pc0ZoIzFvt9/view?usp=sharing

Thank you, but I think you accidentally didn't post the actual link? As for the rescue mode, I just followed the generic rescue mode instructions while guessing that the WPS button would be the one to accomplish the task, which it indeed was.

updated my previous post (now with links)

1 Like

I have this router with last official version of openWRT installed, 21.02.1 from the official builds to it.

I have found your post, and feel curiosity.

What are the advantages of your build over the official build?

Thanks

The only advantage is that you can configure VLANs from the GUI.

1 Like

Thank you, I am not using VLANS for now, as I don't need to separate traffic from different ports, just traffic from different wifi networks (at least for now, until I have a IOT device with no wifi interface and a ethernet interface). So it won't be of use for me.

Thank you for the answer.

Hi tomtom,
How you are building the new images for 21.02.1 to be specific how to handle the patch
"715-net-essedma-disable-default-vlan.patch" --> target/linux/ipq40xx/patches-4.14
patches-4.14 do not exist in 21.02.1 ...
Here you have patches-5.4?
Thanks for you help
ChrWo

Well I have finally created VLANS in the Fritz!bos in order to get separate guest, lan and iot networks.

It was a headache, due to the problem of not being able to change vlan in position 1 and 2 that is hardwired and turns the device unreachable until you reset it in failsafe mode.

I had not realized about that problem, I thought this built was only to be able to connect vlans to ethernet port.

I have solved it right now editing the network file and configuring the position of the vlans manually (which is different from the vlanid and which luci tends to use in position 1 and 2 even if vlanid is different).

Does this firmware solve that problem and let you configure vlans from luci without changing 1 and 2 vlan tables?

May I install it easily over the current openWRT 21.02 version conserving the config?

May I expect to see this solution integrated in the mainstream for this router in the near future?

The problem of installing it is that you won't be able to upgrade later when there are important changes in the main stream version.

Is it converted to DSA with separate lan1, lan2 etc ports or yet using eth0 switeches?
And the wan port?

Hi ChriWo,
for 21.02.1 you need this patch.

Cheers,
Thomas

Hi Fernando,
my build isn't using DSA but swconfig.
You can use any VLAN on any port (even 1 and 2)

Be aware that you MUST NOT keep settings as the LAN/WAN ports have changed.

LAN is now eth0.1 (was eth0)
WAN is now eth0.2 (was eth1)

Cheers,
Thomas

1 Like

Great.

I have now it working with the standard distribution.
I am afraid of changing something and being not able to get it to work.

But it sounds very interesting and it seems to solve most of the problems that this chipset had when using WAN port and VLANs.

Thank you to you and notengowifi for the work.

I hope we can see this in future upgrades.

I know that they are working on converting the ipq40xx architecture to DSA. Am I right to assume that this patch and therefore this custom build will not be needed anymore when it is commited? Pull request for DSA conversion