Linaro

From Gumstix User Wiki
Revision as of 08:01, 5 October 2012 by Gumstix (Talk | contribs) (Category:How_to_-_Ubuntu)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Gumstix Overo COM is supported by the Linaro Project. Linaro is not a distribution but really an effort to make a common framework for unleashing open-source software on embedded systems. The Linaro project is backed by Canonical (the people behind Ubuntu) among others which means this is a great place to start if you want to run Ubuntu on your Overo COM.

Getting the Images

Gumstix is scheduled for inclusion in the next Linaro release due in May 2011. As of Mar 2011, an Alpha 3 release is available although you will want to use the daily snapshots for the most up-to-date fixes. You'll need two components:

  • an Overo-specific hardware pack (look for hwpack_linaro-overo_20XXXXXX-1_armel_supported.tar.gz)
  • an image. There are developer (console-only), ALIP (internet platform), or Ubuntu-desktop versions. For beginners, the ALIP package is recommended. Look for the linaro-o-alip-tar-20XXXXXX-0.tar.gz tarball.

Download these two components and while you are waiting, grab a few important tools...

Getting the Tools

linaro-media-create is a tool to automatically create a bootable microSD for your Overo. For those running Ubuntu Natty, apparently this will do the trick:

sudo apt-get install linaro-image-tools

For those sporting Maverick (10.10), Lucid (10.04) and maybe older versions :

sudo add-apt-repository ppa:linaro-maintainers/tools
sudo apt-get update 
sudo apt-get install linaro-image-tools
sudo apt-get install qemu-user-static

More details are available here

Making a Card

The final step is actually creating the microSD card. Navigate to the directory where you downloaded the image and the hardware pack, slip a microSD card into your machine. The general format of the command you have to enter is the following:

sudo linaro-media-create --rootfs ext3 --mmc [microSD_path] --binary [image_file] --hwpack [hwpack_file] --dev overo

An example of a command would be (your microSD_path, image_file and hwpack_file may be different):

sudo linaro-media-create --rootfs ext3 --mmc /dev/mmcblk0 --binary linaro-n-ubuntu-desktop-tar-20110314-0.tar.gz --hwpack hwpack_linaro-overo_20110314-0_armel_supported.tar.gz --dev overo

Notes:

  • use dmesg to check that your SD card is actually /dev/mmcblk0 before doing this

This command will take a little while to download any extra bits it needs and format your card. For me, this was about 20 minutes total and I waited a long time on the 'Populating rootfs partition' step. Once it is done, unmount the card and slide it into your Overo COM and power on as normal.

Compiling your own Kernel (Advanced)

This is for advanced users who want more customizability with their kernel. You will need bootable MicroSD card created using linaro-media-create.

Install the cross toolchain to cross compile your kernel. Details to install on Ubuntu 10.04 and 10.10 can be found here and for Ubuntu 11.04 and later can be found here

Clone the source code for the kernel using git. A list of kernels can be found at http://git.linaro.org.

$ git clone git://git.linaro.org/kernel/linux-linaro-3.1.git

Next, select a defconfig file to use as the .config file. The .config file contains what modules we want built into our kernel. For the Overo, the omap2plus_defconfig works as a good base.

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- omap2plus_defconfig

There's no point in building our own kernel if we are going to use default configs. To tweak the modules installed, run the following command. You will be greeted nice GUI to select your modules. Press 'Y' on the module if you want it to be built inside the kernel, 'M' build it as a module, and 'N' to exclude it.

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- menuconfig

Now build the kernel and modules.

$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage
$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- modules

To deploy your custom kernel, mount your MicroSD card created using linaro-media-create. Find out where it mounts and run the following commands.

$ cp arch/arm/boot/uImage /media/boot/

For the modules, run the following:

$ make ARCH=arm INSTALL_MOD_PATH=/media/rootfs/ modules_install
$ make ARCH=arm INSTALL_FW_PATH=/media/rootfs/lib/firmware/ firmware_install

On the target, pause the boot process and type in the following commands

setenv loadbootscript    // This disables the UUID validation of the kernel/rootfs
setenv console 'ttyO2,115200n8' // Depends on the console for your platform
run bootcmd

To save these commands, use 'saveenv' before 'run bootcmd'

Related Links