Busybox

This article assumes fun_plug is installed. It only explains what busybox is and how it works, so don’t expect to learn new useful Linux tricks.

Busybox calls itself “The Swiss Army Knife of Embedded Linux”. It is a single program that provides over 60 commonly used commands that are normally available on the Linux command line. Examples of such commands:

ls lists what’s in a directory
mkdir creates directories
tar creates/opens tarball files containing multiple files
cp copies files

In a standard Linux distribution these commands are separate programs. Busybox implements these programs (occasionally with somewhat reduced options) as a single executable program. Hence the “Swiss army knife” slogan. This saves space and maybe loading time, which is important for embedded Linux implementations.

To see what programs are handled by Busybox on the CH3SNAS you can use the following command within an ssh (PuTTY) session:

cd /bin
ls -l | more

The piping via more allows you to view the folder listing produced ls at your own pace. Use the spacebar to see more of the listing, and q to quit the more utility. The output will contain dozens of lines like:

lrwxrwxrwx    1 root     root            7 Apr  1 12:53 ln -> busybox
lrwxrwxrwx    1 root     root            7 Apr  1 12:53 ls -> busybox
lrwxrwxrwx    1 root     root            7 Apr  1 12:53 md5sum -> busybox
lrwxrwxrwx    1 root     root            7 Apr  1 12:53 mesg -> busybox
lrwxrwxrwx    1 root     root            7 Apr  1 12:53 mkdir -> busybox

Essentially this says that, for example, the file /bin/ls is a symbolic link (“->”) to the program /bin/busybox. You can get a feel for for this by trying

busybox ls -l /bin/busybox

yourself and seeing that it performs the same as typing ls -l /bin/busybox directly. Typing busybox without any parameters gives information like the program version and a list of all supported commands.

Output of /proc/cpuinfo on the Conceptronic CH3SNAS

Here the output of cat /proc/cpuinfo on the Conceptronic CH3SNAS:

Processor       : ARM926EJ-Sid(wb) rev 0 (v5l)
BogoMIPS        : 331.77
Features        : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 0
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format C
Cache format    : Harvard
I size          : 32768
I assoc         : 1
I line length   : 32
I sets          : 1024
D size          : 32768
D assoc         : 1
D line length   : 32
D sets          : 1024
 
Hardware        : MV-88fxx81
Revision        : 0000
Serial          : 0000000000000000

Output of dmesg on the Conceptronic CH3MNAS

Here the output of dmesg on the Conceptronic CH3MNAS.

Linux version 2.6.22.7 (eve@SWTEST1) (gcc version 3.4.4 (release) (CodeSourcery ARM 2005q3-2)) #85 Thu Mar 26 09:48:50 CST 2009
CPU: ARM926EJ-S [41069260] revision 0 (ARMv5TEJ), cr=a0053177
Machine: Feroceon
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
On node 0 totalpages: 16384
  DMA zone: 128 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 16256 pages, LIFO batch:3
  Normal zone: 0 pages used for memmap
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
CPU0: D cache: 32768 bytes, associativity 1, 32 byte lines, 1024 sets
Built 1 zonelists.  Total pages: 16256
Kernel command line: root=/dev/ram console=ttyS0,115200 :::DB88FXX81:egiga0:none
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB 0MB 0MB 0MB = 64MB total
Memory: 53168KB available (2880K code, 190K data, 124K init)
Calibrating delay loop... 332.59 BogoMIPS (lpj=1662976)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Sys Clk = 166666667, Tclk = 166666667
 
CPU Interface
-------------
SDRAM_CS0 ....base 00000000, size  64MB 
SDRAM_CS1 ....disable
SDRAM_CS2 ....disable
SDRAM_CS3 ....disable
PEX0_MEM ....base e0000000, size 128MB 
PEX0_IO ....base f2000000, size   1MB 
PCI0_MEM ....base e8000000, size 128MB 
PCI0_IO ....base f2100000, size   1MB 
INTER_REGS ....base f1000000, size   1MB 
DEVICE_CS0 ....no such
DEVICE_CS1 ....no such
DEVICE_CS2 ....no such
DEV_BOOCS ....base ff000000, size  16MB 
CRYPT_ENG ....base f0000000, size  64KB 
 
  Marvell Development Board (LSP Version 3.0.5_NAS_GDP)-- RD-88F5182-NAS-2  Soc: 88F5182 A2
 
 Detected Tclk 166666667 and SysClk 166666667 
