User Tools

Site Tools


uSomIQ Ubuntu and Debian

This page describes to how deploy the Ubuntu OS and Debian on a uSomIQ COM.

These instructions were adapted from the ones provided by Robert Nelson available here:

Basic Requirements

GCC Toolchain

wget -c
tar xJf gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux.tar.xz
export CC=`pwd`/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/arm-linux-gnueabihf-


Das U-Boot – the Universal Boot Loader []

U-Boot Download

Download U-Boot via git:

git clone git://
cd u-boot/
git checkout v2013.07 -b tmp

U-Boot Patches

patch -p1 < u-boot-2013.07-usomiq.patch

U-Boot Configure and Build

make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_config

Linux Kernel

git clone git://
cd linux-dev/
git checkout origin/am33x-v3.2 -b tmp

Download a patch to enable uSomIQ support in kernel

patch -p1 < add-usomiq-rcn-v3.2.patch

Run Build Script:


The kernel zImage and modules will be under the deploy directory.

Prebuilt binaries

Root File System

Debian 7.0.0 (Wheezy) Root File System

This file system is very small and can be installed to the NAND flash on uSomIQ. It is not that small like Angstrom minimal distribution (~20M), but will require around 75M on the flash. However it is a real Debian system with apt-get utility installed.

Default User: debian
Password: temppwd

Root User: root
Root Password: root

wget -c

verify the image with:

md5sum debian-7.5-minimal-armhf-2014-07-07.tar.xz
cae9e0cfac14fd6aa19d4c17357aecc8 debian-7.5-minimal-armhf-2014-07-07.tar.xz

Extract Image:

tar xf debian-7.5-minimal-armhf-2014-07-07.tar.xz

Now you have a directory with the archived (tar) file system itself and a file with user names/passwords.

Ubuntu 13.04 (Raring) Root File System

Default User: ubuntu
Password: temppwd

wget -c

verify the image with:

md5sum ubuntu-14.04-minimal-armhf-2014-07-07.tar.xz
c30fb91012701cdbfa00bb6c86868d0a ubuntu-14.04-minimal-armhf-2014-07-07.tar.xz

Extract Image:

tar xJf ubuntu-14.04-minimal-armhf-2014-07-07.tar.xz

Now you have a directory with the archived (tar) file system itself and a file with user names/passwords.

Root File System for NAND

A Root File System around 64Mb in size, for flash applications.

Debian 7 (small flash)

User Password
debian temppwd
root root


wget -c


md5sum debian-7.5-bare-armhf-2014-07-07.tar.xz
a5f0e75e5ad16bb110d4291f54ed6cb9  debian-7.5-bare-armhf-2014-07-07.tar.xz


tar xJf debian-7.5-bare-armhf-2014-07-07.tar.xz

Install Ubuntu/Debian

SD card

Setup microSD card

For these instruction, we are assuming: DISK=/dev/mmcblk0, “sudo fdisk \-l” is useful for determining the device id..

export DISK=/dev/mmcblk0

Erase microSD card:

sudo dd if=/dev/zero of=${DISK} bs=1024 count=1024
sudo parted --script ${DISK} mklabel msdos

Setup Boot Partition:

sudo fdisk ${DISK} << __EOF__


Set Boot Flag

sudo parted --script ${DISK} set 1 boot on

Format Boot Partition as vfat:

sudo mkfs.vfat -F 16 ${DISK}p1 -n boot
sudo mkfs.vfat -F 16 ${DISK}1 -n boot

Setup Root File System Partition:

sudo fdisk ${DISK} << __EOF__


Format rootfs as ext4:

sudo mkfs.ext4 ${DISK}p2 -L rootfs
sudo mkfs.ext4 ${DISK}2 -L rootfs

Mount Partitions

*Note: On most systems these partitions will be auto-mounted…*

sudo mkdir -p /media/boot/
sudo mkdir -p /media/rootfs/

sudo mount ${DISK}p1 /media/boot/
sudo mount ${DISK}p2 /media/rootfs/


sudo mount ${DISK}1 /media/boot/
sudo mount ${DISK}2 /media/rootfs/

Install Bootloaders

Copy MLO/u-boot.img to the boot partition

sudo cp -v ./u-boot/MLO /media/boot/
sudo cp -v ./u-boot/u-boot.img /media/boot/

uEnv.txt based bootscript

Requires: u-boot v2013.04

Create “uEnv.txt” boot script: (nano uEnv.txt)

mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait fixrtc
#To boot old v3.2.x based kernel enable: (BeagleBone/uSomIQ only)
uenvcmd=run loaduimage; run mmc_classic_boot
#To boot new v3.8.x based device tree:
#uenvcmd=run loaduimage; run loadfdt; run mmcargs; bootz ${loadaddr} - ${fdtaddr}

Copy uEnv.txt to the boot partition:

sudo cp -v ./uEnv.txt /media/boot/

Install Kernel and Root File System

To help new users, since the kernel version can change on a daily basis. The kernel building scripts in this git repo will now give you a hint of what kernel version was built.

Script Complete [user@localhost:~$ export kernel_version=3.X.Y-Z]

Copy and Paste that “export kernel_version=3.X.Y-Z” exactly as shown in your own build/desktop environment:

export kernel_version=3.X.Y-Z

Copy Kernel zImage:

sudo cp -v ./linux-dev/deploy/${kernel_version}.zImage /media/boot/zImage

Copy Root File System:

sudo tar xfvp ./*-*-minimal-arm*-*/arm*-rootfs-*.tar -C /media/rootfs/

Copy Kernel modules:

sudo tar xfv ./linux-dev/deploy/${kernel_version}-modules.tar.gz -C /media/rootfs/

Setup /etc/fstab:

sudo nano /media/rootfs/etc/fstab


/dev/mmcblk0p2   /           auto   errors=remount-ro   0   1
/dev/mmcblk0p1   /boot/uboot auto   defaults            0   0

Enable Networking

sudo nano /media/rootfs/etc/network/interfaces


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Enable Serial Login


sudo nano /media/rootfs/etc/inittab

Add at end of file:

T0:23:respawn:/sbin/getty -L ttyO0 115200 vt102


sudo nano /media/rootfs/etc/init/serial.conf


start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

exec /sbin/getty 115200 ttyO0

Remove microSD card:

sudo umount /media/boot
sudo umount /media/rootfs

Install Debian to NAND

Here you will learn how install Debian to a UBIFS partition on a uSomIQ system on module.

1) Install Ubuntu or Debian to a SD card as described in the previous step

2) Download and extract a small Debian file system as described root_file_system_for_nand

You will have an archive debian-7.1-bare-armhf-2013-08-25.tar after extracting. Place this archive to the SD card with OS installed in the previous step.

3) Boot the board with the SD card to u-boot and issue the following commands:

nand erase.chip
mmc rescan
fatload mmc 0 0x81600000 MLO
nand write 0x81600000 0 20000
nand write 0x81600000 20000 20000
nand write 0x81600000 40000 20000

Load the u-boot image u-boot.img to NAND. Note that we use the actual size of the u-boot.img file in Hex. If your file has a different size then update this number

fatload mmc 0 0x81600000 u-boot.img
nand write 0x81600000 80000 57d74 # <- this is the actual size of the u-boot.img file in Hex

Load the kernel image zImage to NAND. Note that we use the actual size of the zImage file in Hex. If your file has a different size then update this number

run loaduimage
nand write ${loadaddr} 280000 2B08f8 # <- this is the actual size of the zImage file in Hex

4) Boot farther to OS

5) Prepare a UBIFS partition

For more information visit:

Preparing NAND partition for modules with 256MB

ubiformat /dev/mtd7 -s 2048 -O 2048
ubiattach /dev/ubi_ctrl -m 7 -O 2048
ubimkvol /dev/ubi0 -s 235MiB -N rootfs
mount -t ubifs ubi0:rootfs /mnt

Preparing NAND partition for modules with 512MB

ubiformat /dev/mtd7 -s 2048 -O 2048
ubiattach /dev/ubi_ctrl -m 7 -O 2048
ubimkvol /dev/ubi0 -s 450MiB -N rootfs
mount -t ubifs ubi0:rootfs /mnt

6) Install the file system to the UBIFS-partiotion

cd /mnt
tar xf <path to image>/debian-7.1-bare-armhf-2013-08-25.tar

7) Enable the Serial login

Edit the file /mnt/etc/inittab as described for the SD card installation.

8) Enable Network

Edit the file /mnt/etc/network/interfaces as described for the SD card installation.

9) Remove the SD card and reboot the board


CircuitCo LCD3 Backlight

Turn on Backlight:

i2cset -f -y 1 0x24 0x07 0x09
i2cset -f -y 1 0x24 0x08 0x60

CircuitCo LCD3/LCD7 TouchScreen

Add to /etc/modules:

usomiq-ubuntu.txt · Last modified: 2015/03/05 02:09 by maxx