Advice for minimal openwrt

So I am the unfortunate owner of 8/64 device TP-Link Archer C50. Ran owrt without issues for 6 months but I ran out of jffs storage and can't do anything.

I plan to build custom firmware, without luci, fw4, without anything. Only dnsmasq, nftables, wireguard, vxlan and wifi related stuff. Any advice how to maximize free space? I would like to run Tailscale on it.

Getting new hardware is not option right, so I will have to make my way around limitations of tp-link.

Thanks.

This thread might be of help: Tiny 4MB openwrt v23.05.4 ath79/ath9k dumb AP, +WPA3, +luci-ssl, -dnsmasq, -firewall

Thanks. I haven't tried building anything yet, but how do I know after the build complete the amount of free space will be available after flashing?

Is this your main router? Or some device behind an existing router?

1 Like

Main router, yes. The other device is ISP-provided huawei ONT that I turned into bridge mode.

1 Like

You cannot eliminate the firewall if this is your main router. It would be both nonfunctional for your network with IPv4 and also dangerous for the router and for your devices over ipv6.

3 Likes

What? fw4 is just nftables generator. I can write nftables myself

In a first interation I would argue to not compile everything on your own but start with "just" the image-builder.

To get a feeling how large the .bin-file is, have a look at the sysupgrade file. And I think its somewhere printed in the make output...

Do you really need "tailscale"? How huge is their binary?

And of course, if you compile by yourself you can disable a bunch of software features where you know that you definitely wont need them. And I heard about tuning how space is claimed in the overlay fs to squeeze out some kB.

You haven’t even said what kernel you are aiming for?

If you are actually going to do this hardcore you must do it from source code. Everything in imagebuilder is already built so you can’t change anything and truly never include it in the basic image in imagebuilder.

I wasn't sure at first how much you want to strip down.
Years ago I've seen people using 2 MB including a routing daemon, just because they could, and over time they got themself in a competition. And yes, if you aim for that, you need to compile from source, because just removing packages wont hit it any longer.

How large are you current builds?

I don’t even care to be honest, it is just a waist of time to make these experiments work. And then what?
Kernel 6.12 is already coming and that would traditional require even more than 6.6 which was more than 6.6 and 5.15.
Even if you remove all these packages, the storage volume for the packages is still only in kB range while the kernel itself is in multi MB range.
So these “minimal experiments” only shift time a couple of months until the bottom line comes around and the device must be replaced anyway.

1 Like

You strip down features of course.
How large is the Kernel alone these days?

Note, Tailscale Mesh VPN can be built without installing Tailscale on the Router.
Tailscale can be installed on a LAN device and perform the Exit Node and Subnet Route functions.

This is a valid point, the TP-Link Archer C50 v4 only has 64 MB RAM and 8 MB Flash.

Tailscale alone needs more than 8meg

Read my second last post.