Cross compiling for OpenWrt/LEDE mips_24kc_nomips16 #crosscompiling #openwrt #printing

🕕︎ - 2023-12-17

Recently I looked at OpenWrt's list of recommended hardware and when I to my surprise saw an access point available in local webshops on the list, a Xiaomi AX3200, I treated myself to one.

What I didn't think to check was whether the new access point has a usb port.

It doesn't.

Why does that matter? Well, I have this setup where when I tell my computer to print something, it tells the access point to toggle a usb controlled relay, which turns on the printer.

It's pretty neat, if I may say so myself.

However switching from the old access point to the new would leave me without somewhere to plugin and control the usb relay.

But wait, the Genexis Pure ED500 VDSL router I have that connects to the internet, it has a usb port, and it runs a customized version of OpenWrt, maybe I can use that?

Unfortunately it runs a veeery old version of OpenWrt:

* iopsysWRT Version    = 4.3.6
* LEDE/OpenWRT Version = Reboot (SNAPSHOT, r0+8411-adc4ef5)
* Linux Kernel Version = 4.9.109+

running opkg update on it just gave a whole bunch of "404 Not found". And I need the crelay package.

After searching for a while, I couldn't find it anywhere online. I could find one build for mips_24kc, but not for mips_24kc_nomips16 - there are very few hits for "nomips16".

I tried the package for mips_24kc any way, and after installing the needed libraries: "Bus error".

Ok, so I probably need to (cross) compile it myself. I posted a cry for help on the fediverse, but there were no takers.

Armed with the information from /etc/openwrt_release:

DISTRIB_TAINTS='no-all busybox override'

I went searching again, and I found a guide "Cross compiling" on the OpenWrt website, which says to start by setting up the build system as described on "Build system usage".

After a couple of false starts, this is what I did:


Now I can switch from the old access point to the new, and still have printing working as smoothly as before.

Add comment

To avoid spam many websites make you fill out a CAPTCHA, or log in via an account at a corporation such as Twitter, Facebook, Google or even Microsoft GitHub.

I have chosen to use a more old school method of spam prevention.

To post a comment here, you need to:

¹ Such as Thunderbird, Pan, slrn, tin or Gnus (part of Emacs).

Or, you can fill in this form: