Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
https://github.com/gumstix/live-build for new images.This page is out-of-date and is only kept here for reference. I would suggest using
This walk-through teaches you how to set up Ubuntu 12.04 on an embedded ARM computer, the Gumstix OveroSTORM. If you already have a working Linux distribution on your Gumstix and want only to install Goby, you may want to skip straight to InstallFromSource. Please make any changes or corrections to this document (create a wiki account first if you don't have one).
This wiki entry uses a few conventions:
Commands intended to be typed into the host will be formatted as such:
# host pwd ls *
Commands intended to be typed into the gumstix over serial console (picocom) or SSH will be formatted as such:
# gumstix pwd ls *
Commands that are to be typed into a chroot environment on the host representing the gumstix will be formatted:
# gumstix-chroot pwd ls *
Where no directive is given,
# hostis assumed.
Sometimes, I'll use
emacssince the basic commands are the same and
zileis much smaller. You can always use
vi, etc. instead wherever I have
picocomfor connecting to the serial console terminal, as it's very easy to configure (one line). You are, of course, welcome to use
kermitif you prefer.
Other useful websites
- http://www.gumstix.org: Official Gumstix Software Page
- http://wiki.gumstix.org/index.php?title=Main_Page: Gumstix User Wiki
Hardware you need
- A computer, the host, capable of running Ubuntu. Using a virtual machine is discouraged, especially if this is your first time.
- A Gumstix Overo STORM COM and expansion board. I'm using the Tobi and Thumbo expansion boards and Overo "WaterSTORM."
- A micro-SDHC card. I'm using a Samsung Pro 32GB card.
- An SDHC reader (some SD readers do not read SDHC cards).
Software we will install
- Gumstix bootloaders and kernel (3.2) image. I built these images from the repositories: Linux 3.2 (commit 7d06c6e) and u-boot 2014-07. If you prefer to compile your own kernel, see [CompileGumstixKernel](CompileGumstixKernel]].
- Ubuntu 12.04 precise which was the long term support (LTS) release compatible with Linux 3.2. The architecture is armhf.
I'm using Ubuntu 14.04 as the host machine distribution. You need to use a 12.04 or newer Ubuntu machine as your host.
sudo apt-get install multistrap qemu-user-static picocom
Partition the SD Card
I will walk through one way of formatting the SD card. Further details of formatting the SD card for the Gumstix are available on their website: http://www.gumstix.org/create-a-bootable-microsd-card.html.
The SD card is usually seems to usually be
/dev/mmcblk0, so I'll assume that's what it is here. Download the Gumstix partition tool: mk2partsd.
Unmount any existing partitions, e.g.
sudo umount /dev/mmcblk0p1
Make the mk2partsd tool executable:
chmod a+x mk2partsd
Run the partitioner
sudo ./mk2partsd /dev/mmcblk0
When you're done, let the SD card partitions automount by removing the card and reinserting it. Alternatively you can mount on the command line with
Copy the Gumstix Bootloader and Kernel
Download the relevant boot files:
- a x-loader binary image i.e MLO
- a u-boot bootloader binary image i.e. u-boot.img
- a kernel binary image i.e. uImage
- kernel modules
The copying order matters!
sudo cp MLO /media/boot sudo cp u-boot.img /media/boot sudo cp uImage /media/boot
Obtain a root filesystem
Create an Ubuntu root filesystem on the host
We will use multistrap to create a bootable Ubuntu root armhf filesystem on the host that we can later copy to the Gumstix.
Pick a folder to work from, e.g.
Make a directory to hold the root fileystem:
# host cd ~/gumstix mkdir rootfs
Create a file called
~/gumstixand put in the following:
[General] arch=armhf directory=rootfs # same as --tidy-up option if set to true cleanup=true # same as --no-auth option if set to true # keyring packages listed in each debootstrap will # still be installed. noauth=true # whether to add the /suite to be explicit about where apt # needs to look for packages. Default is false. explicitsuite=false # extract all downloaded archives (default is true) unpack=true # the order of sections is not important. # the debootstrap option determines which repository # is used to calculate the list of Priority: required packages. debootstrap=Ubuntu aptsources=Ubuntu [Ubuntu] packages=apt zile adduser makedev less isc-dhcp-client netbase ifupdown iproute net-tools iputils-ping openssh-server sudo picocom minicom build-essential wget curl locales gnu-fdisk traceroute socat zip unzip nano m4 psmisc rsync lsof vim cpufrequtils aptitude iperf module-init-tools udev rsyslog ntp source=http://ports.ubuntu.com/ubuntu-ports/ keyring=ubuntu-keyring suite=precise components=main restricted multiverse universe
These packages will be installed on the new root filesystem that we will later copy to the SD card. Feel free to add/remove packages to suit your needs; however, you can always use
apt-getlater to add/remove the packages listed here.
Create the root filesystem in the directory given in
# host sudo multistrap -f ubuntu.conf
Copy the QEMU ARM emulator into the new root filesystem so that it is on the path once we
# host sudo cp /usr/bin/qemu-arm-static ~/gumstix/rootfs/usr/bin/
Mount the real /dev in the chroot to give it access to /dev/random, etc. Then, run bash in the root
~/gumstix/rootfsas it will be seen by the Gumstix when we're all done:
# host sudo mount -o bind /dev ~/gumstix/rootfs/dev sudo chroot ~/gumstix/rootfs /bin/bash
Finish setting up packages:
# gumstix-chroot /var/lib/dpkg/info/dash.preinst install ln -s /usr/lib/insserv/insserv /sbin/insserv dpkg --configure -a
base-files may fail to configure. If it does, try the following
# gumstix-chroot mv /var/run /var/run2 mkdir /var/run dpkg --configure -a
Set the root user password
# gumstix-chroot passwd
Add a user and (if desired) give it sudo permissions
# gumstix-chroot adduser gobysoft printf "gobysoft ALL=(ALL) ALL" >> /etc/sudoers
Add a DNS server (Google is good)
# gumstix-chroot printf "nameserver 184.108.40.206" > /etc/resolv.conf
Add a sane static network (if you need DHCP install the
# gumstix-chroot zile /etc/network/interfaces auto eth0 iface eth0 inet static address 192.168.0.20 netmask 255.255.255.0 gateway 192.168.0.1 // optional usb auto usb0 iface usb0 inet dhcp
Restart networking to apply the new interface
# gumstix-chroot /etc/init.d/networking restart
You might get an error here depending on the status of eth0 on the host. Try pinging something to see if that works anyway: :
# gumstix-chroot ping 220.127.116.11
If it doesn't, make sure the host's networking is working.
Update the apt repositories
# gumstix-chroot apt-get update
Give the computer a name (I'm using Italian for shrimp)
# gumstix-chroot printf "gambero" > /etc/hostname printf "127.0.0.1 gambero\n" >> /etc/hosts
Add a tty (console) on the appropriate serial port (ttyO2 for the Tobi board for this kernel version; older kernels used ttyS2). Add a file called "/etc/init/ttyO2.conf" with the following contents:
# tty02 - getty # # This service maintains a getty on ttyS0 from the point the system is # started until it is shut down again. start on stopped rc or RUNLEVEL= stop on runlevel [!12345] respawn exec /sbin/getty -L 115200 ttyO2 vt102
Add a proc filesystem (http://en.wikipedia.org/wiki/Procfs) to fstab
# gumstix-chroot zile /etc/fstab # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0
If you are using a "STORM" board, these are not stable at 1GHz using Linux 3.2 (non-"STORM" boards can skip this step). To avoid this problem, underclock the CPU. To do this, in /etc/init.d/cpufrequtils, set:
ENABLE="true" GOVERNOR="conservative" MAX_SPEED="800000" MIN_SPEED="0"
Do anything else you want to do in the chroot environment, such as installing Goby: InstallFromSource. Your host computer (even running QEMU) is likely much faster than the Gumstix itself.
Type "exit" or Ctrl-C from the chroot'd bash.
Unmount the bind mounted dev
sudo umount ~/gumstix/rootfs/dev
Copy over the root filesystem and boot the Gumstix
Copy over the files to the SD card (recursive, preserving permissions and showing progress):
# host cd ~/gumstix/rootfs sudo rsync -aP . /media/rootfs/
In the future, if you make changes to the rootfs on the host computer that you can to propagate to the SD card, simply run this command again. Run it with source and destination reversed to update the host computer rootfs if you make changes directly on the SD card.
Install the kernel modules
#host cd /media/rootfs/ sudo tar xfJ /path/to/modules.tar.xz
Unmount the SD card partitions:
# host sudo umount /media/boot sudo umount /media/rootfs
Remove the SD card from the host and insert into the Gumstix.
Attach the mini USB-B to USB-A cable from the Console port on the Tobi board to the host. A USB serial device (e.g.
/dev/ttyUSB0) will be created on the host.
Start a serial console on the host
# host picocom /dev/ttyUSB0 -b 115200
Power on the Gumstix.
Login using "gobysoft" and the password you gave when creating that user.