How to build "modern" (supported) version for OLD (4/32M) device?

Hi there,
I need to build quite modern (at least supported) version of OpenWRT for an old 4/32M device (TP-LINK MR3220).
I am ready to sacrifice (at least) whole IPv6 and PPP stuff, it is quite big and I don't need this.
For one of my devices I don't even need iptables, as it works as simple bridge (+usb storage).
But there are pre-built versions, but no option to select this device in versions higher than Chaos Calmer (and even this leaves ZERO free flash space).
I've arrived to build such version of Barrier Breaker, but I was told here that this is "deprecated and buggy". And it IS buggy, as I can have AP (WDS) + STA on MR3220 but this does not work on WR1043ND.
So question is HOW to build "modern" image?

There are 2 paths to custom images:

  1. Compiling from source
  2. Use image builder which essentially mounts and image loopback and allows you to add/remove binary packages.
    https://openwrt.org/docs/guide-user/additional-software/saving_space

One thing I'm not clear on is if image builder for 19.07.2 provides profiles for 4/32 devices.
Edit: Just checked my 19.07.2 image builder and it does not contain a profile for the TP-LINK MR3220.

If your definition of "modern" means 19.07.2 or snapshots, you may have to build from source.

Yes, I know I need to build from source, as "builders" are only 64 bit, and my system is still 32 bit.
But I need some step-by-step guide, especially adressing lack of MR3220 as build target in v18 and v19.
There IS .config somewhere, as there are ready-made builds for this platform.
Just need it as starting point.

And for me "modern" is "something to hwat I could receive support from community". Do not insis ton latest stable or development branch.

The link I provided has copy/paste commands. Looked a little more, the last supported release for your device was

72	TP-Link	TL-MR3220	v1	17.01.5
73	TP-Link	TL-MR3220	v2	17.01.5

The DD-wrt project has newer builds for your device. That might be the easiest.

Have you even looked at the source code?
Your device is in the ar71xx/tiny section ...
even in the current master.

https://github.com/openwrt/openwrt/blob/master/target/linux/ar71xx/image/tiny-tp-link.mk#L80

From menuconfig:


.config - OpenWrt Configuration
 ──────────────────────────────────────────────────────────────────────────────
  ┌───────────────────────── OpenWrt Configuration ─────────────────────────┐
  │  Arrow keys navigate the menu.  <Enter> selects submenus ---> (or empty │  
  │  submenus ----).  Highlighted letters are hotkeys.  Pressing <Y>        │  
  │  includes, <N> excludes, <M> modularizes features.  Press <Esc><Esc> to │  
  │  exit, <?> for Help, </> for Search.  Legend: [*] built-in  [ ]         │  
  │ ┌─────────────────────────────────────────────────────────────────────┐ │  
  │ │        Target System (Atheros AR7xxx/AR9xxx)  --->                  │ │  
  │ │        Subtarget (Devices with small flash)  --->                   │ │  
  │ │        Target Profile (TP-LINK TL-MR3220 v1)  --->                  │ │  
  │ │        Target Images  --->                                          │ │

But the 4/32 are rather unusable with master or 19.07. But 18.06 might still work for you.

Apparently the device (v1) can also be found in the DTS based ath79 target, which is the successor for ar71xx. It might produce slightly smaller image, but not sure about that:

  │ ┌─────────────────────────────────────────────────────────────────────┐ │  
  │ │        Target System (Atheros ATH79 (DTS))  --->                    │ │  
  │ │        Subtarget (Devices with small flash)  --->                   │ │  
  │ │        Target Profile (TP-Link TL-MR3220 v1)  --->                  │ │  
  │ │        Target Images  --->                                          │ │

EDIT:
Note that your main problem will in any case be the 32 MB RAM, which is going to be pain with the current kernels and supporting packages.

This may be considered OT, but I also have a 4/32 device (TL-WA801ND-v3). I'm using it as an Access Point to extend my WiFi (all PPP, firewall, WAN, DHCP etc is done by a TP-Link Archer C2 running OpenWRT).

Things I want:

  • IPv6
  • A web management UI
  • 802.11r Fast Transition (for devices moving round the house)

I've come up with a custom image build for 19.07.3 which seems to work fine, but I'd like a second opinion from people who know more than I do. I've stripped out firewall, iptables, dhcpd, ppp, dns, opkg, dnsmasq, and upgraded from wpad-mini to wpad (for 802.11r). The image builder command was:

make image PROFILE=tl-wa801nd-v3 PACKAGES="uhttpd uhttpd-mod-ubus libiwinfo-lua luci-base luci-mod-admin-full luci-theme-bootstrap wpad -ppp -ppp-mod-pppoe -iptables -ip6tables -kmod-ip6tables -odhcpd -odhcpd-ipv6only -opkg -wpad-mini -firewall -dnsmasq"

This seems to work ok, the image size is 3,473,412 bytes and I have approx 4MB unused RAM with 5 connected clients. I've disabled NTP, which freed up a little more RAM. The router seems pretty stable (about 10 days uptime so far), and performance is ok. I'm aware that I'm living on the edge, but other than that does it look like I've done anything silly?

Also, while I'm asking for advice, is there anything else I should be looking to remove?

TIA!

Timothy,

Looks good to me. Have you read this page with tips to reduce your image size further?

https://openwrt.org/docs/guide-user/additional-software/saving_space

Thanks - I did find that page very useful in coming up with the original list for my image builder command. The result (with 19.0.7.3) did provide a small enough image, but without the full wpad (only wpad-mini).

When looking for guides as to what else I could safely remove I also found this page on dumb access points and saw that dnsmasq and firewall can be safely disabled. This gave me the courage to customise the image further by removing dnsmasq and luci-app-firewall completely, which in turn left plenty of space for the full wpad.

If I kept wpad-mini I think I could bring my image down by another 128k or so, but then I wouldn't have fast roaming between my access points, which is a pretty big value add.

I guess my only worry now is that I possibly don't have enough memory available for reliable operation (not that I've seen issues so far). The cached (7MB) and buffered (2MB) memory seems pretty stable, and used memory has never reached 90%. The load average also looks reasonable, typically at the single digit percentage level.

1 Like