Active Topics

 


Reply
Thread Tools
Posts: 66 | Thanked: 17 times | Joined on Dec 2007
#1
Just got it compiled and running on N800 to replace Nokia's dysfunctional version. . . Among other things at least rdate seems to work.

BusyBox v1.10.0.svn (2007-12-25 15:34:10 CST) multi-call binary
Copyright (C) 1998-2007 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
or: function [arguments]...

BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as!

Currently defined functions:
[, [[, addgroup, adduser, adjtimex,
ar, arp, arping, ash, awk, basename,
bunzip2, bzcat, bzip2, cal, cat, catv,
chattr, chgrp, chmod, chown, chpasswd,
chpst, chroot, chrt, chvt, cksum,
clear, cmp, comm, cp, cpio, crond,
crontab, cryptpw, cut, date, dc, dd,
deallocvt, delgroup, deluser, df,
dhcprelay, diff, dirname, dmesg, dnsd,
dos2unix, du, dumpkmap, dumpleases,
echo, ed, egrep, eject, env, envdir,
envuidgid, expand, expr, fakeidentd,
false, fbset, fdflush, fdformat, fdisk,
fgrep, find, fold, free, freeramdisk,
fsck, fsck.minix, ftpget, ftpput,
fuser, getopt, getty, grep, gunzip,
gzip, halt, hdparm, head, hexdump,
hostid, hostname, httpd, hwclock,
id, ifconfig, ifdown, ifup, inetd,
init, insmod, install, ip, ipaddr,
ipcalc, ipcrm, ipcs, iplink, iproute,
iprule, iptunnel, kbd_mode, kill,
killall, killall5, klogd, last, length,
less, linux32, linux64, linuxrc, ln,
loadfont, loadkmap, logger, login,
logname, logread, losetup, ls, lsattr,
lsmod, lzmacat, makedevs, md5sum,
mdev, mesg, microcom, mkdir, mkfifo,
mkfs.minix, mknod, mkswap, mktemp,
modprobe, more, mount, mountpoint,
mt, mv, nameif, nc, netstat, nice,
nmeter, nohup, nslookup, od, openvt,
passwd, patch, pgrep, pidof, ping,
ping6, pipe_progress, pivot_root,
pkill, poweroff, printenv, printf,
ps, pscan, pwd, raidautorun, rdate,
readahead, readlink, readprofile,
realpath, reboot, renice, reset, resize,
rm, rmdir, rmmod, route, rpm, rpm2cpio,
run-parts, runlevel, runsv, runsvdir,
rx, sed, seq, setarch, setconsole,
setkeycodes, setlogcons, setsid, setuidgid,
sh, sha1sum, slattach, sleep, softlimit,
sort, split, start-stop-daemon, stat,
strings, stty, su, sulogin, sum, sv,
svlogd, swapoff, swapon, switch_root,
sync, sysctl, syslogd, tail, tar,
tcpsvd, tee, telnet, telnetd, test,
tftp, time, top, touch, tr, traceroute,
true, tty, ttysize, udhcpc, udhcpd,
udpsvd, umount, uname, uncompress,
unexpand, uniq, unix2dos, unlzma,
unzip, uptime, usleep, uudecode, uuencode,
vconfig, vi, vlock, watch, watchdog,
wc, wget, which, who, whoami, xargs,
yes, zcat, zcip
I am in need of a tgz of symlinks to all currently available apps as shown above and used in busybox. Any help with that would be appreciated.

More news coming soon!
 

The Following 2 Users Say Thank You to gnexus For This Useful Post:
Posts: 111 | Thanked: 31 times | Joined on Nov 2007
#2
Originally Posted by gnexus View Post
Just got it compiled and running on N800 to replace Nokia's dysfunctional version. . . Among other things at least rdate seems to work.

I am in need of a tgz of symlinks to all currently available apps as shown above and used in busybox. Any help with that would be appreciated.
nice. i've been missing some of those cmds. what is the total binary size?

as far as symlinks go, the busybox makefile should take care of that, no?

The build automatically generates a file "busybox.links", which is used by
'make install' to create symlinks to the BusyBox binary for all compiled in
commands. Use the PREFIX environment variable to specify where to install
the busybox binary and symlink forest. (i.e., 'make PREFIX=/tmp/foo install',
or 'make PREFIX=/tmp/foo install-hardlinks' if you prefer hard links.)
do you plan to make debian packages?
 
Posts: 66 | Thanked: 17 times | Joined on Dec 2007
#3
The build automatically generates a file "busybox.links",
I remembered that make install does it, but I must have missed that part in the INSTALL doc somehow.

I still don't see the '.links' file. Never built busybox before, and I haven't done a 'make install' yet. I skipped quickly over the make install section. SInce I can't build on the tablet a 'make install' in the SDK won't gain me anything yet, unless I just use it to make the symlinks and then tar 'em up. I'm not willing to trash my N800 with the SDK image. I just got through reflashing my OS2007 backup after a disappointing foray with OS2008, and I need a usable device. I'm really not prepared to wipe my N800 out again just to test the SDK image until I have that image just like my existing one. I just wanted to see if busybox worked before anything, so I simply copied the compiled binary over to the N800. Since it works, the next step for me is to copy the symlinks and the binary into my existing root image and flash that. Hopefully the "busybox --install -s" command works. If not I suppose I'll rerun the config with that in and recompile.

After that I'll do a .deb. That might take a bit though. I've always been an RPM user.

Oh, almost forgot, it's about 740K.

740K ought to be enough for anybody . . .

Last edited by gnexus; 2007-12-26 at 00:38.
 
Posts: 66 | Thanked: 17 times | Joined on Dec 2007
#4
OK, 'make install' creates the 'busybox.links' file ...

The big question now, since there are 267 links, which consist of some of the most critical tablet functions, is which ones that currently exist are safe to overwrite with the new busybox ones, and which ones are not?

There may be some commands that currently exist in the tablet that don't use busybox functions. . . It's going to take a bit to make certain all the current ones link to busybox. Otherwise it might severely break something.

So far, though, everything still seems to work. But then again, I haven't done a reboot. . .

Last edited by gnexus; 2007-12-26 at 01:26.
 
Posts: 111 | Thanked: 31 times | Joined on Nov 2007
#5
making the deb will save you a lot of trouble vs manually shifting files around on your tablet. you should be able to follow these steps with only minor variation: http://maemo.org/development/documen...n_package.html

the default debian "rules" file (which is essentially just a make file) will run make then make install on the sources. the "make DESTDIR=$(CURDIR)/foo/bar install" line of rules, it might be enough to change DESTDIR to PREFIX. Note that the files get installed to packagesrc/debian/packagename and then compressed into the deb. you can check the folder to make sure everything copies to the right place.
 
Posts: 66 | Thanked: 17 times | Joined on Dec 2007
#6
Update:

New busybox is installed with symlinks and working in my tablet

There were only a few applets that weren't already symlinked to busybox. I left those alone and overwrote the others. So far no problems and no detectable differences except for the additional functionality. Rdate works and sets the system clock to the network time server! ( This should have been part of the OS from the beginning-no excuses . . .) A console reboot directly after that will lose the clock changes, but a poweroff saves the time change

There are still a few minor details before packaging:

1) need to disable the non-symlinked applets in the config so they wont get built in the deb

2) console prompt does not show hostname or directory, only the prompt

3) command history not saved upon exit

