BeagleBone Black

Published Nov 2, 2023

BeagleBone Black board

Introduction

The BeagleBone Black (BBB) is a completely open-source single-board computer (SBC). The organization that oversees its development (BeagleBone.org), has made both the PCB design and Debian-based Linux OS image available to the public. This means that anyone can manufacture the board or modify its design—for instance, to incorporate the processor into a standalone product—as well as customize the operating system.

The BBB is often compared to its most obvious counterpart, the Raspberry Pi. While both are single-board computers, the Pi tends to shine in multimedia applications, e.g., video streaming, audio synthesis, whereas the BeagleBone may be considered superior for low-power applications, such as data collection and transmission over extended time periods in resource-limited environments. At first glance, the BBB GPIO headers appear to offer more connectivity than the Pi, but keep in mind that many of the pins are shared with memory or dedicated to LED capes.

Resources

The following resources contain excellent instructions on configuring the BeagleBone Black, as well as other boards from the BeagleBoard organization.

OS installation

Flashing Debian

If your BBB was manufactured after 2015, it probably has a Debian image preinstalled on the eMMC (embedded MultiMediaCard) storage. Prior releases of the board were shipped with an Angstrom distribution. It is also possible to install Ubuntu or Arch Linux images. However, in general, it is recommended to use the supported, i.e., tested, Debian releases. A list of the latest supported images can be found at the official downloads page.

At the time of writing, only the Buster IoT AM3358 Debian 10.3 2020-04-06 4GB SD IoT could be run on the board. The Debian LXQT release, which provides a full graphical user interface, seemed to not trigger the normal system boot process. In addition, all of the compatible Ubuntu releases found on BeagleBone forums had broken links. Given these findings, it is highly recommended to commit to the Debian Buster OS.

To install the OS image, download and the img.xz file from the link above and flash the image onto a microSD card with at least 4GB of storage. Many people use balenaEtcher to flash multimedia storage devices. Once the file has been written, insert the SD card into the port on the bottom side of the BeagleBone PCB. For more information, reference the official “Getting Started” web tutorial.

It is critical that the board be powered off before inserting or removing the SD card from the slot reader! To safely power down the board, press and hold the "power" pushbutton located next to the ethernet port. After about 8 seconds, the blue power LED should turn off, indicating a hard shutdown.

After inserting the SD card, press and hold the user boot botton located near the USB 2.0 connector and connect the board to the computer with the supplied USB mini/type A cable. When the series of four LEDs start to flash in sequence, release the user boot button and wait for the board to complete startup. The boot button essentially redirects the system startup to target the SD card instead of the default eMMC storage.

At this time, the BeagleBone can be accessed via the cloud9 web IDE. To launch the IDE, copy and paste the following into a browser window searchbar, selecting the IP address according to the host computer OS:

192.168.7.2

192.168.6.2

192.168.6.2

After a few moments, the cloud9 IDE should load and display a filesystem directory alongside a script editor and terminal window. The device can be used as any other Linux machine.

The next step is to transfer the OS image onto the builtin eMMC storage, which will provide a faster boot time and allow the SD card to be used as extended storage. In the terminal window of the cloud9 IDE, open the /boot/uEnv.txt file in the nano text editor and search for the following sequential lines:

##enable BBB: eMMC Flasher:
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

Uncomment the second line by removing the # prefix:

##enable BBB: eMMC Flasher:
cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

Save the file and reboot the system. At the next startup, the BeagleBone will flash the eMMC storage. According to online forums, the transfer process is expected to require about 45 minutes, but recent experience shows that the process completes in under 10 minutes.

When the transfer is complete, the BeagleBone will automatically power down. At this point, remove the SD card from the board and press the power button to trigger normal startup. Once again, navigate to the cloud9 IDE and confirm the OS version:

cat /etc/dogtag

The output should resemble:

BeagleBoard.org Debian Buster IoT Image 2020-04-06

Walk the dog

Although the cloud9 IDE provides a convenient, if clunky, way to access the BBB filesystem and write scripts, the BeagleBoard Foundation has stated that its support will eventually be discontinued. Regardless, Linux purists would probably prefer a more traditional command line interface (CLI).

SSH

To access the BBB via SSH, we need to first know its IP address. If you are on a home network, this can be relatively straightforward to discover; however, if you are using the BBB for a work project, where the network is loaded with connected devices, this may prove more challenging. Though inelegant, my recommended method for obtaining the BBB IP address, after connecting the board to ethernet and providing power to the 5V barrel input, is to attach a monitor to the mini HDMI port and a keboard to the USB 2.0 host connector, and run either the ifconfig or hostname -I command from the barebones CLI.

As stated in the welcome message, the default login credentials for the Buster IoT distro is debian:temppwd.

Use the output from hostname -I, e.g., 246.87.148.7, to ssh into the BeagleBone from another machine:

ssh debian@246.87.148.7

Updates

After establishing a remote session, the first item to tackle should be updating the boot/maintenance scripts, which are accessed as a git repository. To update the scripts, navigate to /opt/scripts and run git pull:

cd /opt/scripts
git pull

To update the kernel, execute the update_kernel.sh script:

sudo /opt/scripts/tools/update_kernel.sh

Natually, the next step is to update and upgrade the distribution packages:

sudo apt update
sudo apt upgrade

At the time of writing, performing an upgrade results in one dpkg error for the cloud9 package, suggesting that the BeagleBoard Foundation has already implemented the removal of cloud9 support. This error seems to be harmless, though it may be possibly be resolved by recursively deleting the associated cloud9 and bone101 directories.

Users

In many cases, you may want to add a user to the system. To create a new user:

sudo adduser username

To add sudo privileges to the new account:

sudo usermod -aG sudo username

To switch users:

sudo su username

Hello world

Of course, any embedded Linux tutorial would not be complete without a “Hellow World!” demonstration. Navigate to the user home directory and create a new directory called “code” to store program files:

mkdir -p ~/Code/helloworld
cd ~/Code/helloworld

Create a new file called helloworld.c and open it in the nano text editor:

touch helloworld.c
nano helloworld.c

Add the following code to the file:

/*
    helloworld
    Prints "Hello World!" to the terminal
*/

#include "stdio.h"

int main() {
    printf("Hello World!\n");
    return 0;
}

To save the code, press “CTRL+X” to exit, followed by “Y” to save the changes, and “ENTER” to keep the same filename. Then, compile the source using the GNU Compiler Collection (gcc) command line tool:

gcc helloworld.c -o helloworld

Execute the program:

./helloworld

lukasvasadi © 2025