BeagleBone Network Multitool Server
The BeagleBone Network Multitool Server is a lightweight, always-on, networking-centric and IPv6-ready server distribution targeting the BeagleBone platform. It’s loaded with an assortment of networking tools so that it can be used as a secure proxy and for various networking experiments.
![]() |
| beaglenmt server blinking away, mounted to a sheet of plastic on a small Trendnet gigabit switch. |
Since the stock Angstrom distribution is very X11-laden, I rolled my own networking-focused distribution with buildroot. Thanks to buildroot, this was mostly a matter of package selection.
The relevant extra packages that were enabled in buildroot are openssh, openvpn, openssl, curl, links, ngrep, rsync, socat, libpcap, tcpdump, iproute2, iptables, ip6tables, ebtables, bridge-utils, ethtool, ntpd, ntpdate, sshfs, libfuse, python, python-setuptools, python-netifaces, python-dpkt, python-serial, ncurses, screen, sudo. The default busybox configuration was modified to enable IPv6 tools like ping6, traceroute6, as well as useful tools like nc, tunctl, base64, and pstree. The default beaglebone kernel configuration was modified to support IPv6, ip6tables, ethernet bridging, ebtables, and many extra iptables matches/targets. The target root file system was configured to bring up the eth0 interface automatically on boot with DHCP, to start the SSH daemon on boot, and to execute a cron job that periodically updates a dynamic DNS record to point to the beaglebone’s IP. At this point, the beaglebone can be run headlessly and remotely administered.
The resulting system is 56M in size, and boots in about 4 seconds. Download or build the distribution below.
I realize that there are many other cool Linux networking tools (suggestions are welcome!) besides the basics beaglenmt that includes, but the tools selected for now are the ones most conveniently available with buildroot. Submitting new packages to buildroot or just cross-compiling by hand are also options.
My instantiation of beaglenmt is running at http://eskimo.mooo.com, where I am hosting a small cherrypy-based diagnostics web server that reports statistics on a zenburn themed page, and SSH for a secure proxy, port redirection, or other uses (see SSH tricks for examples). It is accessible via both IPv4 and IPv6. Its IPv6 connection is tunneled through a 6in4 Hurricane Electric tunnel.
Download the pre-built distribution
beaglenmt-1.4 is available as a gzipped 1GB SD card image here: beaglenmt-1.4-01-2013.img.gz (22MB)
Download the compressed image, verify its SHA1 hash, decompress the image, and clone it to an SD card with:
$ wget http://db.tt/n4mtvfSP -O beaglenmt-1.4-01-2013.img.gz $ sha1sum beaglenmt-1.4-01-2013.img.gz 7ca8ba9ee4b173fd67187b75b1b5a7aaa3396b12 beaglenmt-1.4-01-2013.img.gz $ gunzip beaglenmt-1.4-01-2013.img.gz $ sudo dd if=beaglenmt-1.4-01-2013.img of=/dev/sdcardblockdevice bs=1M
Cloning the image to an SD card may take a few minutes.
Skip to the Booting up section for instructions to add a user.
Note that the dynamic DNS update script (/etc/init.d/S90update_dyndns) is commented out by default, as it requires your own configuration.
ChangeLog
- Release 1.4 - 01/14/2013
- Kernel support for tun/tap network devices and FUSE added.
- Buildroot upstream package updates. A few new packages added (htop, gnupg, file, ndisc6, stunnel, iperf, libpcap, groups, arp, pgrep).
- Release 1.3 - 08/24/2012
- Switched to buildroot upstream, which now has a beaglebone default configuration.
- Buildroot upstream package updates. A few new packages added (ngrep, pkill, e2fsprogs).
- Release 1.2 - 04/27/2012
- Enabled adding/removing users to/from groups in busybox.
- Release 1.1 - 04/26/2012
- Enabled ntp, ntpdate packages in buildroot.
- Release 1.0 - 04/23/2012
- Initial release.
Building from scratch
Configure and build buildroot
Configuration files used below: https://gist.github.com/2391604.
$ git clone git://git.buildroot.net/buildroot buildroot $ cd buildroot $ git checkout -b beaglenmt_build a066f31a05bb8a357b04269011de5995d81f53df $ make beaglebone_defconfig Use the dot_config_beaglenmt_buildroot: $ wget http://tinyurl.com/ao4vssm -O .config or Configure buildroot manually: $ make menuconfig Extra options enabled: Toolchain -> [*] Enable large file (files > 2 GB) support [*] Enable IPv6 Support [*] Enable WCHAR Support [*] Enable toolchain locale/i18n support [*] Enable C++ Support System configuration -> [*] remount root filesystem read-write during boot Package Selection for the target -> Libraries -> Crypto -> -*- openssl [*] openssl binary Filesystem -> [*] libfuse Networking -> [*] libcurl [*] curl binary [*] libdnet [*] libnetfilter_queue [*] libnfnetlink [*] libpcap Text and terminal handling -> [*] ncurses [*] readline Filesystem and flash Utilities -> [*] e2fsprogs [*] sshfs (FUSE) Interpreter languages and scripting -> [*] python core python modules -> [*] ssl external python modules -> [*] python-dpkt [*] python-netifaces [*] python-serial [*] python-setuptools Networking Applications -> [*] bridge-utils [*] ebtables [*] ethtool [*] iperf [*] iproute2 [*] iptables [*] links [*] ndisc6 [*] ndisc6 [*] rdisc6 [*] ngrep [*] ntp [*] ntpd [*] ntpdate [*] openssh [*] openvpn [*] rsync [*] socat [*] stunnel [*] tcpdump Shell and utilities -> [*] file [*] gnupg [*] screen [*] sudo System tools -> [*] htop Build buildroot for the first time through: $ make Drink some coffee / tea / beer. Maybe all of the above. This takes a while... Use the dot_config_beaglenmt_busybox: $ wget http://tinyurl.com/abm8qx6 -O output/build/busybox-1.20.2/.config $ make busybox-rebuild or Configure busybox manually: $ make busybox-menuconfig Extra options enabled: Archival Utilities -> [*] Make tar, rpm, modprobe etc understand .bz2 data [*] Make tar, rpm, modprobe etc understand .gz data [*] bzip2 Coreutils -> [*] groups [*] base64 Login/Password Management Utilities -> [*] Support for adding users to groups [*] Support for removing users from groups Networking Utilities -> [*] nc [*] ping6 [*] arp [*] brctl [*] traceroute6 [*] tunctl Process Utilities -> [*] pstree [*] pgrep [*] pkill Use the dot_config_beaglenmt_kernel: $ wget http://tinyurl.com/ahhxkpq -O output/build/linux-linux-ti33x-psp-3.2-r5a*/.config $ make linux-rebuild or Configure the kernel manually: $ make linux-menuconfig Extra options enabled: IPv6, Ethernet Bridging, ip6tables, ebtables, and extra netfilter targets/matches Networking support -> Networking Options -> <*> The IPv6 Protocol <*> 802.1d Ethernet Bridging [*] Network packet filtering framework (netfilter) -> Core Netfilter Configuration -> <*> Netfilter NFQUEUE over NFNETLINK interface <*> Netfilter LOG over NFNETLINK interface <*> Netfilter connection tracking support -*- Netfilter Xtables support (required for ip_tables) <*> "NFLOG" target support <*> "NFQUEUE" target support <*> "conntrack" connection tracking match support <*> "iprange" address range match support <*> "limit" match support <*> "physdev" match support <*> "quota" match support <*> "recent" match support <*> "state" match support <*> "statistic" match support <*> "string" match support <*> "time" match support IP: Netfilter Configuration -> <*> IPv4 Connection Tracking Support <*> IP tables support <*> Packet filtering <*> Full NAT <*> REDIRECT target support <*> Packet mangling IPv6: Netfilter Configuration -> <*> IPv6 connection tracking support <*> IP6 tables support <*> Packet filtering <*> Packet mangling <M> Ethernet Bridge tables (ebtables) support) -> Enable all ebt_ submodules as <M>, except ulog Device Drivers -> Network Device Support -> <*> Universal TUN/TAP device driver support File systems -> <*> FUSE (Filesystem in Userspace) support Rebuild buildroot with the new configuration: $ make
Configure the buildroot target system
Change directory to the buildroot target file system
buildroot/ $ cd output/target buildroot/output/target/ $
Configure eth0 to be brought up on boot
Edit etc/network/interfaces and add eth0 with DHCP (or static, if you’d like) options:
auto eth0 iface eth0 inet dhcp
Enable sudo for the wheel group
Edit etc/sudoers and uncomment:
%wheel ALL=(ALL) ALL
Create a /var/db symlink to tmp/ (needed for sudo):
buildroot/output/target $ ln -s tmp/ var/db
Enable the SSH daemon
Edit etc/sshd_config and uncomment:
Port 22 AddressFamily any ListenAddress 0.0.0.0 ListenAddress ::
Obtain a free dynamic DNS subdomain
Register a free subdomain at http://freedns.afraid.org/ (or a service of your choice, see http://dnslookup.me/dynamic-dns/ ) and obtain a direct update URL from http://freedns.afraid.org/dynamic/.
Create etc/init.d/S90update_dyndns, an init script to update the dynamic DNS record on boot, after networking and sshd:
#!/bin/sh wget -q -O /tmp/ip_update http://freedns.afraid.org/dynamic/update.php?<LOGIN_CODE_HERE> exit $?
Set execute permissions on the init script:
buildroot/output/target/ $ chmod +x etc/init.d/S90update_dyndns
Setup crond
Create etc/cron/crontabs folder for crond:
buildroot/output/target/ $ mkdir -p etc/cron/crontabs
Edit etc/cron/crontabs/root, and create a cron entry to run the dynamic DNS update script every two hours:
0 */2 * * * /etc/init.d/S90update_dyndns
Create etc/init.d/S60crond, an init script for crond:
#!/bin/sh /usr/sbin/crond -c /etc/cron/crontabs exit $?
Set execute permissions on the init script:
buildroot/output/target/ $ chmod +x etc/init.d/S60crond
Set your timezone
Edit etc/TC with your time zone:
For example, Eastern Standard Time with Daylight Savings: buildroot/output/target/ $ echo "EST5EDT" > etc/TZ
Create etc/ntp.conf
Create a basic etc/ntp.conf configuration with a few public NTP pool servers:
server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org
Move aside the stunnel init script for now
buildroot/output/target/ $ mv etc/init.d/S50stunnel etc/stunnel/
Feel free to restore it if you wish to use stunnel, after configuring stunnel.
Rebuild the rootfs with the updated file system
buildroot/output/target/ $ cd ../../ buildroot/ $ make
Copy the distribution to the SD card
Create an SD card image file
Create and Partition the 1GB image
$ dd if=/dev/zero of=beaglenmt-1.4-01-2013.img bs=1M count=1024
$ echo "Cylinders: " `du -b beaglenmt-1.4-01-2013.img | awk '{print int($1/255/63/512)}'`
$ fdisk beaglenmt-1.4-01-2013.img
x for expert mode
h to set heads to 255
s to set sectors to 63
c to set cylinders to value above
r to return to normal mode
n for new partition: primary, number 1, default first sector, +16M size
t to set type of partition with code: c (W95 FAT32 LBA)
a to mark bootable partition number 1
n for new partition: primary, number 2, default first sector, default full size
w to write the partition table
$
Map block devices to the image
$ sudo modprobe loop $ sudo losetup /dev/loop0 beaglenmt-1.4-01-2013.img $ sudo kpartx -av /dev/loop0
Format the boot and rootfs partition
$ sudo mkfs.vfat -F 16 -n "boot" /dev/mapper/loop0p1 $ sudo mkfs.ext2 /dev/mapper/loop0p2
Mount the SD card image file; Copy Bootloaders, Kernel, Rootfs
Create a few temporary mountpoints outside of the beaglebone-buildroot directory
buildroot/ $ cd .. $ mkdir boot_mnt buildroot_mnt rootfs_mnt
Mount the boot (FAT) partition; Copy TI bootloader, u-boot bootloader
$ sudo mount /dev/mapper/loop0p1 boot_mnt $ sudo cp buildroot/output/images/MLO boot_mnt/ $ sudo cp buildroot/output/images/u-boot.img boot_mnt/ $ sudo umount boot_mnt
Mount the buildroot file system and the image root file system; Copy the buildroot file system and kernel image
$ sudo mount -o loop buildroot/output/images/rootfs.ext2 buildroot_mnt $ sudo mount /dev/mapper/loop0p2 rootfs_mnt $ sudo rsync -a buildroot_mnt/ rootfs_mnt/ (Note the forward slash after buildroot_mnt and rootfs_mnt!) # sudo mkdir rootfs_mnt/boot $ sudo cp buildroot/output/images/uImage rootfs_mnt/boot/ $ sudo umount rootfs_mnt $ sudo umount buildroot_mnt
Unassociate the loopback device
$ sudo kpartx -d /dev/loop0 $ sudo losetup -d /dev/loop0
Clone the SD card image file to a real SD card
$ sudo dd if=beaglenmt-1.4-01-2013.img of=/dev/sdcardblockdevice bs=1M
Test boot the Beaglebone!
Insert the SD card and power up the beaglebone with the micro-USB cable.
Observe the boot output in your favorite serial port terminal on /dev/ttyUSB0 (typically). See the boot log attached below for reference.
Booting up
The first boot may take some time as it automatically generates keys for SSH.
On beaglebone: Login as root
On beaglebone: Set a root password
# passwd
On beaglebone: Add a normal user with a password; add the user to the wheel group
# adduser foobar <choose foobar's password> # addgroup foobar wheel
On beaglebone: Adjust your timezone in /etc/TZ, if you downloaded the image.
On host: Use ssh-copy-id to copy over your SSH public key to the beaglebone
$ ssh-copy-id foobar@beagleboneip
Now you can easily remotely administer your beaglenmt through SSH.
All done!
Suggested sshd_config
A suggested /etc/sshd_config based on these securing SSH tips. Be sure to edit the allowed users on the AllowUsers line.
Port 22 AddressFamily any ListenAddress 0.0.0.0 ListenAddress :: PermitRootLogin no AllowUsers alice bob Protocol 2 PermitEmptyPasswords no # Uncomment below to disable passwords and only use keys #PasswordAuthentication no AuthorizedKeysFile .ssh/authorized_keys Subsystem sftp /usr/lib/sftp-server
Example Boot Log
U-Boot SPL 2011.09-00024-gb502930 (Aug 24 2012 - 01:00:13)
Texas Instruments Revision detection unimplemented
No AC power, disabling frequency switch
OMAP SD/MMC: 0
reading u-boot.img
reading u-boot.img
U-Boot 2011.09-00024-gb502930 (Aug 24 2012 - 01:00:13)
I2C: ready
DRAM: 256 MiB
WARNING: Caches not enabled
No daughter card present
NAND: HW ECC Hamming Code selected
nand_get_flash_type: second ID read did not match 10,10 against 00,00
No NAND device found!!!
0 MiB
MMC: OMAP SD/MMC: 0
*** Warning - readenv() failed, using default environment
Net: cpsw
Hit any key to stop autoboot: 3 2 1 0
SD/MMC found on device 0
reading uEnv.txt
** Unable to read "uEnv.txt" from mmc 0:1 **
reading uImage
2077136 bytes read
## Booting kernel from Legacy Image at 80007fc0 ...
Image Name: Linux-3.2.9
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2077072 Bytes = 2 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
XIP Kernel Image ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Linux version 3.2.9 (anteater@anteater-laptop) (gcc version 4.5.4 (Buildroot 2012.08-rc2-00024-gb502930) ) #3 Fri Aug 24 16:35:13 EDT 2012
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=50c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: am335xevm
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] AM335X ES1.0 (sgx neon )
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 65024
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 ro rootfstype=ext2 rootwait ip=none
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 256MB = 256MB total
[ 0.000000] Memory: 256128k/256128k available, 6016k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] modules : 0xbf800000 - 0xc0000000 ( 8 MB)
[ 0.000000] .text : 0xc0008000 - 0xc030f5f4 (3102 kB)
[ 0.000000] .init : 0xc0310000 - 0xc0330000 ( 128 kB)
[ 0.000000] .data : 0xc0330000 - 0xc0368dc0 ( 228 kB)
[ 0.000000] .bss : 0xc0368de4 - 0xc03a3100 ( 233 kB)
[ 0.000000] NR_IRQS:410 nr_irqs:410 410
[ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[ 0.000000] Total of 128 interrupts on 1 active controller
[ 0.000000] OMAP clockevent source: GPTIMER1 at 24000000 Hz
[ 0.000000] OMAP clocksource: GPTIMER2 at 24000000 Hz
[ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.000221] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
[ 0.058650] pid_max: default: 32768 minimum: 301
[ 0.058848] Mount-cache hash table entries: 512
[ 0.059254] CPU: Testing write buffer coherency: ok
[ 0.060204] devtmpfs: initialized
[ 0.064452] print_constraints: dummy:
[ 0.064720] NET: Registered protocol family 16
[ 0.064832] GPMC revision 6.0
[ 0.066151] OMAP GPIO hardware version 0.1
[ 0.067422] omap_mux_init: Add partition: #1: core, flags: 0
[ 0.068951] omap_i2c.1: alias fck already exists
[ 0.069374] failed to create an alias: icss_uart_gclk --> pruss
[ 0.069413] failed to create an alias: gfx_fclk --> sgx_ck
[ 0.069434] hw-breakpoint: debug architecture 0x4 unsupported.
[ 0.069615] omap2_mcspi.1: alias fck already exists
[ 0.069755] omap2_mcspi.2: alias fck already exists
[ 0.077177] bio: create slab <bio-0> at 0
[ 0.079077] usbcore: registered new interface driver usbfs
[ 0.079230] usbcore: registered new interface driver hub
[ 0.079416] usbcore: registered new device driver usb
[ 0.079772] registerd cppi-dma Intr @ IRQ 17
[ 0.079790] Cppi41 Init Done Qmgr-base(d083a000) dma-base(d0838000)
[ 0.079805] Cppi41 Init Done
[ 0.079837] musb-ti81xx musb-ti81xx: musb0, board_mode=0x13, plat_mode=0x3
[ 0.079997] musb-ti81xx musb-ti81xx: musb1, board_mode=0x13, plat_mode=0x1
[ 0.080429] omap_i2c omap_i2c.1: bus 1 rev2.4.0 at 100 kHz
[ 0.082147] Switching to clocksource gp timer
[ 0.094933] musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
[ 0.095133] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
[ 0.096162] musb-hdrc musb-hdrc.0: USB OTG mode controller at d081e000 using DMA, IRQ 18
[ 0.096461] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
[ 0.097105] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[ 0.097228] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[ 0.097372] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 0.097395] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 0.097416] usb usb1: Product: MUSB HDRC host driver
[ 0.097432] usb usb1: Manufacturer: Linux 3.2.9 musb-hcd
[ 0.097448] usb usb1: SerialNumber: musb-hdrc.1
[ 0.098131] hub 1-0:1.0: USB hub found
[ 0.098165] hub 1-0:1.0: 1 port detected
[ 0.098675] musb-hdrc musb-hdrc.1: USB Host mode controller at d0832800 using DMA, IRQ 19
[ 0.099065] NET: Registered protocol family 2
[ 0.099294] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.099746] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.099972] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.100108] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.100127] TCP reno registered
[ 0.100145] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.100180] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.100485] NET: Registered protocol family 1
[ 0.101130] cpuidle-am33xx cpuidle-am33xx.0: failed to register driver
[ 0.114141] msgmni has been set to 500
[ 0.114377] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[ 0.114402] io scheduler noop registered
[ 0.114416] io scheduler deadline registered
[ 0.114476] io scheduler cfq registered (default)
[ 0.116090] ecap: probe of ecap.2 failed with error -2
[ 0.116714] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.118034] omap_uart.0: ttyO0 at MMIO 0x44e09000 (irq = 72) is a OMAP UART0
[ 0.638795] console [ttyO0] enabled
[ 0.643118] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
[ 0.650889] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
[ 0.658680] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
[ 0.666442] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
[ 0.674200] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
[ 0.683198] brd: module loaded
[ 0.690763] loop: module loaded
[ 0.694185] at24 1-0051: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 0.752203] No daughter card found
[ 0.755818] at24 1-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 0.771071] Board name: A335BONE
[ 0.774470] Board version: 00A3
[ 0.777756] The board is a AM335x Beaglebone.
[ 0.783029] tps65217 1-0024: TPS65217 ID 0x7 version 1.0
[ 0.790497] print_constraints: DCDC1: 900 <--> 1800 mV at 1800 mV
[ 0.798939] print_constraints: DCDC2: 900 <--> 3300 mV at 1275 mV
[ 0.807345] print_constraints: DCDC3: 900 <--> 1500 mV at 1100 mV
[ 0.815758] print_constraints: LDO1: 1000 <--> 3300 mV at 1800 mV
[ 0.824168] print_constraints: LDO2: 900 <--> 3300 mV at 3300 mV
[ 0.832474] print_constraints: LDO3: 1800 <--> 3300 mV at 3300 mV
[ 0.840862] print_constraints: LDO4: 1800 <--> 3300 mV at 3300 mV
[ 0.847817] omap_i2c.3: alias fck already exists
[ 0.853045] omap_i2c omap_i2c.3: bus 3 rev2.4.0 at 100 kHz
[ 0.859602] omap_hsmmc.0: alias fck already exists
[ 0.865116] _omap_mux_get_by_name: Could not find signal leds-gpio
[ 0.871867] w1-gpio connected to P8_6
[ 0.876082] at24 3-0054: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 0.962208] BeagleBone cape EEPROM: could not read eeprom at address 0x54
[ 0.969397] at24 3-0055: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 1.052329] BeagleBone cape EEPROM: could not read eeprom at address 0x55
[ 1.059493] at24 3-0056: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 1.142203] BeagleBone cape EEPROM: could not read eeprom at address 0x56
[ 1.149367] at24 3-0057: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 1.232203] BeagleBone cape EEPROM: could not read eeprom at address 0x57
[ 1.239313] BeagleBone cape: exporting ADC pins to sysfs
[ 1.292229] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
[ 1.298708] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
[ 1.306234] davinci_mdio.0: probed
[ 1.309807] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver SMSC LAN8710/LAN8720
[ 1.318604] usbcore: registered new interface driver cdc_acm
[ 1.324554] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.333107] usbcore: registered new interface driver libusual
[ 1.339282] i2c /dev entries driver
[ 1.344162] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[ 1.354357] usbcore: registered new interface driver usbhid
[ 1.360195] usbhid: USB HID core driver
[ 1.364411] Netfilter messages via NETLINK v0.30.
[ 1.369454] nf_conntrack version 0.5.0 (4002 buckets, 16008 max)
[ 1.376108] xt_time: kernel timezone is -0000
[ 1.380883] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 1.386678] TCP cubic registered
[ 1.390057] Initializing XFRM netlink socket
[ 1.394725] NET: Registered protocol family 10
[ 1.400235] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 1.406123] IPv6 over IPv4 tunneling driver
[ 1.411315] NET: Registered protocol family 17
[ 1.416051] NET: Registered protocol family 15
[ 1.420817] Bridge firewalling registered
[ 1.425062] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[ 1.433114] ThumbEE CPU extension supported.
[ 1.437654] mux: Failed to setup hwmod io irq -22
[ 1.443401] omap2_set_init_voltage: unable to get clk dpll1_ck
[ 1.449515] omap2_set_init_voltage: unable to set vdd_mpu_iva
[ 1.455574] omap2_set_init_voltage: unable to get clk l3_ick
[ 1.461500] omap2_set_init_voltage: unable to set vdd_core
[ 1.467261] Power Management for AM33XX family
[ 1.476531] Detected MACID=40:5f:c2:76:77:2b
[ 1.483134] Waiting for root device /dev/mmcblk0p2...
[ 1.553559] mmc0: host does not support reading read-only switch. assuming write-enable.
[ 1.563988] mmc0: new high speed SDHC card at address 1234
[ 1.570218] mmcblk0: mmc0:1234 SA04G 3.70 GiB
[ 1.577457] mmcblk0: p1 p2
[ 1.598123] VFS: Mounted root (ext2 filesystem) readonly on device 179:2.
[ 1.608371] devtmpfs: mounted
[ 1.611759] Freeing init memory: 128K
Starting logging: OK
Initializing random number generator... done.
Starting network...
[ 1.936694]
[ 1.936704] CPSW phy found : id is : 0x7c0f1
[ 1.943521] PHY 0:01 not found
[ 1.948074] ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc (v1.20.2) started
Sending discover...
Sending discover...
Sending discover...
No lease, failing
Getting initial time via ntp.
Starting network time protocol daemon: ntpd.
Starting sshd: OK
Welcome to Buildroot
beaglebone login: root
Password:
# ps
PID USER COMMAND
1 root init
2 root [kthreadd]
3 root [ksoftirqd/0]
4 root [kworker/0:0]
5 root [kworker/u:0]
6 root [khelper]
7 root [kdevtmpfs]
8 root [netns]
9 root [sync_supers]
10 root [bdi-default]
11 root [kintegrityd]
12 root [kblockd]
13 root [omap2_mcspi]
14 root [khubd]
15 root [musb-hdrc.0]
16 root [musb-hdrc.1]
17 root [khungtaskd]
18 root [kswapd0]
19 root [fsnotify_mark]
20 root [OMAP UART0]
21 root [kworker/0:1]
22 root [OMAP UART1]
23 root [OMAP UART2]
24 root [OMAP UART3]
25 root [OMAP UART4]
26 root [OMAP UART5]
27 root [kworker/u:1]
30 root [devfreq_wq]
31 root [mmcqd/0]
41 root /sbin/syslogd -m 0
43 root /sbin/klogd
67 root [flush-179:0]
72 root /usr/sbin/ntpd
75 root /usr/sbin/sshd
79 root /usr/sbin/crond -c /etc/cron/crontabs
81 root -sh
85 root ps
# pstree
init-+-crond
|-klogd
|-ntpd
|-sh---pstree
|-sshd
`-syslogd
#
References
beaglebone-targetted buildroot: https://github.com/fhunleth/buildroot-beaglebone
Tips for securing SSH: http://wiki.centos.org/HowTos/Network/SecuringSSH
SSH tricks: http://matt.might.net/articles/ssh-hacks/
“Embedded Linux From Scratch” Approach
I was also curious about building a root filesystem from scratch, in the Linux From Scratch spirit. Outlined below are the steps to build an extremely minimal, glibc and busybox based root filesystem which boots and supports networking, but not much else. This was mostly for educational purposes.
Minimalist Embedded Linux from Scratch Beaglebone Distribution Build
Comments
comments powered by Disqus

