Busybox 1.19.3

I have upgraded to the latest Busybox, PET uploaded to the 'common' repo (394KB):
http://distro.ibiblio.org/quirky/pet_packages-common/busybox-1.19.3-w5c.pet

The source and .config file are at my source repo:
http://bkhome.org/sources/alphabetical/b/

technosaurus has made a number of suggestions to reduce the size of the 'initrd' (initramfs):
http://www.murga-linux.com/puppy/viewtopic.php?t=73045&sid=1305fbcaf56f7d2285772a32328f55d3

One of those suggestions is the replacement of the 'guess_fstype' utility with the Busybox 'blkid' applet. The extra capability of blkid must be turned on at the configure stage, which I have done with this latest Busybox PET. Here is the commit detail:
http://git.busybox.net/busybox/commit/?id=90615a0c5c326fa3cf78fc719f7b16207f47395a

Yeah, it works nice:

# blkid /dev/sda9
/dev/sda9: UUID="9d1e4211-578a-45d3-9227-24acc4cbc8a8" TYPE="ext3"


I intend to work on implementing technosaurus's suggestions in Woof.

ARM architecture
I have used Buildroot to compile Busybox statically with uClibc, both for the arm1176jzf-s and i486 CPUs, for inclusion in the initrd in Woof.
I am gradually getting Woof setup to build an ARM Puppy (RazPup?). Compiles are otimised for the arm1176jzf-s CPU.


Posted on 11 Nov 2011, 8:45


Comments:

Posted on 9 Nov 2011, 15:50 by BarryK
Sigh...
Testing the new static 'busybox' (the x86 one) in the initrd, it works, but it spits out about 20 messages to the system log, like these:

wait4usb[632]: segfault at 0 ip (null) sp bfbfb830 error 4 in busybox[8048000+62000]

init[649]: segfault at 0 ip (null) sp bfee194c error 4 in busybox[8048000+62000]
init[648]: segfault at 0 ip (null) sp bfee19c8 error 4 in busybox[8048000+62000]
init[652]: segfault at 0 ip (null) sp bfee194c error 4 in busybox[8048000+62000]
init[651]: segfault at 0 ip (null) sp bfee19c8 error 4 in busybox[8048000+62000]
init[655]: segfault at 0 ip (null) sp bfee1998 error 4 in busybox[8048000+62000]
init[654]: segfault at 0 ip (null) sp bfee1a14 error 4 in busybox[8048000+62000]
init[647]: segfault at 0 ip (null) sp bfee1cb8 error 4 in busybox[8048000+62000]
init[657]: segfault at 0 ip (null) sp bfee1b8c error 4 in busybox[8048000+62000]
init[663]: segfault at 0 ip (null) sp bfee1b64 error 4 in busybox[8048000+62000]




Posted on 9 Nov 2011, 16:52 by technosaurus
eval trick for devices
blkid output is really convenient to use with eval


eval `blkid $DEVICE`
case $TYPE in
ntfs)ntfs-3g ...
*)mount ...
esac

#UUID is useful for systems removable drives
case $UUID in
PUPUUID)... #(this is where we look for pup files)
*)continue;;
esac


