← Back to HW choice

1. Introduction

In this section you will find all the intructions required to download, deploy and customize Open Enea Linux on Texas Instruments’ BeagleBone Black. The Beaglebone is an ARM Cortex-A8 development board with USB, Ethernet, 2D/3D accelerated graphics, audio, serial, JTAG, and SD/MMC. The Black adds a faster CPU, more RAM, eMMC flash and a micro HDMI port. In this section you will start by downloading the OEL images and transferring then to a SD memory card. Once that is done, you will set up a serial connection so that you can talk to the board, and then you are going to start the Boot Loader from the NOR flash and then load Open Enea Linux Kernel and Device Tree. After that you are going to mount the File System that you have previously deployed in the SD card and then boot OEL on target. Once booted, you will configure OEL Package Manager, so that it points at OEL server, making thousands of packages available to you, just one command away.

Once you have completed this section, move on to Develop, where you will find a set of videos and instructions that will take you from downloading OEL development tools to debugging your application on target.

2. Download OEL

Open a terminal and download Open Enea Linux images from our repositories:

$ mkdir ~/OpenEneaLinux/
$ cd ~/OpenEneaLinux
$ mkdir partition1
$ mkdir partition2
$ cd partition1
$ wget http://openenealinux.org/repository/images/beaglebone/partition1/MLO
$ wget http://openenealinux.org/repository/images/beaglebone/partition1/u-boot.img
$ wget http://openenealinux.org/repository/images/beaglebone/partition1/uEnv.txt
$ cd ..
$ cd partition2
$ wget http://openenealinux.org/repository/images/beaglebone/core-image-minimal-rpm-beaglebone.tar.bz2


3. DeployOEL

Time to deploy Open Enea Linux on target. We start from the beginning:

3.1 SD Card Installation

You will start by identifying the location of your microSD card. Connect your microSD card to your computer using an SD adapter or a memory card reader. Observe which device it registers as by typing ls /dev/sd*. If you are uncertain, remove the microSD Card and the entry should go away. Alternatively, you can also check your dmesg log:

$ dmesg
[12163.585486] sd 9:0:0:4: [sdf] 3813376 512-byte logical blocks: (1.95 GB/1.81 GiB)
[12163.586796] sd 9:0:0:4: [sdf] No Caching mode page present
[12163.586807] sd 9:0:0:4: [sdf] Assuming drive cache: write through
[12163.588855] sd 9:0:0:4: [sdf] No Caching mode page present
[12163.588865] sd 9:0:0:4: [sdf] Assuming drive cache: write through
[12163.591533]  sdf: sdf1 sdf2
[12163.907520] EXT2-fs (sdf1): warning: mounting unchecked fs, running e2fsck is recommended
[12164.072498] EXT2-fs (sdf2): warning: mounting unchecked fs, running e2fsck is recommended

[In our case, our MicroSD card contains 2 partitions: /dev/sdf1 and /dev/sdf2]

Once you know which device your microSD Card is, follow the instructions below replacing /dev/sdX with the name of the microSD Card in your system:

I. Unmount existing partitions (if any):

$ sudo umount /dev/sdX

II. Begin partitioning the microSD Card by typing:

$ sudo fdisk /dev/sdX

III. Initialize a new partition table by selecting o, then verify the partition table is empty by selecting p.

IV. Create a boot partition by selecting n for ‘new’, then p for ‘primary’, and 1 to specify the first partition. Press enter to accept the default first sector and specify 4095 for the last sector.

V. Change the partition type to FAT16 by selecting t for ‘type’ and e for ‘W95 FAT16 (LBA)’.

VI. Set the partition bootable by selecting a then 1.

VII. Next, create the data partition for the root file system by selecting n for ‘new’, then p for ‘primary’, and 2 to specify the second partition. Accept the default values for the first and last sectors by pressing enter twice.

VIII. Press p to ‘print’ the partition table. It should look similar to the one below:

Disk /dev/sdb: 7948 MB, 7948206080 bytes
255 heads, 63 sectors/track, 966 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xafb3f87b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048        4095        1024    e  W95 FAT16 (LBA)
/dev/sdb2            4096    15523839     7759872   83  Linux

IX. Now you can commit the changes by selecting w to ‘write’ the partition table and exit fdisk.

X. Finally, format the partitions. Format partition 1 as FAT and partition 2 as ext4 by typing:

$ sudo mkfs.vfat /dev/sdX1
$ sudo mkfs.ext4 /dev/sdX2


3.2 Image Transfer

Mount partition 1 and copy MLO, u-boot and our config file uEnv to it:

$ sudo mount /dev/sdX1 /mnt/
$ cd ~/OpenEneaLinux/partition1
$ sudo cp MLO /mnt
$ sudo cp u-boot.img /mnt
$ sudo cp uEnv.txt /mnt

Sync and unmount:

$ sync
$ sudo umount /mnt

Now install the root filesystem to the second partition in your microSD Card (/dev/sdX2):

$ sudo mount /dev/sdX2 /mnt/
$ sudo tar jxfv ~/OpenEneaLinux/partition2/core-image-minimal-rpm-beaglebone.tar.bz2 -C /mnt
$ cd /mnt/boot
$ sudo wget http://openenealinux.org/repository/images/beaglebone/FS-boot-dir/am335x-bone.dtb
$ sudo wget http://openenealinux.org/repository/images/beaglebone/FS-boot-dir/am335x-boneblack.dtb
$ sudo wget http://openenealinux.org/repository/images/beaglebone/FS-boot-dir/uImage
$ sudo wget http://openenealinux.org/repository/images/beaglebone/FS-boot-dir/vmlinux-3.14.0-yocto-standard
$ cd

Sync and unmount again:

$ sync
$ sudo umount /mnt

The microSD Card is now ready to boot.

3.3 Serial Connection

We will use Minicom (text-based serial port communications program) to talk to our BeagleBone Black. Install it first (alternatively you can get it via the Synaptic Package Manager):

$ sudo apt-get install minicom

Connect the BeagleBone Black to the host using a USB TTL Serial cable (there are other ways to talk to your board but this part assumes you are using one such cable). Make sure you connect the pins as shown here (pin1: Ground-Black; pin4: Receive-Green; pin5: Transmit-White). In order to find the name of your port(s) enter this command in terminal:

$ dmesg | grep tty

And the output should be something like this:

[   22.587279] console [tty0] enabled
[   24.186230] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[   24.186860] 00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[   51.598012] audit(1243322582.732:2): type=1503 operation="inode_permission"
requested_mask="a::" denied_mask="a::" name="/dev/tty" pid=5705 profile="/usr
/sbin/cupsd" namespace="default"

What we are interested in is the name of the serial port (in this case ttyS0), which we will need in order to use Minicom. Start Minicom configuration:

$ sudo minicom -s

‘-s’ is for setup and we need to set up port speed, parity and a few other items. This may edit the system-wide defaults in /etc/mini‐com/minirc.dfl with this option. A menu will now be displayed:

| Filenames and paths      |
| File transfer protocols  |
| Serial port setup        |
| Modem and dialing        |
| Screen and keyboard      |
| Save setup as dfl        |
| Save setup as..          |
| Exit                     |
| Exit from Minicom        |

Configure the serial Setup: Select correct serial device ttyX (in our case it happens to be ttyS0); Hardware & Software Flow control = No; Bps = 115200

Leave Minicom open, since you are going to need it for the next step (to exit Minicom when in terminal mode press ‘Ctrl-A’ to get a message bar at the bottom of the terminal window and then press ‘X’).

3.4 Erase eMMC

The Beaglebone Black has eMMC. Pressing the USER/BOOT button when powering on will temporarily change the boot order. But for the sake of simplicity, we suggest you erase the eMMC on the Black, so that it boots off automatically from the SD card. Power on board and see the console prompt in Minicom. Get to u-boot command prompt by interrupting the initial boot process (follow verbose instructions):

U-Boot 2014.07 (Jul 18 2014 - 14:49:15)

I2C:   ready
DRAM:  512 MiB
Net:    not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot:  

Erase the eMMC by issuing the following commands from the u-boot prompt:

U-Boot# mmc dev 1
U-Boot# mmc erase 0 512


3.5 Boot OEL

Now reboot the board and Open Enea Linux should boot automatically! Do not forget that you’ll need to connect the board to the network:

U-Boot# reset

Once it’s booted, loin as root and do not forget to change your password:

Starting syslogd/klogd: done
Stopping Bootlog daemon: bootlogd.
Starting tcf-agent: OK

Open Enea Linux 2014-01-01 beaglebone /dev/ttyO0

beaglebone login: root
root@beaglebone:~# passwd


3.6 Package Manager

Now it is time to customize your board with the packages you need. Let’s start by setting up the Package Manager and make it point to Open Enea Linux repository:

# smart channel -y --add all type=rpm-md baseurl=http://www.openenealinux.org/repository/rpm/all
# smart channel -y --add beaglebone type=rpm-md baseurl=http://www.openenealinux.org/repository/rpm/beaglebone
# smart channel -y --add cortexa8hf_vfp_neon type=rpm-md baseurl=http://www.openenealinux.org/repository/rpm/cortexa8hf_vfp_neon

Now update Package Manager metadata using this command:

# smart update

You are all set! Ready to choose and pick what you need for your development!

Search what you are looking for through thousands of packages. As an example, let’s search for openssh:

# smart search 'openssh'

Not familiar with Smart? Find out more about this package manager here.

3.7 Customize OEL

Let’s say you need to be able to ssh you board. It is this simple!

# smart install openssh


4. Develop

Go to Develop and find out how you can use Open Enea Linux set of Open Source tools to develop and debug your application!

→ Go to Develop
↑ Go up