Topic: Updating busybox

I just built a busybox v1.15.3 binary in scratchbox and tested it a little on device.  I build using the default config which enables all of the applets.  It seems to run OK in a testing environment in /mnt/storage -- is there any reason not to upgrade the busybox that comes with the Chumby One to this version?

Also, while we're at it, is there anything in the system that relies on root having no password?

Re: Updating busybox

I can't think of any reason not to upgrade.  We're running the version we are because we've always been running that version, and it's always worked.  Is there a compelling reason to update?  I'm not against the idea, just curious.

And I can't think of anything that relies on root having no password.  In fact, I can't think of anything that runs under a shell, aside from the debug port, SSH, and the keyboard egg.

Re: Updating busybox

We've actually updated busybox a few times over the years, however, only when the newer version offers a compelling new feature or critical bug fix. 

Like most embedded products, we tend to be conservative and stick with proven stable versions rather than bleeding edge.

Re: Updating busybox

OK, I just did a survey of all the new commands in busybox versus what's provided by the one on the Chumby... obviously, some of these aren't included because they're not useful, but here's the list I made up of the ones that would be nice to have around:

ar, bzip2, cal, chattr, cksum, comm, cpio, dc, fold, ftpd, ftpget, ftpput, hd, hexdump, install, lzmacat, lzop, lzopcat, man, microcom, mkdosfs, mkfs.vfat, mkpasswd, mktemp, nohup, od, passwd, patch, pgrep, pipe_progress, pkill, popmaildir, printenv, printf, pscan, readlink, realpath, resize, rx, sha256sum, sha512sum, split, stty, su, sulogin, sum, sysctl, tac, telnet, tftp, timeout, tty, ttysize, uncompress, unexpand, unlzma, unlzop, volname

Good news on the root password... I'm teaching a class on Chumby hacking in February, and wanted to show people how to set their own password as one of the first things to keep students from defacing each others devices.

Re: Updating busybox

I put my updated busybox binary build up at http://drop.io/chumby_utils -- you can download it to the Chumby One device, then run these steps to update:

   mount -o remount,rw /
   cp /bin/busybox /bin/busybox_old
   cp busybox /bin/busybox
   /bin/busybox --install -s

I just verified that --install won't overwrite existing files or symlinks, so if there are any conflicts with non-busybox versions, the original file/link wins.

So far, I've not seen any issues with the upgrade.  I liked having passwd with this build; I used that to set my root password so I'd feel more comfortable leaving SSH on all the time.

Re: Updating busybox

Hi Ben.  I have been able to install this, but I get a constant stream of errors on the built in serial console:

can't open /dev/ttyUSB0: No such file or directory

I can't use SSH, as I'm trying to debug a 3G modem problem, and I'm not on the network.

Rolling back to the original version clears up the errors.

Any ideas?

Thanks.

Re: Updating busybox

I should probably mention that the modem has been removed, and the network_config and 3g_configs are not loading PPP.

Thanks.

Re: Updating busybox

I'm not sure what the problem is. I've successfully used /dev/ttyUSB0 with a FTDI cable and Arduino board with this busybox installed.  However, I've not been watching the serial console, although I do run "dmesg" a bit and don't see this output.  Bugman, are you using the updated beta kernel that ChumbyLurker posted?

Re: Updating busybox

Ben - I'm running the NTSC out kernel.  I will try to scrounge a USB serial adapter tomorrow and try some experiments.

I will also check dmesg.

Thanks for the help.

Re: Updating busybox

If I plug in usb serial port, the errors stop streaming.  Unplug, and they return.

dmseg shows the plug and unplug events, but not the "can't open /dev/ttyUSB0" messages.

No action required, it's just odd.

Thanks,
Mark

Re: Updating busybox

I wonder what the source of those errors is... I can't think of anything in busybox that would even know that port name, but I could see some sort of script/cron task get confused by the change.

Re: Updating busybox

I timed the messages, and 15 errors in 15 seconds.

Next, I killed crond, with no change.

Pluggin in the usb serial port creates the process:

/sbin/getty -L ttyUSB0 115200

If I kill the getty process, a new one appears.

Hmmmmm.......

Re: Updating busybox

Ah, good old getty.  I don't see that process getting spawned on my Chumby One, but you could try

ln -sf /bin/busybox_old /sbin/getty

to make sure that getty used the old implementation.

Re: Updating busybox

No luck with the link change.  I captured the boot messages and found that the messages actually start quite early in the boot process. (Somewhere between 1.7 and 3.1 seconds if I understand correctly.)  If something is firing once a second, that means that it could have been initialized as early as 0.7 seconds after boot.

The internal port also gives errors from the time the console first appears until the port is initialized:

Welcome to Falconwing

Please press Enter to activate this console.
can't open /dev/tty0: No such file or directory

can't open /dev/ttyUSB0: No such file or directory


The /dev/tty error drop out around the time that the touchscreen initializes (around 8 seconds in)

I see that the welcome message comes from the end of rcS, which launches rcS.background, but a quick look didn't find anything too interesting.

I also noted that shortly before the welcome message is:

Starting /sbin/init (cwd=/) (envcount=18)

I'm not sure what all happens in there.  My bet is whatever launches the console is the problem child.


Don't spend any time on it.  I hacked in an extra usb port on the main board to leave a dummy serial dongle plugged in all the time for now.  I think there are actually 5 usb ports in the chipset.

Like I said, it was just odd.  I really need to get back on other projects anyway.

Thanks again for the help, and congratulations on the new/old job.

Re: Updating busybox

I am just looking for the easiest way to add commands to the 1.6.1.  Is this a stock release, or are there any chumby changes.  Is there any plans to post the source or just your .config if it is a stock release.  thanks, bk...

Re: Updating busybox

It's just a stock release.  I don't have the .config that I used anymore, but I don't remember changing anything other than disabling some of the system control commands that didn't make sense without a hard drive.

17 (edited by samkwitty 2010-04-09 08:39:24)

Re: Updating busybox

Duane it seems that you have posted sources for busy box in the past on http://files.chumby.com/source/ I see one for 1.6 but not one for the latest. Can you post the latest that goes with the Chumby One?

Thanks
-Sam

Re: Updating busybox

I would also like to suggest that future versions of busybox distributed with the chumby have the "stty" command re-enabled. Otherwise, its impossible to configure the USB TTY ports from shell scripts. This is exactly the sort of thing you need to do when connecting the Chumby to external devices via a USB/Serial adapter.

-S