Compile an Image with SQM for TL-MR3420

I once managed to build and Image using image builder, removing a couple of packages that seemingly I did not need.
I have an TL-MR3420 with Open Wrt 15 on it.
Now I want to do it again but with a new version to get aditional sqm scripts.

I use luci on it because I get confused with the command line stuff. But I know without it I could get a bit more space.
From what I understand, if I could manage to install usb packages then I could use a usb stick to add more memory to it.

Will I then be able to install all the packages I need?

Any other suggestions or critic is welcome.
Sorry if I forgot something or formated my post incorrectly.

Theoretically. That's a 4/32 device, so don't expect much help around here. If you still want to run a recent version of OpenWrt on it, you're basically on your own. According to the extroot wiki page, it's not possible, even using the image builder (not enough space on 4 MiB devices for the required packages).
That said, I heartily encourage you to do your own builds. Learn how to do everything through SSH and forget about LuCI.

From the extroot wiki page

The only way to go for these devices is to rebuild a firmware image with the right packages using the Image Builder.

Wouldn´t that mean that it is possible?

That said, I heartily encourage you to do your own builds. Learn how to do everything through SSH and forget about LuCI.

I will, when I get home I´ll get bac at it again trying to achieve my goal.
Thanks

Also from the wiki: "Sadly the package e2fsprogs with the tools for ext4 filesystem is too large to fit in 4 MiB devices. If someone can split the mke2fs and the filesystem checker tool from it, we can adjust this tutorial to use ext4."

If I understood correctly that is only to format the usb drive, but you can still get the extroot to work.
Without that package I would have to format the drive some other way.

Then you will have to format the USB drive with ext4 filesystem, and to do that you will need to use a Linux LiveCD or gparted disk.
Sadly this is inconvenient but as said above we cannot fit formatting tools in devices with 4MB of flash

OK, in that case it should be fine.

You'll get advice and support on 4/32 devices, but the project is effectively no longer providing code changes to support them, or, starting in 2020, no further builds. Not only is the 4 MB flash a problem, but 32 MB of RAM is no longer sufficient for stable operation with current Linux kernels and a minimal set of running applications.

My first suggestion would be, if budget permits, purchase of a decent-quality router with at least 16 MB of flash and at least 128 MB of RAM. They start around US$20, delivered. As I don't own one (yet, I just ordered it), though I have been impressed with their other units, the GL.iNet MT300N-v2 is about 2"x2"x1" and a MTK 7628NN running at 580Mhz. Though I haven't tested the MediaTek (MTK) MIPS-based SoCs (hence why I just ordered one), the performance of a 650 MHz QCA MIPS-based SoC looks like it should be able to handle close to the 100 Mbps limit of the Ethernet phys.

If you've got an earlier version (v1.x) with a 400 MHz SoC, I'd recommend upgrading even more strongly. Performance falls off faster than CPU speed as there are "fixed" things that consume CPU cycles other than just routing/NAT/SQM.

With a v2 version, if you want to stick with it, you absolutely should upgrade to OpenWrt 18.06.05, preferably 19.07 and the ath79 platform (ar71xx is deprecated, hasn't seen a lot of changes since 18.06, as will not exist after v19). There are far too many well-known, severe, actively exploited security vulnerabilities in older kernels, third-party firmware, and even the 802.11 protocols themselves.

With a 4/32 device, LuCI is not only problem for image size, but also RAM consumption. "extroot" can't help with that. It seems to me to be "crazy talk" to run swap on a USB stick with a write speed around 5-10 MB/s.

Keeping a 4/32 device running basically depends on stripping down to absolute minimums and building your own images, either from source or assembling it with pre-compiled packages.

https://openwrt.org/tag/low_flash?do=showtag&tag=low_flash

2 Likes

Swap on zram will help a bit (won't do any miracles, though). And it would be much better if discard was enabled (swapon -d), since it provides some really nice semantics on zram (the RAM backing discarded blocks is immediately returned to the kernel). Maybe I should post about this on the developers section…?

I am home now.

With a v2 version, if you want to stick with it, you absolutely should upgrade to OpenWrt 18.06.05, preferably 19.07 and the ath79 platform
Super noob here, maybe getting in over my head.
So I navigate to https://downloads.openwrt.org/releases/19.07.0-rc1/targets/ath79/generic/ and will download the Image Builder

Then I will follow the guides to make a super compact image with only the basic packages so I can instal sqm-qos package.

First time I won't use luci so I'm already getting nervous.

1 Like

Once you get your config set, you can remove LuCI and all its dependencies and get back the space (since they are on the overlay and not in the ROM).

Lots of help here to answer config questions if you decide to edit them by hand.

Another package you might want to install is the nano editor, which is a lot easier to learn than is vi. Eventually I figured out the four or five commands I needed for vi, so I use that now. The critical one is

[escape-key] : q ! [return-key]

which is "quit without saving" I use that one a lot! :wink:

Nooo! On a 4 MiB flash device, nano is huge! Just Learn vi™. :no_mouth:

Edit: nano itself is not so big, but it depends on libncurses, which is quite chubby.

What I have done so far
Downloaded imagebuilder
Ran this build
make image PROFILE=Default CONFIG_IPV6=n PACKAGES="-ppp -ppp-mod-pppoe -ip6tables -odhcp6c -kmod-ipv6 -kmod-ip6tables"

Now in openwrt-imagebuilder-19.07.0-rc1-ath79-generic.Linux-x86_64/bin/targets/ath79/generic/
i have all the images but no default one

What am I doing wrong?

That looks fishy. Try make info first, you need to select the correct profile for your router. Also be aware that the ath79 target is the correct one, it's most likely still ar71xx!

1 Like

I was trying to make a image using the ath79.
Got the correct imagebuilder now
https://downloads.openwrt.org/releases/17.01.6/targets/ar71xx/generic/

make image PROFILE=tl-mr3420-v2 CONFIG_IPV6=n PACKAGES="-ppp -ppp-mod-pppoe -ip6tables -odhcp6c -kmod-ipv6 -kmod-ip6tables" 

Now I got this as a result
lede-17.01.6-ar71xx-generic-tl-mr3420-v2-squashfs-sysupgrade.bin

Now I should be able to upgrade for 15 to 17 using this, right?

No, wait, that's LEDE (OpenWrt 17.x). Try the OpenWrt 18.06.5 image builder instead.

Just checked and master has target/linux/ath79/dts/ar9341_tplink_tl-mr3420-v2.dts, however openwrt-19.07 does not.

Given that ar71xx is deprecated and ath79 is not available on 18.06, my personal choice would be to move to master ("snapshot").

Yeah, but you know what you're doing. Baby steps. He's still on Chaos Calmer… :wink:

Exactly, everything is not a simple sysupgrade away from Chaos Calmer. At least in my opinion, since you're going to have to move to ath79 anyways (no "serious" work done on ar71xx in many months), might as well go there directly rather than have to reconfigure manually when moving from ar71xx/v18 to ath79.

Still, master is not for the faint-hearted. How about 19.07?

No v2 support.

Once your building/assembling your own images, the differences are minimal, in my opinion.