Ubuntu based Rootfs provided by Linaro

Together with the different hwpacks we provide for each board/soc we support, the Developer Platform team also provides 4 different types of rootfs, each to cover a specific user need, such as a very minimum rootfs for kernel test and development.

Image types provided by Linaro

All following images are created as a subset of the packages available at Ubuntu. At Linaro we always provide support and development on top of the latest stable Ubuntu release, so please cross-check the Linaro version with the latest one provided from Ubuntu, to know which version is used as reference.

Nano

Provides a very minimum rootfs that's contains a fully function support for apt (the package management system used by Ubuntu). This image only provides console support, and should be used in case you want a fast and small image to develop and verify the kernel and system functionality.

The package list available for the nano image can be found together with the original tar.gz file, such as http://snapshots.linaro.org/precise/images/nano/304/linaro-precise-nano-20120729-304.packages

Developer

Due demands for a minimum-console based image with extra developer tools integrated by default, the developer rootfs was created. This image is based on Nano, but also deploying a working toolchain, debuggers and also additional development and profiling tools needed by kernel and system developers.

An example of the current package set provided at the developer rootfs: http://snapshots.linaro.org/precise/images/developer/279/linaro-precise-developer-20120729-279.packages

ALIP

ALIP is a small distribution used for bringing up ARM boards both by ARM internally and by various customers. It has previously been generated from upstream sources, since Linaro started supporting the Ubuntu archive/packages, a new image was created based on Ubuntu, to satisfy the needed from ARM with their previous ALIP images.

The ALIP image emphasis is on small size, rebuildability, cross-buildability and enough packages to usefully excercise a new board, including graphics and media.

As the main target from ARM is to make it as a usable image for ARM FastModels and Vexpress, the image needs to be small and fast, without the extra burden from a complete desktop stack.

Currently ALIP is based on LXDE (Lubuntu), with lightdm, X11 and chromium as the default graphic applications.

An example of the current package set provided at the ALIP rootfs: https://snapshots.linaro.org/precise/images/alip/284/linaro-precise-alip-20120729-284.packages

Ubuntu Desktop

The Ubuntu Desktop rootfs is basically a stock Ubuntu Desktop environment, with a few extra packages and configs to make it customized for Linaro. This image should bring the exact same environment you'd find at an usual Ubuntu installation, with Unity, Firefox and all the goodness available at the Ubuntu CD images.

An example of the current package set provided at the Linaro Ubuntu-Desktop rootfs: https://snapshots.linaro.org/precise/images/ubuntu-desktop/321/linaro-precise-ubuntu-desktop-20120729-321.packages

Creating the rootfs supported by Linaro

All the images are created and customized with live-build, using mostly the same config options used by the official Ubuntu images. We don't support and don't provide a way for the user to build the entire distro from scratch, as we're also using the Ubuntu archives, together with the Overlay PPA to contain the extra packages supported by Linaro.

Using Live-Build

For all the images we support, we have a specific set of live-build config files. Currently the build scripts are all provided by http://git.linaro.org/gitweb?p=ci/ubuntu-build-service.git;a=summary, including even a README to show how it should be used.

By default we're using Qemu to support cross-bootstrap. Qemu is needed to be able to "natively" run the package post-install scripts, so you don't need a real ARM hardware to generate the images.

An example of how we're generating the Nano image (using Ubuntu 12.04 as host, x86):

$ sudo apt-get install qemu-arm-static bootstrap live-build
$ git clone git://git.linaro.org/ci/ubuntu-build-service.git
$ cd ubuntu-build-service/quantal-armhf-nano
$ ./configure
$ make

At the end you should have the image tar.gz file, the same we're also providing at http://snapshots.linaro.org.

Using the rootfs for hardware/platform bring-up

By default we recommend the user to generate the final image using the rootfs described by this document, together with a valid hwpack also provided by http://snapshots.linaro.org.

As once you're doing hardware/platform bring-up you don't necessarily have everything packaged properly for a hardware pack, you could simply use the generated kernel and bootloader binary, together with the rootfs desired by your use case.

At the moment (with Ubuntu Precise (12.04) based images, you don't necessarily need to provide a valid initrd to boot your system. Using a self-contained kernel (uImage, mostly used by the many Android devices available), and providing the correct boot args for the kernel to find the location of the rootfs.

Using the rootfs with a custom kernel

Generally when building a custom kernel from scratch, you also want to make the modules and source available at the rootfs. In case you only want to provide a self-contained kernel, that's also valid, but remember that you might be missing a few important options needed by Ubuntu.

In case you want to know what are the generic options we usually support at our Ubuntu based kernels, check the Ubuntu config fragment available at http://git.linaro.org/gitweb?p=kernel/configs.git;a=blob;f=linaro/configs/ubuntu.conf;hb=refs/heads/config-core-tracking.

A few options to easily cross build the kernel for a generic ARM platform (with a valid kernel config already in place):

  1. Create a self-contained uImage:
    • Make sure you have all options marked as y, so you don't have to load any module after the system is booted

    • Compile make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage

    • Make the kernel available for the bootloader, always remembering to put a valid root kernel argument, such as root=/dev/mmcblk0p2.

  2. Generate a moduler uImage and copy the modules to the rootfs:
    • Generate your kernel config and let it available at .config
    • Compile make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage and make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules

    • Install the modules at a working directory make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=/somewhere

    • Copy the installed modules at the rootfs (/lib/modules/KERNEL_VERSION)
    • Make the kernel available for the bootloader, always remembering to put a valid root kernel argument, such as root=/dev/mmcblk0p2.

  3. Create a deb package using the upstream scripts available at the kernel tree:
    • Generate your kernel config and let it available at .config
    • Run make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- KBUILD_DEBARCH=armhf deb-pkg to build the kernel package

    • Install the generated bootpackage at the rootfs (mounting it with qemu and runing dpkg -i).

    • Generate the uImage and uInitrd based files using the initrd and vmlinuz file available at /boot

    • Make the kernel available for the bootloader, always remembering to put a valid root kernel argument, such as root=/dev/mmcblk0p2.

Also check https://wiki.linaro.org/RikuVoipio/DeviceNetworking in case you plan to remotely access your rootfs. This could be used by just extracting the rootfs provided by Linaro, and pointing out the kernel to the correct nfs path. Check the link for further instructions.

Packaging the kernel

Platform Teams developed a bunch of scripts to be used by our CI kernel builds, which also helps a lot to create custom kernel packages.

Check http://git.linaro.org/gitweb?p=people/jcrigby/ubuntu-kernel-ci.git;a=summary or https://code.launchpad.net/~linaro-infrastructure/linaro-ci/lci-build-tools, and take a look at the README file. With these scripts, you should be able to generate a valid and working source and binary package, which you could deploy directly at the rootfs, or replace a kernel from a known hardware pack using linaro-hwpack-replace, like linaro-hwpack-replace -t hwpack_linaro-*tar.gz -r linux-image -p linux-image*.deb -i.

Generating a Hardware Pack

After you created your own and working kernel package, and also have a working bootloader for your target, you could also create a hardware pack for your device.

The hardware pack consist of a set of hardware specific packages, that together with the rootfs, can make a working image for a platform/soc.

Please check https://wiki.linaro.org/HardwarePacks for further instructions.

Platform/DevPlatform/Rootfs (last modified 2013-07-22 14:07:30)