[Announce] Enhanced BusyBox package
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 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 http://s15.postimg.org/i60avigqz/Scr...818_124519.png http://s16.postimg.org/q7ubqqzx1/Scr...818_124712.png |
Enhanced BusyBox binary
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 |
Re: [Announce] Updated BusyBox packages
Just install and currently testing, looks good so far, good work
|
Re: [Announce] Updated BusyBox packages
This is great.
Does discussion about an enhanced busybox installer script go here or in the previous thread? If so... run as root: Quote:
I think the cp is set to copy the symlinks and not the source however I am not sure... |
Re: [Announce] Updated BusyBox packages
Quote:
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 ;). |
Re: [Announce] Updated BusyBox packages
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.) |
Re: [Announce] Updated BusyBox packages
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. |
Re: [Announce] Updated BusyBox packages
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! |
Re: [Announce] Updated BusyBox packages
Great job! Will try updated version soon and really wonder at new behaviour.
Quote:
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 :D |
Re: [Announce] Updated BusyBox packages
Quote:
|
Re: [Announce] Updated BusyBox packages
Quote:
I've checked the character support by simply typing euro signs, copyright symbols, tabs, etcetera, which worked fine in the new build. I enabled just about all character support to be on the safe side (which only adds about ~5KiB anyway). The source, the debs, the enhanced binary and the enhanced .conf file are updated on the server. Quote:
Replacing the metapackage with my own would be a solution, but I think that would break Nokia's SSU system. The CSSU fixes this by replacing the metapackage with their own (source). That package gets rid of many specific version dependencies, so this whole thing wouldn't be a problem with the CSSU. However, not everybody has got the CSSU installed, so this is no option (or I have to make this updated BusyBox depend on the CSSU). Quote:
After thinking it over a lot, I think it would be best to make a package with its own name (busybox-power anyone?), which simply overwrites /bin/busybox. This way I won't have any restrictions with names, versions or dependencies and I would be able to push it into the repositories. Being able to receive updates automatically, rather than checking a thread, seems a lot more convenient for the users too. Also, official BusyBox upgrades by Nokia (if any) will overwrite my binary, so no problems there. The only downside with this approach is that overwriting other packages their binaries is a bad practise. Quote:
|
Re: [Announce] Updated BusyBox packages
Quote:
Quote:
Quote:
|
Re: [Announce] Updated BusyBox packages
Quote:
Quote:
∞, ≠, ≤, ≥, (entire russian/cyrillic alphabet) and: ∅æÆœŒ♂♀∫§¶¿¡μαπθψ№∠δß Not like they actually see any use in scripts, to be fair - although I do sometimes use vi as a generic all-purpose text editor so it helps. For examples, I've used the proper 'micro' (μ) prefix for units in my conky configs which I edit through vi. Your prompt tackling of issues makes me wish I could thank your original two posts more than once - one time for each new upload of fixed packages/binaries. |
Re: [Announce] Updated BusyBox packages
Quote:
busybox-power busybox-enhanced busybox2 busierbox ;) Updated busybox: - busybox-updated (then maybe you should use busybox-updated-power etc) |
Re: [Announce] Updated BusyBox packages
bug:
I changed my hostname to Mr Pingu (space included) the old busybox used to display the whole name, after going to root via "root" (not sudo gainroot) Code:
~ $ root This new busybox stops after Mr so it doesnt display the full hostname if a space is included in the hostname it stops after this space ;) new: Code:
~ $ root note: I dont know if version match on the old , I just thought it was 1.10 so I changed to make the difference more clear |
Re: [Announce] Updated BusyBox packages
Quote:
Quote:
I've gone ahead with busybox-power, as that name represents the similarities in goal with kernel-power the most. Quote:
On a side note, I want to recommend you to change the space to an underscore regardless of whether you experience a bug or not. Spaces are, at least as far as I know, pretty uncommon (and even discouraged to use) in hostnames. |
Re: [Announce] Enhanced BusyBox package
I've changed the direction for this project a little bit. I'll focus only on the enhanced package from now on. The first two posts of this thread have received a major overhaul. Please read "About this package" in the first post for some additional information.
Also, busybox-power can now be found in the repositories! A lot of work went into the install and uninstall script to make sure they behave well. Mentalist Traceur & others: you don't have to worry about the package overwriting existing symlinks/applications. The package also keeps track of what symlinks it has installed, so it will never remove more symlinks than it has made ;) To all who have installed an older version (both the 'only updated' and enhanced binary): I recommend to revert to Nokia's original BusyBox (by executing "apt-get install --reinstall busybox"), and to remove any manually made symlinks to /bin/busybox prior to installing busybox-power. These recommendations aren't strictly necessary, but they prevent possible double symlinks and invalidating the backup of the original BusyBox binary (as the 'original' binary isn't original then). |
Re: [Announce] Updated BusyBox packages
Quote:
Somehow it's related with the added support for unicode format doing that would escape the whitespace :D |
Re: [Announce] Enhanced BusyBox package
Just installed. (N900 not in an environment currently where I can constantly get wifi, else I would've had this installed a while ago.)
Seems to have worked fine. I also tested this updating eSpeak AND installing this at once, so that's a little bit extra assurance that no unexpected glitches arise when doing more than one apt-get task at once. (Not that that was likely, but still.) The commands I checked seem to have been symlinked fine, or not symlinked where appropriate. Is there any mechanism in place to make sure that if a user installs busybox-power, then installs, say, a binary for iostat or telnet (or something else that stock busybox lacked), and then uninstalls busybox-power, that the binary (or different symlink) won't get deleted by the uninstaller thinking it's deleting its own symlink? |
Re: [Announce] Updated BusyBox packages
Quote:
|
Re: [Announce] Enhanced BusyBox package
@mr_pingu, I thought spaces were not allowed in hostnames as per some RFC. Still, if it worked before...
And any feedback on performance/memory use of the new busybox? If busybox is used to run system startup scripts, a small change in either direction could be significant. |
Re: [Announce] Updated BusyBox packages
Quote:
|
Re: [Announce] Enhanced BusyBox package
Quote:
When deinstalling busybox-power, all symlinks created upon installation are checked if they still are symlinks, and if so, whether the symlink still points to /bin/busybox or not. Only if an utility passes both tests, it will get deleted upon deinstallation. Quote:
Quote:
Busybox-power replaces /bin/busybox with the latest upstream version (albeit with Nokia's patches and a slightly different configuration); all scripts are ran with the new binary. I don't have any numbers on performance, but I can imagine some difference as there is a ~3 years time span between Maemo's BusyBox and the latest upstream version. I don't expect too much of a difference though (either positive or negative). I'll see if I can time some operations when I get home. Update: Some very simple checks (cat /proc/uptime > /root/uptime) in a late startup script didn't show any significant difference in performance: a 0.58% difference in uptime (all measured uptimes were in the 13.7-13.8s range, test was performed three times which both BusyBox versions). This is a very limited benchmark though; feel free to perform additional benchmarks. |
Re: [Announce] Enhanced BusyBox package
Quote:
I don't know whether it was a bug or a feature: the responsible 'code' was a simple flag (PARSE_GREEDY) passed to a function responsible for parsing files. After removing this flag, the complete hostname (including spaces) was read from files (including /etc/hostname) again. |
Re: [Announce] Enhanced BusyBox package
Problems when there is ~ in attribute. Example:
Code:
dpkg -i fennec_6.0~a1_armel.deb |
Re: [Announce] Enhanced BusyBox package
Quote:
|
Re: [Announce] Enhanced BusyBox package
Quote:
However, this is not because of the ~ in the filename. You'll see the 'help' when you remove it from the filename too. This help appears because of some invalid options passed to a command ran upon both installation and deinstallation of Fennec. A quick glance revealed the following: Fennec uses the following command in their preinst and prerm files: Code:
RUNNING=`ps ax | grep "fennec.*/fennec" | grep -v grep | wc -l` Update: This seems to be a bug in Fennec's scripts. For more information, see https://bugzilla.mozilla.org/show_bug.cgi?id=656020. Let's hope it'll get fixed, as the bug is not exposed when using the default BusyBox. I could always write a patch to make ps accept all options again if it won't get fixed. For now, I'll leave this untouched. Installation and removal of Fennec should work fine nonetheless. |
Re: [Announce] Enhanced BusyBox package
Thanks man, this may take away the need for me to have bash3 installed! Awesome job!
|
Re: [Announce] Enhanced BusyBox package
Does the stock busybox need to be a dependency for this package? Seems like the package itself doesn't need to be a necessity, as one can no doubt imagine a working N900 setup where stock busybox has been replaced or removed, but its' binaries have been preserved, or replacements have been moved in.
Now, yes it's unlikely, and really unreasonable for someone to do that, and frak if anyone knows why you'd even bother doing that but then wish to install busybox-power on top of it... *Shrug* But I've always been against adding dependencies that make sense "practically" but aren't actually technically necessary - is there anything that the stock busybox package provides that the busybox-power package needs to have? |
Re: [Announce] Enhanced BusyBox package
Quote:
It would be technically correct to make busybox-power depend on coreutils instead of BusyBox. The only reason BusyBox itself is listed as a dependency is indeed because of practical reasons. Your post made me think over busybox-power's dependencies. It seems that I've overlooked something very obvious: busybox-power contains BusyBox, so it should never ever have to depend on anything provided by BusyBox (if the (un)installation scripts are made to use the package its BusyBox instead of /bin/busybox). I'll release an update this weekend with the dependency removed ;) |
lspci
Exelente trabajo... finalmente una actualizacion de la BusyBox... instalado y testeado correctamente :) bueno el comando lspci me da el sig error:
lspci: /sys/bus/pci/devices: No such file or directory Nuevamente Grax por el exelente trabajo |
Re: lspci
Quote:
The N900 doesn't have a pci bus. Therefore /sys/bus/pci doesn't exist at all. Lspci will never return anything useful on the N900. I could remove lspci from busybox-power, but I rather like to keep it for (utility) completeness' sake. |
Re: [Announce] Enhanced BusyBox package
Hi, guys! Watching on emacs screen in the BusyBox and view ~1/7 of screen height is unwisely lost at the bottom:https://lh6.googleusercontent.com/_Q...514-205137.png Obviously what much more convenient would be to hide that bottom panel. For example after then Ctrl+L(arge) will been pushed. Is I'm right or absolutely right :rolleyes: But how I'm can implement this feature?!Great thanks! |
Re: [Announce] Enhanced BusyBox package
What is contained within the bottom bar, and whether to bottom bar is shown at all, is controllable with Gconf settings. I don't remember which ones off the top of my head, but it shouldn't be hard to find if you search for, say, 'modifying xterm bottom bar' or whatever.
|
Re: [Announce] Enhanced BusyBox package
I'm a bit busy at the moment (college coursework, plus breaking my N900's boot process by modifying /sbin/preinit, reflashing, and trying again to achieve the thing I'm working on that keeps resulting in this problem, so this might be taking up my time for a while), BUT:
When I'm done, I'll write up how to combine dbus-scripts and the modified hildon desktop (required - either by itself or the one from CSSU), to make it so that Shift+Ctrl+[key] or Fn+Ctrl+[Key] toggle the bar at the bottom of X-Term. - Edit - Well, I succeeded in doing what I was trying to do with /sbin/preinit; not only that, but what I got working depended on the busybox-power package, so it's on-topic now! (I needed to be able to use "read -n 1 -t 1", and stock busybox didn't support the -n flag on read.) I'll post an example of how to implement keyboard-toggle-able X-Term bar tomorrow - or at least will try to get it posted tomorrow. - Edit 2 - In the meantime, users willing to risk modifying /sbin/preinit and/or interested in what I was so willing to get working that I was willing to spend a day breaking and reflashing by N900 may see: http://talk.maemo.org/showthread.php...31#post1007131 Also, the post under mine is correct, that is the relevant gconf setting. |
Re: [Announce] Enhanced BusyBox package
Quote:
|
Re: [Announce] Enhanced BusyBox package
Is there any way to install this without the symlinks? I use other stuff like procps and some others I forgot so I don't want busybox symlinks back
|
Re: [Announce] Enhanced BusyBox package
Quote:
If you still wish to install busybox-power without the symlinks: the first post contains a link to just the binary (direct link). You can safely replace /bin/busybox with the one in the tarball. Be extra careful not to mess up the binary its permissions (don't extract it to MyDocs or similar!). The binary in the tarball is the same as the one in the repositories. |
Re: [Announce] Enhanced BusyBox package
Quote:
Seriosly if you'll try to determine some problem as complex there is only one way do it - just determine them complexly. Near I'm put a winner sequence at whole: Code:
sudo apt-get install xbindkeys wmctrl https://lh6.googleusercontent.com/_Q...517-181823.png Code:
#!/bin/sh Code:
chmod a+x ./fscr https://lh3.googleusercontent.com/_Q...517-181812.png Code:
"wmctrl -r :ACTIVE: -b toggle,fullscreen"
I hope this behaviaour is much more convenient then the default :rolleyes: Exactly for Emacs ;) |
Re: [Announce] Enhanced BusyBox package
Good job @ Cosmic for solving his own issues. That's always applaudable. I'm guessing you won't be needing my way with dbus-scripts.
Meanwhile, I see busybox-power got a new update today. However, it does still list "busybox" as its dependency when you view it in the app manager. Was this intentional? (Also, I'm going to be selfish and request loadkeys with the -b flag supported by added in - although, honestly, I'm making that a very tentative request, because I know if you keep adding stuff it'll just keep inflating the busybox binary, adding bloat that most people wouldn't want or need). I just cannot for the life of me find a precompiled armel binary of the loadkeys command that actually supports the -b flag. |
All times are GMT. The time now is 05:33. |
vBulletin® Version 3.8.8