22.03.3 tiny official(!) imagebuilder configuration for 4/32MB devices (ath79, TL-WA860RE v1 etc.), using ramdisk extroot

What is this?

As you might have experienced, OpenWRT 21+ tiny official builds don't fit on 4/32MB devices. Last easily fitting builds are 19.07 series.

But with help of simple ramdisk extroot setup, it's possible to keep at least thousands of older devices alive and well, mostly unattended like before, with at least 22.03.3, and probably for many releases to come :tada:

Source: https://github.com/lkraav/openwrt-files

This solution is a simpler version of Extroot using (z)ram drive with the backup&restore option over NFS share, much thanks to @faruktezcan and other hard-working forum members, for figuring out the heavy lifting part of ramdisk extroot initialization.

How it works

My use case is to continue running simple wireless APs on these TL-WA860RE v1 devices, but you can install a quite a lot of other types of functionality before you run out of RAM. luci-ssl (using WolfSSL, at least) unfortunately gets oom-killed during install.

  • Uses official imagebuilder: no need to maintain our own buildsystem (for now), and package feeds,
    :point_up: ...all official packages are immediately installable :muscle:
  • Builds a minimal "wired-network"-only image to boot, and connect: this still fits fine on probably most 4/32MB devices see configuration
    :point_up: ... to fit into flash, we exclude firewall, wireless, and some other usual suspects (but big bad WolfSSL fits!).
    :point_up: ... we include simple ramdisk extroot scripts: ram-root.sh, rc.local
  • On boot: TL-WA860RE v1 has about 13MB free RAM available, plenty of room to work with,
    :point_up: ...rc.local detects connection via ping, downloads and installs whatever you need.
    :point_up: ... in my case kmod-ath9k, wpad-basic-wolfssl.
  • If your device is rarely powered off, download-install-on-boot overhead is near-zero.
  • PROFIT :moneybag:

Let's keep electronic waste down. Let us know here if you saved a few devices with this!

Feel free to post bug reports, enhancement ideas here, or on GitHub Issues.

2 Likes

Firewall…what exactly do you want to use the router for?

You could also just install a complete ramfs image if you do it like this. Everything works until the power is interrupted or you reboot for some reason.

If you include default configs.

You can manipulate the configs as usual in ramfs images also. But you can’t reboot to load them, you need to reload every system by them self.

1 Like

After running ram-root, if there is enough space left on the old overlay drive ( /old_root/overlay ), it is possible to save newly created config file(s) by using <tar.gz> format. So that, the router can keep config files after reboots. If you are interested please pm me.

1 Like

great work - I think this can bring a lot of benefit to the community !
maybe both of you @lkraav and @faruktezcan can work together and implement this tar.gz config saving because as I understand now all config is lost on poweroff/reboot

2 Likes

Yes, one of the TODOs is to sync updated config into /old-root, thanks for the reminder.

:point_up: "My use case is to continue running simple wireless APs on these TL-WA860RE v1 devices"

My firewall is on the gateway, which is not a 4/32MB device.

Not entirely sure what "complete ramfs" image means here, but we want a certain amount of static storage space to persist configuration changes.

Since this modern D-Link DAP-X1860 is sold for anywhere from 15 - 25 € right now, this retrofit project can pretty much be retired.

It still works, but if you install too much, things can start OOM-ing.

I replaced all my old TP-Links with DAP-X1860-s now. Flashing is super simple, and everything works ootb :tada:

Source: OpenWrt Support for D-Link DAP-X1860