OpenWrt 21.02.x ath79 tiny LuCI

You may keep more space by:
Disable dropbear scp: no need to upload anything FROM router to somewhere else

Actually the dropbear may be removed and instaed used used plain old telnet. Then you can't upload files via scp but this is probably not needed.

Instaed of uhttpd (40kb) may be used busybox httpd (8kb) see a forum topic here with my research.

Opkg may be better to include

I upgraded wnr612v2 to your 19.07.7 (from ssh) but after any reboot cofig goes to default. If i try to use 21+ versions then luci dont start in web.

Can you help me to fix it?

Sorry, I haven't tested it with this device, but there is no reason why config should be forgotten. Try to flash again without keeping settings. If that doesn't help, try an older build.

I already tried keeping/non keeping, flashing back to factory, flashing from ssh and almost all combinations - nothing happens. I think file size too big. Your 19 and 21 sysupgrade.bin have almost same size 3 605 300 bytes. I tried 19.07.8 from table of hardware - have same issue, size even bigger. Now im using 19.07.8 from another author (size 3 473 541 bytes) and everything good, but there is no fast roaming that i want.

Can you try to lower package size?

Unfortunately, all I do is try to lower the package size, but the current versions are just too big to fit into 4MB ROMs. Sizes are fixed to fit various devices and if it is too large even compressed, the firmware file fails to build for that device. Coming to 21.02.1 it has become a problem for many devices, that were built fine before.
I can't lower the size while trying to keep LuCI, use the older versions that do work for you.

Im using 19.07.8 with sysupgrade size 3 473 412 from here. Works perfect but there is wpad-mini only. Please, can you try to do almost same size with wpad-basic?

And here is what i found:

Customization and Building Your Own
I won't be providing customization for these builds, as there is very little flash space for any additional packages. If you create your own build any firmware file much greater than 3.31MB (as reported/measured by OpenWRT immediately before flash) is likely too large and will cause a bootloop and/or will not preserve settings upon reboot.

@Monolith Sorry, I don't have original build configuration to be able to switch it easily and try to build with wpad-basic.

OpenWRT 21.02.2 tiny builds released.

I tried to replace uhttpd with busybox-httpd as stated above by @stokito, but webserver wasn't configured and service didn't exist. I'll try to avoid unencrypted telnet as long as I can.

1 Like

Yeah, I wanted to create a feed with it but didn't finished yet

in latest owrt release dropbear takes 215128 uncompressed, I remember it previously took more place. So I guess not a big deal anymore.

@Ashus: Thank you very much for your great work. Is it possible that you could add tplink RE450v1 to your build list ?

Best regards, Thomas

No need, this device has 8MB flash, there is official build available.

I would like build firmware (tiny) to use 4mb flash devices. Such as Tl-wr 740 851 940 in mesh or roaming. Do you have nay suggestion?

Im using all these devices with your shared firmware

@nguyendj Follow official guide, use my configs as default.

OpenWRT 21.02.3 tiny builds released.

2 Likes

I'm looking for an Openwrt version for the TP-Link TL-WA801ND V2.
Any change for this device?

Sorry, it looks like your device was not ported from ar71xx target to ath79 and the SOC differs from v1. The latest compatible version is OpenWRT 18.06.9 and that will probably be the end of it.

Out of curiosity did you try your tricks on 22.03?

I did try and I failed.
Latest 22.03 branch uses nftables instead of iptables. Even when I removed most things, that could be missed, I'm about 316 kB short of compressed image space. I'm sorry to say it, but those 4MB devices will have to stay on OpenWRT 19 or 21.

3 Likes

@Jack007 Try my build for your device as target ar71xx from here.

1 Like

@Jack007 Try my build for your device as target ar71xx from here.

Updated 2 devices and they work as expected.
Many thanks.

1 Like

This is just brainstorming, and somebody probably already thought of this, but perhaps experimenting with DwarFS as it seems capable of getting smaller sizes than squashfs+xz when used at higher compression levels, though it might have issues running in embedded environments, but it might just be good as a test if under ideal conditions, things could get smaller. Also their readme is a wealth of comparisons with different compressed filesystems and parameters.

Also for squashfs there is (-b) and other parameters in the mksquashfs step which I believe is either common-netgear.mk or image-commands.mk or using an out of tree state of the art version from plougher/squashfs-tools if it is not the same, and try zstd, xz, etc as they are supported by the kernel 4.14.

I believe xz has filters for text and for executables so it can be tuned towards such, but no idea if they are applicable to MIPS or if that functionality is accessible by the mksquashfs command, if it is, then sorting the files based on text/executable might gain a few more kilobytes as well.

Lastly upx, the ultimate packer for executables has a mips stub, if it works it would probably compress executable better than any squash/dwarf/etc filesystem could as it is highly tuned. for best compression results try 'upx --brute program'. , this approach might lend dozens or hundreds of kilobytes if successful. There are some issues tickets involving compressing .so files with the devel branch and maybe other things, so might have to use a stable or older version.

Maybe one of the ideas above can shave off the difference. Though if even something heavyweight like DwarfFS can't do it, then it is likely the other filesystems meant for embedded stuff would be unable to and if upx doesn't bail things out is gameover, unless there is some yet again experimental compressed filesystem out there that is better. But if it does work, then I'd imagine the next step is to see if it can be decompressed with 16mb of ram and that the kernel flag/patches for the algorithm is enabled.

1 Like