for UEVENT in /sys/dev/block/*/uevent ; do
. $UEVENT
case ${DEVNAME:0:2} in

sd) REMOVABLE="0" NOTSWAP="1" LOGICAL=1
[ -e ${UEVENT//uevent/"../removable"} ] && read REMOVABLE <${UEVENT//uevent/"../removable"}
[ $REMOVABLE = 1 ] && ICON=usbdrv48.png || ICON=drive48.png
read LOGICAL <${UEVENT//uevent/size}
LINE=""
while read LINE || [ "$LINE" ]; do
case $LINE in
"/dev/"$DEVNAME*)NOTSWAP=""
esac
done < /proc/swaps
[ ${DEVTYPE} = "partition" ] && [ $NOTSWAP ] && [ ! $LOGICAL = 2 ] && MENU=${MENU}'
<TrayButton popup="'${DEVNAME}'" icon="'${ICON}'">exec:devicehandler '${DEVNAME}'</TrayButton>'
;;

mm) [ ${DEVTYPE} = "partition" ] && MENU=${MENU}'
<TrayButton popup="'${DEVNAME}'" icon="card48.png">exec:devicehandler '${DEVNAME}'</TrayButton>'
;;

sr)MENU=${MENU}'
<TrayButton popup="'${DEVNAME}'" icon="optical48.png">exec:devicehandler '${DEVNAME}'</TrayButton>'
;;

fd)MENU=${MENU}'
<TrayButton popup="'${DEVNAME}'" icon="floppy48.png">exec:devicehandler '${DEVNAME}'</TrayButton>'
;;

esac
done

for the init this could be simplified to
case ${DEVNAME:0:2} in
sd|mm|sr)do stuff
*)continue;;

(do we still need hd*?)


Posted on 9 Nov 2011, 18:54 by maxerro
large extended partition check
Can someone with a >250GB/multiplatter HDD confirm that extended-partition's /uevent/size is always registered as "2"?

#!/bin/ash


for UEVENT in /sys/dev/block/*/uevent ; do
. $UEVENT
case ${DEVNAME:0:2} in
sd) EXTCHECK=0
read EXTCHECK <${UEVENT//uevent/size}
[ ${DEVTYPE} = "partition" ] && echo "${DEVNAME} $EXTCHECK";;
esac
done



Posted on 9 Nov 2011, 19:06 by BarryK
Re sigh...
I spent hours fiddling with the 'init' script, trying to isolate the segfaults. A simple line like this has two segfaults:

ABC="`echo "$ELSPCI" | grep '0C0320'`"

I couldn't find any reason to it. The segfaults are internal to busybox, and the script still works.

I am testing 'busybox' compiled for i486 in Buildroot.

I even tried a couple of older versions of Busybox, same problem. That is when I began to suspect Buildroot.

I downloaded Rob Landley's 'root-filesystem-i486.tar.bz2, and chrooted into it. I put busybox source into it, compiled it, and it works perfect, no errors.

Now, I have no faith in the ARM compile of busybox that I did in Buildroot.
When I get an actual ARM board running Linux, I will download Rob's 'root-filesystem-armv6l.tar.bz2' and recompile busybox.



Posted on 9 Nov 2011, 19:08 by 01micko
re large extended partition check
maxerro

looks that way...

# ./chk
sda10 62492787
sda11 73529442
sda12 3357522
sda13 25511157
sdb1 20482812
sdb2 20482875
sdb3 20482875
sda1 140504427
sdb4 2
sdb5 51199092
sdb6 67585392
sdb7 63488817
sdb8 64757952
sdb9 4096512
sda2 2
sda5 25189857
sda6 194563152
sda7 194563152
sda8 194563152
sda9 62492787


Posted on 9 Nov 2011, 19:20 by BarryK
Re2 sigh...
To clarify, the reason that I was using Buildroot or Rob's root filesystem, is that they use uClibc, so I can compile a very small static 'busybox'.



Posted on 9 Nov 2011, 19:23 by BarryK
Rob link
Rob's download site:

http://www.landley.net/aboriginal/downloads/binaries/root-filesystem/



Posted on 10 Nov 2011, 16:19 by Sage
More ARMs
http://www.bbc.co.uk/news/technology-15668347


Posted on 10 Nov 2011, 16:37 by Raffy
Mali GPU and Mobilinux
Just adding to the ARM vocabulary:

Mali 200 (and up) are - competitive GPUs for the ARM, latest model is T604.

Mobilinux - optimized for mobile devices.


Posted on 11 Nov 2011, 9:18 by CLAM01
Kanst Der ARMe Puppy
"Puppyrazzi" heite?

(I'm trying to pretend I didn't suggest this)