Active Topics

 


Reply
Thread Tools
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#1
Busybox-power provides an enhanced shell replacement for Maemo. It is built using the latest upstream release, rather than the old source used by default in Maemo.

All patches that Nokia included in Maemo's original BusyBox are reviewed. Newer versions of Nokia's patches are pulled from Debian Sid, while original patches are ported to this latest BusyBox release when they were missing from upstream. Maemo's configuration file for BusyBox has also been checked and updated against the default config from the new BusyBox release.

The result is a drop-in enhanced replacement for Maemo's BusyBox without losing any patched in functionality

This thread covers busybox-power for Diablo and Fremantle (N800/N810/N900). If you're looking for the Harmattan version (N9/N950), please refer to this thread instead.

Functionality included
This package wouldn't be called busybox-power if it didn't have extra functionality. The BusyBox binary in the package has been compiled with support for way more features and utilities than the stock busybox. Besides extra features like swap priority support in swapon, colored ls output and getopts support, the following extra utilities are included in addition to those which are also in the stock BusyBox shell:

bunzip2 bzcat bzip2 cpio cttyhack dnsdomainname dumpkmap ed fbset fdflush hush ip ipaddr iplink iproute iprule mountpoint mt nc pipe_progress popmaildir pscan usleep blockdev bootchartd crond fdisk ifenslave ip iptunnel klogd loadkmap logread makedevs mdev nbd-client raidautorun setconsole sulogin sysctl syslogd vconfig adjtimex arping base64 beep brctl cal catv chpst chrt crontab cryptpw dc devmem diff dos2unix dumpleases eject envdir envuidgid ether-wake fdformat fgconsole flock freeramdisk ftpget ftpput hexdump ionice iostat ipcalc last length less linux32 linux64 loadfont lpd lpq lpr lzcat lzma lzop lzopcat makemime man microcom mkpasswd mpstat nmeter patch pmap readahead reformime resize rev rpm rpm2cpio rtcwake runsv runsvdir rx script scriptreplay setarch setfont setuidgid showkey smemcap softlimit strings sv svlogd tcpsvd telnet tftp timeout traceroute traceroute6 ttysize udhcpc udpsvd unix2dos unlzma unlzop unxz unzip uudecode uuencode vlock volname wall xz xzcat ar acpid add-shell addgroup adduser arp chat delgroup deluser dhcprelay dnsd fakeidentd ftpd hdparm httpd ifplugd inetd lspci ntpd rdate rdev readprofile remove-shell sendmail sha256sum sha512sum telnetd tftpd tunctl udhcpd watchdog zcip whois pstree pwdx groups users setserial nameif ubirsvol sha3sum


There is a screenshot a little bit further down this post which shows all utilities (functions) included in busybox-power.

Other highlights include: Ctrl-R reverse history search, proper shell history handling, Maemo-specific bug fixes and more.
Lastly, busybox-power pulls in over three years of upstream BusyBox work!

Where to download
You can find busybox-power in Maemo's extras(-devel/testing) repository for Fremantle and extras-devel for Diablo. It is listed in the category "utilities" as "Enhanced BusyBox shell". You can also install it via the terminal by executing
Code:
apt-get install busybox-power
A standalone compiled binary (for Fremantle) is available here, for those interested in this.

Warning
This package replaces an essential system binary during installation, namely /bin/busybox. BusyBox has an essential (or better: critical) role in Maemo. This warning will also be given during installation of busybox-power. We have to take this approach, since Nokia decided to create a metapackage, which depends on specific versions of most system packages, unfortunately.

This warning aside, there have been no critical issues so far. A lot of work has been put into busybox-power to minimize the chance of messing stuff up, e.g. by testing intensively, creating md5 hashes during installation, and implementing checks for as much variables as possible. Busybox-power has been installed >250000 times (source) without any confirmed incidents I'm aware of.

About this package
My original intention was to simply provide an updated BusyBox shell; the stock one in Maemo is getting rather old (about 3 years to be precise). After working on Nokia's patches and making sure the new configuration didn't break anything, it was ready to be released. After releasing it, there were requests for an enhanced build with extra features enabled, so I made a separate release for that build. I found myself to be using that build too instead of the package I started out with.

Then it struck me that there was no real reason to maintain both an 'only updated' version and an enhanced version, as the 'only updated' one also had enhancements (brought in by the updated upstream sources). Maintaining two different versions would only fragment shell use in Maemo and had no real purpose. Therefore I started to polish and package up the enhanced binary for a wider audience, and busybox-power was born

The name is chosen as a parody on kernel-power, which basically does the same thing for Maemo's kernel (providing extra features, bugfixes, etcetera).

Screenshots



