Archive for October, 2013

Exploring the BeagleboneBlack

Essentially we need to answer the questions:

a. How to customize linux kernel for the different usage of the BeagleBoneBlack device?
b. How to write linux kernel module for low level hardware control?
c How to trace through and debug system and applications at runtime?

Getting started guide:

The latest images are available here:

On my PC host, “ifconfig -a” gave:

eth2 Link encap:Ethernet HWaddr c4:ed:ba:7c:25:01
inet addr: Bcast: Mask:

And this happened when the BBB interface is plugged into the USB of the PC host directly.

On the BeagleBoneBlack interface the IP address is:

Details info is given here:

After ssh into the BeagleBoneBlack as root:

cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 297.40
Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls

and so on. And you can view all the /sys interface as well as dmesg for more information.

In the /boot directory is a list of all the dtb (device-tree-blob) used by Angstrom, so to output the original source file:

dtc -I dtb -O dts am335x-boneblack.dtb |more


/ {
#address-cells = <0x1>;
#size-cells = <0x1>;
compatible = “ti,am335x-bone”, “ti,am33xx”;
interrupt-parent = <0x1>;
model = “TI AM335x BeagleBone”;

chosen {

aliases {
serial0 = “/ocp/serial@44e09000”;
serial1 = “/ocp/serial@48022000”;
serial2 = “/ocp/serial@48024000”;
serial3 = “/ocp/serial@481a6000”;
serial4 = “/ocp/serial@481a8000”;
serial5 = “/ocp/serial@481aa000”;

To enabling DNS connectivity to internet these are the following steps:

On the host side ( issue the command:

iptables -A POSTROUTING -t nat -j MASQUERADE
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward

After that you can “cat /proc/sys/net/ipv4/ip_forward” to ensure the value is 1, or using “sysctl”:

sysctl net.ipv4.ip_forward

net.ipv4.ip_forward = 1

On the BeagleBoardBlack side ( issue the command:

/sbin/route add default gw

At this stage, if you ping an outside IP address (eg,, which is the DNS server for SingTel, my ISP provider) it is possible to get a response.

And so the last step is to do this inside the BeagleboardBlack:

echo “nameserver” > /etc/resolv.conf

Here is Android JellyBean installation and setup for BBB:

Here is a performance testing setup for BBB:

And if you are interested to build linux kernel module for it:

And the default kernel modules are:

Module Size Used by
fuse 51875 3
ip_tables 8294 0
x_tables 15072 1 ip_tables
g_multi 55905 2
libcomposite 15228 1 g_multi
rfcomm 25106 0
ircomm_tty 14503 0
ircomm 8846 1 ircomm_tty
irda 89974 2 ircomm_tty,ircomm
ipv6 229989 14
hidp 10112 0
bluetooth 146100 4 hidp,rfcomm
rfkill 16510 3 bluetooth
autofs4 17432 2

Kali Linux produced customization for BBB:

Analysing the systemd (first user process to be executed by Linux kernel,

[ 2.052319] systemd[1]: Inserted module ‘autofs4’
[ 2.054034] systemd[1]: Set hostname to <beaglebone>.
[ 2.307838] systemd[1]: Starting Forward Password Requests to Wall Directory
[ 2.308314] systemd[1]: Started Forward Password Requests to Wall Directory W
[ 2.308562] systemd[1]: Expecting device dev-ttyGS0.device…
[ 2.308658] systemd[1]: Expecting device dev-ttyO0.device…
[ 2.308735] systemd[1]: Starting Remote File Systems.
[ 2.308808] systemd[1]: Reached target Remote File Systems.
[ 2.308882] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
[ 2.309059] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[ 2.309123] systemd[1]: Starting Delayed Shutdown Socket.
[ 2.309300] systemd[1]: Listening on Delayed Shutdown Socket.
[ 2.309394] systemd[1]: Starting Dispatch Password Requests to Console Direct
ory Watch.
[ 2.309660] systemd[1]: Started Dispatch Password Requests to Console Directo
ry Watch.
[ 2.309937] systemd[1]: Starting Arbitrary Executable File Formats File Syste
m Automount Point.
[ 2.310751] systemd[1]: Set up automount Arbitrary Executable File Formats Fi
le System Automount Point.
[ 2.311283] systemd[1]: Starting udev Kernel Socket.
[ 2.311508] systemd[1]: Listening on udev Kernel Socket.
[ 2.311872] systemd[1]: Starting udev Control Socket.
[ 2.312101] systemd[1]: Listening on udev Control Socket.
[ 2.312172] systemd[1]: Starting Swap.
[ 2.312383] systemd[1]: Reached target Swap.
[ 2.312491] systemd[1]: Starting Journal Socket.
[ 2.312840] systemd[1]: Listening on Journal Socket.
[ 2.313002] systemd[1]: Starting File System Check on Root Device…
[ 2.319574] systemd[1]: Starting udev Kernel Device Manager…
[ 2.351204] systemd[1]: Started Set Up Additional Binary Formats.
[ 2.351465] systemd[1]: Mounting Debug File System…
[ 2.371964] systemd[1]: Starting Apply Kernel Variables…
[ 2.375587] systemd[1]: Starting Journal Service…
[ 2.383259] systemd[1]: Started Journal Service.
[ 2.393031] systemd[1]: Starting Load Kernel Modules…
[ 2.398129] systemd[1]: Mounted Huge Pages File System.
[ 2.398443] systemd[1]: Mounting POSIX Message Queue File System…
[ 2.404412] systemd[1]: Started Machine ID first boot configure.
[ 2.406524] systemd[1]: Starting udev Coldplug all Devices…

Another summary pages:

Lots of GPIO hardware information:

For details on customization this page is absolutely good:

In particular a lot of details is covered in Android::Install() and Android::Configure().


Working on my Freescale FREEDOM K20D50M

Quick start demo lab:

Tower module:

All the software download:

In particular in above are two things:

a. Bare metal coding for the ARM M4.

b. Bootloader patch inside the OS QSP zip file: as it come from factor, it is not recognizable in Linux env. But after booting up the K20D50M in bootloader mode, with green light blinking, I immediately apply the patch ( and the result now is that it is recognizable in Linux env.

More useful info:

%d bloggers like this: