What's new

Upgrade BusyBox?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

HarryMuscle

Senior Member
I noticed that the BusyBox that Asus routers run (in my case on an RT-AX6000 running 388.4) is a really really old version (1.25.1) which was released about 7 years ago. I'm writing a script which could benefit from process substitution which is only available in newer versions of the BusyBox ash shell which got me wondering, is there a reason why Asus routers run such an old version of BusyBox? And is there any way to upgrade the version to something newer?

Thanks,
Harry
 
Busybox can be compiled with any available functionality included or not, as selected. The point of it in the first place, as I recall, was to provide limited functionality for a limited environment. Once you start extending it there comes a point where it becomes, well, pointless to go the whole route. The term "process substitution" kind of rings a bell for me, but not really. Can you refresh my memory?

Nothing says you couldn't compile your own and mount it over the top of what's native; or maybe find a more-capable version suitably compiled for drop-in use.

Naturally, any scripting developed for use beyond native capabilities would not be portable, and you also need to weigh the effort required against anticipated usage down the road. What I mean is that if it takes you 10 hours to perfect something which saves you 30 seconds performing a task, you'll not break even until the 7200th execution.
 
No you can't update the firmware's busybox, this has been asked before. You can install alternate shells from Entware but you have to be careful how you set it up so that is doesn't conflict with any other scripts or system commands. In the past people have tried installing Entware's busybox and got into a complete mess.
 
Nevermind, I use "process substitution" all the time, just not on the router...

Simply create a temporary file with the result, use the file as needed, then clean it up when done.

Alternatively, install an alternate shell (or any other utility) "off to the side" and either set the appropriate PATH in your script or more succinctly use full-path calls in your scripts and avoid use of PATH entirely.
 
is there a reason why Asus routers run such an old version of BusyBox? And is there any way to upgrade the version to something newer?

There's a lot of valid reasons why one doesn't simply upgrade busybox - API's change over time, and having been there, done that with embedded Linux, it's better to patch the existing busybox rather than replace it with a later version.

Much like OpenSSL or the libc (glibc, uclibc, musl) - an upgrade can break everything.
 
"Everything" is a bit overly dramatic, hahaha!

Oh, my last paragraph above should've mentioned calling the proper shell in shebang.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top