Last edited by iDont; 2014-01-24 at 17:53.
 

The Following 105 Users Say Thank You to iDont For This Useful Post:
AapoRantalainen, abubakar, ade, amin007110, Andy1210, anthonie, ArchiMark, arcticrobot, Ariadeno, azad1top, brad112358, Char, cheve, chill, conred, Copernicus, debernardis, didymos, drax, enne30, Estel, Fabian Schölzel, fasza2, ffha, frostbyte, fw190, Gill T, handaxe, humble, hxka, ivyking, JimKnopf, Joseph9560, jpala16, kaznovac, kevloral, knobtviker, laasonen, LavaCroft, maacruz, Marshall Banana, mayhem, Mentalist Traceur, MINKIN2, mr id, mr_jrt, mr_pingu, nafajafam, Nikem, NIN101, nokiabot, OVK, pelago, peter2p, peterleinchen, phedders, Pigro, princefakhan, qole, Raimu, realist, reinob, rich c, rolfok, RRvW, sake, saponga, Saturn, shanttu, SHARP66, shawwawa, shrijith1, sifo, Silvarum, sixwheeledbeast, Skaven2k2, Socim, Sohil876, Sourav.dubey, sowwhatyoureap, StefanL, stlpaul, strange1712, stryker9, szopin, Temporal, TiagoTiago, Tigerite, Tiran, TMavica, tokag, totalentropy, Trestry, tuxsavvy, udaychaitanya16, uppercase, vi_, Vlad_on_the_road, wolke, x-lette, Zentenario, zerox, zvogt, _David_
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#2
Development, bugtracking and news
Since 07-05-2011, busybox-power has its own Maemo garage page. This page contains various topics regarding the development of busybox-power. It also contains a proper bugtracker. Head over to it for everything related to development.

Busybox-power's garage page
The project's changelog can be found here

Last edited by iDont; 2014-01-24 at 18:43.
 

The Following 14 Users Say Thank You to iDont For This Useful Post:
Posts: 328 | Thanked: 72 times | Joined on Oct 2010 @ Venezuela
#3
Just install and currently testing, looks good so far, good work
 

The Following User Says Thank You to carlon For This Useful Post:
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#4
This is great.

Does discussion about an enhanced busybox installer script go here or in the previous thread?

If so...