Item #1 is trivial, but if anybody has suggestions on 2 or 3 I'd be appreciative. It's probably a simple item in the config somewhere, but if somebody here knows the directives off hand that would save me some time. Once I get them straightened out I'll work on a .deb.
 
Posts: 66 | Thanked: 17 times | Joined on Dec 2007
#7
I thought I would put an update here on the progress with this package:

There are still a few minor details before packaging:

1) need to disable the non-symlinked applets in the config so they wont get built in the deb

2) console prompt does not show hostname or directory, only the prompt

3) command history not saved upon exit
All the above details have been resolved.

1. Was trivial.
2. Item "CONFIG_ASH_EXPAND_PRMT=y " was disabled in default busybox config.
3. This also had something to do with (2) above. Additionally, I expanded the history size to 30 lines from the default of 15 and also modified ash.c to give a standard linux PS1 environment of "PS1=[\u@\h \W]\$ " for a bit better readability. (This is the only way to get this to work as bashrc and profile have no effect for local shells. I'm going to build this way since it's the standard linux prompt. If others decide to use this package once I make it available you should change your hostname from the Nokia default to something shorter so it won't take up the entire console )

I also went through the maemo diff for busybox and tried to approximate the debian/maemo config as much as possible without adding the patches/backports or disabling any applets. Another thing to note is that, since busybox has all the applets executable for anyone, you don't need to be root to run them. Of course this has good points, and also bad. I'm going to go back through them and change permissions for any that should be suid root.
Current size is 743.5 KB with big command history and all busybox apps enabled.
 
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#8
Very good stuff. Thanks a lot.
Do you plan to package it? I'm not really keen on installing a lot of files here and there and then not having any uninstall option.
 
Posts: 66 | Thanked: 17 times | Joined on Dec 2007
#9
I'm not really keen on installing a lot of files here and there and then not having any uninstall option.
Uhhh . . . busybox is only one file! I made this version for myself just so I would have the additional functionality. I just want to make it available for everyone else to help them assist in making other great apps. If you don't feel up to installing it from a tgz archive that's your perogative. If that's the case you are most likely not the intended user base anyway. Since it's a console replacement, the intended user base is developers and power users that NEED (not just want) the additional functionality.

As for installing from a tgz:
Just back up the existing file. I'm fairly confident most people who would want this package would be capable of backing up and replacing one file. The only other contents of the package are symlinks to the single busybox executable for all the apps. In the final package I'm not planning to overwrite any of the existing symlinks, just add the new ones. The new symlinks don't take up any space, and, if you revert back to the old busybox, any of the new symlinks will be rendered non-functional.

So the new symlinks won't need to be deleted. For reference, and for the paranoid, I'll include a file list in the archive. So you don't need to be worried that you might accidentally execute bzip2 by mistake once you revert back to Nokia's busybox...

Also, for the people who would want this package, I don't think it is something they would want to uninstall:
When I reverted back to a Nokia root image I almost went nuts beause there were so many busybox apps that were missing :

I'm going to package it once I get a bit more familiar with dpkg utility. I think it would be better for everyone if I did it correctly. Like I said earlier, I'm an RPM kinda guy. I've converted .debs to RPM before quite a bit, but have never actually made a deb. I know it's not difficult, but unfortunately I'm somewhat time constrained. At least busybox has RPM in it (but not dpkg)! SInce I should really learn to make debs (after all, it's the most popular packaging) I'll get to it sooner rather than later.

For now what I will do is post the .tgz archive on my Maemo page. Then, if anybody wants a shot at it, maybe they can make a deb before I get around to it. . . I'll update this post once I make it available.

Update on busybox:
Rock stable so far.
The expanded history really makes life eaiser.
Just used built-in fdisk (not sfdisk) utility to partition a new SD card
 
Posts: 227 | Thanked: 51 times | Joined on Feb 2006
#10
Originally Posted by gnexus View Post

For now what I will do is post the .tgz archive on my Maemo page. Then, if anybody wants a shot at it, maybe they can make a deb before I get around to it. . . I'll update this post once I make it available.

Great work man! 2 questions:
Where is the download? I looked in your profile and I looked in this thread and I don't see any link to your maemo page.

How hard was Busybox compile to set up?

Thanks,
David
__________________
David Smoot
 
Reply


 
Forum Jump


All times are GMT. The time now is 18:35.