With the image builder i followed 4/32 reduction instructions, as per wiki page on that topic. That never produced a binary.
Compiling i just remember picking up a few configs from the forums. None produced a binary.
Then i starting slashing and it would still not compile. Until at some point i took out too much of busybox (all other candidates were gone) and that didn't boot. So i gave up and tossed the whole thing.
19.07 can not be compiled, as the commit for v14 never got back-ported (another good developer task).
I also tried compiling at the commit (which i found somewhere in the forum) but the feeds did not work (and i did not know how to work around that). The original commiter obviously got it to compile at the time but i don't know how to now. (another good candidate for a developers touch)
All in all it is a very weird edge case. I have seen other 4/32 devices with snapshot links, but v14 does not have anymore (even forms still link to non-existing snapshot downloads, so they must have existed)
what does your routers need or will do? like i said, pppoe is a good candidate and/or firewall etc etc. but without the requirements its hard to make any good suggestions what can and should be striped.
That was a line from a movie. It was not intended to be personal. I apologize for it.
Version 21 brought a large increase in binary size by including libwolfssl (1.08 MB uncompressed) by default. The two packages that depend on libwolfssl are wpad-basic-wolfssl and libustream-wolfssl (which is used by uclient-fetch, also known as wget). Remove all of those, substituting wpad-mini with no SSL --which drops WPA3 functionality. hostapd-basic may be even smaller if you will never be needing wifi client capability. Also remove opkg if you haven't already. This is in addition to the usual removals of LuCI, everything related to ppp, and everything related to IPV6.
If you select v13 you will get a binary-- which you can't run, but you can see the size of the sysupgrade file to check how close it is to fitting in 4 MB flash to build the same thing for v14. I think it will need to be smaller than 4MiB minus eight 64 KiB blocks that are used for other things (bootloader 2, factory partition 1 and five free to build a jffs2 filesystem).
@maurer Thanks for chipping in. Did i find these binaries in some other thread already? (those bricked my device)
I am curious (before trying) how you obtained/compiled v14 code for 17/18 version of openwrt. As the v14 commit was after 19.07.
(I'll try and follow mk24 now and see again if there is still a chance to build this "beast")
So i am setting up the compile again. Good idea with the v13 hack to check. Unedited i start at 4.719.421 bytes.
Both tp-link official firmware and were around 4.2500.00
I'll start cutting. But some questions come up:
by removing you mean actually editing Makefile to remove ufetch and libustream-wolfssl from the Makefiles. or is there a way to do this (going below default) by just menuconfig?
V14's tftp won't allow v13 images - hex editing it might work though
As for my binaries I've applied the patches to my tree see github.com/maurerr/openwrt
Good news: without ssl imagebuilder can build an image. Even better, luci fits in. (EDIT: this image does not retain data, see below)
Not so good: that means no encrypted wifi, kind of a deal breaker for me. But the device can be used as a simple vlan switch, which for the 10 euro is ok.
I tried again to build with menuconfig and got nowhere (ok because i like the imagebuilder).
With using v13 trick i could get to within 10k, but not closer
Adding back wpad-mini or wpad-basic or hostapd-basic all support WPA2 (but not WPA3) and do not require a SSL library.
On the other hand, the build you made still includes a lot of packages that are only needed for wifi (iw, iwinfo, cfg80211, kmod-mt76, etc.) which could be removed when using the router in a wired only role.
@maurer I can confirm that. Unfortunately the device does not hold information (even just a password) with an image like that.
That was probably the case with my first image too.
@mk24 Removing those wifi modules makes the device usable (ie it holds its info), thanks
Just for completeness, here is my command line: make -j17 image PROFILE=tplink_tl-wr841n-v14 PACKAGES="-ppp -ppp-mod-pppoe -uclient-fetch -kmod-ip6tables -ip6tables -odhcpd-ipv6only -libip6tc2 -wpad-basic-wolfssl -kmod-ppp -kmod-pppoe -kmod-pppox -opkg -libwolfssl -firewall -kmod-ipv6 -odhcp6c -libustream-wolfssl -odhcpd -iptables luci-base uhttpd -dnsmasq -urngd luci-theme-bootstrap luci-mod-admin-full -iw -iwinfo -cfg80211 -kmod-mt76-core -kmod-mt7603 -cfg80211"
The sysupgrade is 3474221 bytes, pretty good.
Possibly (maybe?) the open wifi can be made to work. But i am not working without GUI anymore.
For me this makes a 10e device a vlan managed switch (40e) and even it only has 100Mb, for my IOT network this is ok. I'll use stock firmware on the AP's (behind the vlan switch) and conclude this experiment.
Thanks everyone
@maurer I did flash just to see if this really could be done. Alas, it does not boot
I tftf'd the kernel over, even made sure with wireshark that it got there, but then only flashing leds, no response. Maybe you can link your config to see what could be the issue.
I'll try again if you want, i mean it would be a bit of a miracle.
PS: i don't fully understand this initial tftp and then sysupgrade, but it is what i did with my own images, even the ones i said are not keeping data.
Well, first impressions are GOOD. configured it like normal, with vlans and 2 ap's and seems to be holding up. That make you @maurer some kind of code wizzard, and if i can send you a voucher or coffe say where!
I looked at the config and can't say i understand where that amount of saving comes from. I mean i was relatively close to getting luci in there. But half a meg less and did i see firewall and dhcp (and even remnants of ip6). Which all can go imho.
I'll post is problems occur later, but otherwise i must say this far exceeds expectations
Great to see it s working. Saving come from kernel striping . Did you rebuild the image or used my builds? Just want to confirm it's working as I don't have a unit to test it anymore
I started with yours. They seemed to work, i only ran it for an hour.
Then i recompiled and switched dnsmesg and dropbear off. Couldn't switch off firewall and didn't bother with ip6.
The result was 30k smaller (insignificant) but had several Mb more RAM available, so i kept with that and flashed already 12.
Thanks again man. That is really magic (in the definition of so complicated it may as well be). If you want to do some wizardry on Archer C50 v6 (unstable wifi) just say the word I have 6 of those.
Thaks for the confirmation.
Again glad it all worked out. Unfortunately can't help with the c60v6
V14 was an "old aquintance" so it was somehow easy to deal with it