run as root:
#!/bin/sh
#create dirs
mkdir /home/bb
cd /home/bb
#get binary
wget http://enhanced_binary
#double check permissions
chmod +x ./busybox
#copy to bin
cp /home/bb/busybox /bin
#create symlinks in temp dir
/bin/busybox --install -s /home/bb/
#here comes the pain
yes n | cp -P -r -i /home/bb/* /bin
#punch it chewie!
cd ~
#remove temp dir of crap
rm -r /home/bb/*
DO NOT RUN THIS SCRIPT! It is just an idea.

I think the cp is set to copy the symlinks and not the source however I am not sure...
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.

Last edited by vi_; 2011-05-05 at 15:25.
 

The Following 2 Users Say Thank You to vi_ For This Useful Post:
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#5
Originally Posted by vi_ View Post
Does discussion about an enhanced busybox installer script go here or in the previous thread?
I think it would be best to PM any suggestions.
However, I think it won't be too much of a problem to create a script; it will just take a little while to be absolutely sure it won't mess anything up .
 

The Following User Says Thank You to iDont For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#6
Seems to me that the much easier solution if you're just copying the symlinks out anyway is to just package them all in the same tar file, preserving the file paths, and then from the installer script, just install the .tar.gz to /tmp/* and then unpack to /. However, it's probably better to just have an if/then check for each one. If [file where the symlink would go] doesn't exist, then symlink to /bin/busybox.

That makes it less likely to override existing full binaries, and/or symlinks to a different binary. Bit more annoying to write the script, but hey, this is why copy+paste was invented.

- Edit -

Anyone using the enhanced busybox use Advanced Interface Switcher? I think the enhanced busybox, combined with the way the Advanced Interface Switcher runs it's unload scripts, makes the Advanced Interface Switcher unable to unload the wifi driver while connected to a network.

Unlike the DNS thing I'm not as sure at this point what is happening. I think I might have had the same effect with the original not-your busybox package offered in the previous thread. Sadly I don't fully understand how the Advanced Interface Switcher package does the running of it's shell scripts, it also barely effects anyone else I suspect - the stock Advanced Interface Switcher scripts first brings down the wlan0 interface, and is meant for the stock driver. Mine skips the interface bringing down step, and uses the injection capable drivers... I'll test more as I can.

- Edit 2 -

Ok, near as I can tell, it's some deeper adv. int. switcher issue - still linked to the inhanced busybox, but not only can root easily rmmod the driver when it's in use, but if tricked into unloading the driver, when it's already connected, on the load script (Adv. Int. Switch. seems to assume the wifi driver is unloaded when it's initially started upon a restart of hildon-status-menu when you're already connected, so you can run its load script through its UI even with wifi pn and connected.), the switcher will still unload the driver just fine.

So my hypothesis is that something didn't work in the interface switcher before, and then started to work with the enhanced busybox - this something being some odd is-wifi-connected check. I can't wrap my mind around how that would be effected by busybox though, as the interface switcher is written in python. Will look through the code as I have time.

For all the masses though: don't worry about using the .deb files in the first post. That one has very little difference from the stock in terms of configuration, and in my testing experience it runs just fine. It's just the enhanced one that seems to hit these odd corner case bugs.(I'm still not 100% sure it's the busybox's fault either yet. Just think that's likely.)

Last edited by Mentalist Traceur; 2011-05-06 at 04:02. Reason: One more possible conflict with the enhanced busybox
 

The Following 4 Users Say Thank You to Mentalist Traceur For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#7
Bump out of sheer conviction that there's no good reason for this thread to sink.

- Edit -

I found an issue with both busyboxes in this thread, the updated and updated enhanced - different character support is lacking. Namely, I cannot get characters like €, ≠, ≤, ≥, pretty sure ∞, and the entire Russian alphabet, and quite a few other things that aren't the standard basic set of characters. Any and all of them just print question marks. I know this isn't my system because running the old busybox (I have them sitting in the /home / /opt partition for testing like this) sh works, as does using the same characters in every other program. It's just inside the new busybox shells that they break.

"Wait-a-minute", you (iDont) might say, "I made sure I used the same settings as Nokia did for character support" (my guess, I didn't actually check the config.maemo files) "- it shouldn't change." Alas, I have slightly inconvenient news - I mentioned this to a family member (who as a hobby does a bunch of Tomato router Linux firmware); turns out that as of a somewhat recent version of Busybox (1.17.something or the 1.18.somethings), the default config settings for UTF code support changed, so now you have to use different config options to get the same characters supported.

Last edited by Mentalist Traceur; 2011-05-06 at 06:17. Reason: Actually useful content.
 

The Following 7 Users Say Thank You to Mentalist Traceur For This Useful Post:
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#8
Thanks for digging into this issue! Really appreciated.
I'll look into the configuration files later today.

Update: Mentalist Traceur: You've nailed it in your posts . I've fixed the issue in a test build. There are CONFIG_UNICODE_* entries in the BusyBox 1.18.4 configuration file, which aren't to be found in the old one. I'm now pinning down the exact configuration entry responsible and should have a final fix available later today.

On the installer: I have already a script ready which contains all functions from busybox defined on top by location (DEST_BIN="bunzip2 ..", DEST_SBIN="blkid .." ...) and some for-looping, which checks for existing symlinks/binaries before creating new symlinks. The final goal is to provide a single .deb which both provides the binary and does the symlinking.
I'm also working on an uninstaller which basically checks whether an utility is a symlink and if so, it checks whether the binary links to busybox. If not, it won't remove the symlink. This uninstaller works with the same list of functions defined as in the installer.
Still testing and extending; there mustn't be any corner cases of course!

Last edited by iDont; 2011-05-06 at 11:08.
 

The Following 7 Users Say Thank You to iDont For This Useful Post:
Posts: 539 | Thanked: 165 times | Joined on Feb 2010 @ Berlin, Germany
#9
Great job! Will try updated version soon and really wonder at new behaviour.

Originally Posted by iDont View Post
Unfortunately, the packages can't be pushed into Maemo's repositories because of the mentioned metapackage, at least as far as I know. (Creative) workarounds are greatly appreciated!
Just an idea: why not generating a metapackage too?
First of all: use correct version number for updated busybox. Then your mentioned metapackage will break, therefore you'll need another metapackage providing the needed version and itself depending on your version. That should do the trick imho. I don't think there will be issues having several versions of busybox installed. They shouldn't conflict, but your package should have a slightly different name of course. Maybe you can even provide a different version string within the same package but I'm not sure. Debian archives are so powerful, I sometimes could swear they even make coffee
 

The Following User Says Thank You to x-lette For This Useful Post:
Posts: 330 | Thanked: 97 times | Joined on Dec 2010 @ saudi arabia
#10
Originally Posted by Mentalist Traceur View Post
Bump out of sheer conviction that there's no good reason for this thread to sink.

- program. It's just inside the new busybox shells that they break.

.
I love this guy!
 
Reply


 
Forum Jump


All times are GMT. The time now is 13:15.