Marvell USB EHCI Host controller #0: c1072600
Marvell USB EHCI Host controller #1: c1072400
PCI: bus0: Fast back to back transfers enabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
Time: orion_clocksource clocksource has been installed.
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
checking if image is initramfs...it isnt (no cpio magic); looks like an initrd
Freeing initrd memory: 8503K
RTC registered
Use the XOR engines (acceleration) for enhancing the following functions:
  o RAID 5 Xor calculation
  o kernel memcpy
  o kenrel memzero
  o copy user to/from kernel buffers
Number of XOR engines to use: 2
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 3.3 (2007/10/31) Phillip Lougher
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver $Revision: 1.1.1.1 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 3) is a 16550A
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 4) is a 16550A
RAMDISK driver initialized: 2 RAM disks of 14336K size 1024 blocksize
loop: module loaded
Marvell Ethernet Driver 'mv_ethernet':
  o Uncached descriptors in DRAM
  o DRAM SW cache-coherency
  o TCP segmentation offload enabled
  o Checksum offload enabled
  o Marvell ethtool proc enabled
  o Rx desc: 128
  o Tx desc: 256
  o Loading network interface 'egiga0' 
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
Intergrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
scsi 0:0:0:0: Direct-Access     SAMSUNG  HD203WI          1AN1 PQ: 0 ANSI: 5
scsi 1:0:0:0: Direct-Access     SAMSUNG  HD203WI          1AN1 PQ: 0 ANSI: 5
scsi 0:0:0:0: Attached scsi generic sg0 type 0
scsi 1:0:0:0: Attached scsi generic sg1 type 0
physmap-flash.0: failed to claim resource 0
flash VppMin = "0" , VppMax = "0"
cfi_flash_0: Found 1 x16 devices at 0x0 in 8-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
cfi_flash_0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Creating 6 MTD partitions on "cfi_flash_0":
0x00000000-0x00020000 : "MTD1"
0x00020000-0x00040000 : "MTD2"
0x00040000-0x00240000 : "Linux Kernel"
0x00240000-0x00c40000 : "File System"
0x00f80000-0x01000000 : "u-boot"
0x00c40000-0x00f80000 : "Module"
ehci_marvell ehci_marvell.4523: Marvell Orion EHCI
ehci_marvell ehci_marvell.4523: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.4523: irq 17, io base 0xf1050100
ehci_marvell ehci_marvell.4523: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_marvell ehci_marvell.167817: Marvell Orion EHCI
ehci_marvell ehci_marvell.167817: new USB bus registered, assigned bus number 2
ehci_marvell ehci_marvell.167817: irq 12, io base 0xf10a0100
ehci_marvell ehci_marvell.167817: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
mice: PS/2 mouse device common for all mice
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
EXT2-fs warning: maximal mount count reached, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 124K
usb 1-1: new high speed USB device using ehci_marvell and address 2
usb 1-1: configuration #1 chosen from 1 choice
sd 0:0:0:0: [sda] 3907029168 512-byte hardware sectors (2000399 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 23 00 10 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
sd 0:0:0:0: [sda] 3907029168 512-byte hardware sectors (2000399 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 23 00 10 00
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
 sda: sda1 sda2 sda4
sd 0:0:0:0: [sda] Attached SCSI disk
sd 1:0:0:0: [sdb] 3907029168 512-byte hardware sectors (2000399 MB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 23 00 10 00
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
sd 1:0:0:0: [sdb] 3907029168 512-byte hardware sectors (2000399 MB)
sd 1:0:0:0: [sdb] Write Protect is off
sd 1:0:0:0: [sdb] Mode Sense: 23 00 10 00
sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
 sdb: sdb1 sdb2 sdb4
sd 1:0:0:0: [sdb] Attached SCSI disk
usbcore: registered new interface driver usblp
drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
egiga0: mac address changed
egiga0: link down
Adding 530104k swap on /dev/sda1.  Priority:-1 extents:1 across:530104k
Adding 530104k swap on /dev/sdb1.  Priority:-2 extents:1 across:530104k
egiga0: link up, full duplex, speed 1 Gbps
ext3: No journal on filesystem on sda4
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
ext3: No journal on filesystem on sdb4
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
ext3: No journal on filesystem on sda2
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
ext3: No journal on filesystem on sdb2
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
ext3: No journal on filesystem on sda2
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
ext3: No journal on filesystem on sdb2
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
ext3: No journal on filesystem on sda4
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
ext3: No journal on filesystem on sdb4
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended

Output of /proc/cpuinfo on the Xtreamer eTRAYz

Here the output of cat /proc/cpuinfo on the Xtreamer eTRAYz:

Processor       : ARM926EJ-S rev 5 (v5l)
BogoMIPS        : 183.09
Features        : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 5
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format C
Cache format    : Harvard
I size          : 32768
I assoc         : 4
I line length   : 32
I sets          : 256
D size          : 32768
D assoc         : 4
D line length   : 32
D sets          : 256
 
Hardware        : Oxsemi NAS
Revision        : 0000
Serial          : 00000b01fa72a580

Output of /proc/meminfo on the Xtreamer eTRAYz

Here the output of cat cat /proc/meminfo on the Xtreamer eTRAYz:

MemTotal:       126052 kB
MemFree:         21576 kB
Buffers:          6324 kB
Cached:          48760 kB
SwapCached:          0 kB
Active:          59544 kB
Inactive:        35800 kB
SwapTotal:      499896 kB
SwapFree:       499896 kB
Dirty:               8 kB
Writeback:           0 kB
AnonPages:       40280 kB
Mapped:          15280 kB
Slab:             5392 kB
SReclaimable:     1816 kB
SUnreclaim:       3576 kB
PageTables:       1332 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
CommitLimit:    562920 kB
Committed_AS:   298872 kB
VmallocTotal:   253952 kB
VmallocUsed:      4352 kB
VmallocChunk:   249600 kB

Output of /proc/cpuinfo on the D-Link DNS-323

Here the output of cat /proc/cpuinfo on the D-Link DNS-323:

Processor       : ARM926EJ-Sid(wb) rev 0 (v5l)
BogoMIPS        : 331.77
Features        : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 0
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format C
Cache format    : Harvard
I size          : 32768
I assoc         : 1
I line length   : 32
I sets          : 1024
D size          : 32768
D assoc         : 1
D line length   : 32
D sets          : 1024
 
Hardware        : MV-88fxx81
Revision        : 0000
Serial          : 0000000000000000

Output of /proc/meminfo on the D-Link DNS-323

Here the output of cat /proc/meminfo on the D-Link DNS-323:

MemTotal:        61948 kB
MemFree:          6040 kB
Buffers:         13360 kB
Cached:          16344 kB
SwapCached:       6968 kB
Active:          32444 kB
Inactive:        12696 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        61948 kB
LowFree:          6040 kB
SwapTotal:     1060208 kB
SwapFree:      1047916 kB
Dirty:              56 kB
Writeback:           0 kB
Mapped:          22616 kB
Slab:             8404 kB
CommitLimit:   1091180 kB
Committed_AS:    36204 kB
PageTables:        620 kB
VmallocTotal:   450560 kB
VmallocUsed:      9804 kB
VmallocChunk:   440316 kB

Output of /proc/cpuinfo on the Conceptronic CH3MNAS

Here the output of cat /proc/cpuinfo on the Conceptronic CH3MNAS:

Processor       : ARM926EJ-S rev 0 (v5l)
BogoMIPS        : 332.59
Features        : swp half thumb fastmult edsp
CPU implementer : 0x41
CPU architecture: 5TEJ
CPU variant     : 0x0
CPU part        : 0x926
CPU revision    : 0
Cache type      : write-back
Cache clean     : cp15 c7 ops
Cache lockdown  : format C
Cache format    : Harvard
I size          : 32768
I assoc         : 1
I line length   : 32
I sets          : 1024
D size          : 32768
D assoc         : 1
D line length   : 32
D sets          : 1024
 
Hardware        : Feroceon
Revision        : 0000
Serial          : 0000000000000000