Create a Mini PC or Server with Olimex's Olinuxino A13/A13Micro
Once you are satisfied with your configuration, save it and go back to the command prompt. Issue the following commands to compile the kernel and build the drivers:
$ make ARCH=arm \ CROSS_COMPILE=arm-linux-gnueabihf- uImage $ make ARCH=arm \ CROSS_COMPILE=arm-linux-gnueabihf- \ INSTALL_MOD_PATH=out modules $ make ARCH=arm \ CROSS_COMPILE=arm-linux-gnueabihf- \ INSTALL_MOD_PATH=out modules_install
When the compilation finishes, you will end up with the kernel image in $KERNEL_DIR/arch/arm/boot/uImage and the modules and drivers in $KERNEL_DIR/out/lib/modules/$KERNEL_VERSION.
The next step is to prepare a minimal filesystem for your board. The easiest option I've found so far is by using the root filesystem from the Debian project or Ubuntu, as both distributions provide armhf binaries for the essential applications. I explain how to prepare both options next.
Preparing the Filesystem: Debian Wheezy
Start by creating a new directory for your root filesystem. For the sake of clarity, I call mine debian-rootfs. You'll use an application called debootstrap to pull the basic filesystem structure from a Debian repository. You are free to use a repository that is closer to you, rather than the same one I use in this example. Enter the following as root or using sudo, inside your newly created directory:
# debootstrap --foreign --arch armhf wheezy \ /home/user/A13System/debian-rootfs \ http://ftp.debian.org/debian
Note that the resulting structure is still not a complete filesystem. The next step is to create a chroot system within your new directory. For those of you who are not familiar with chroot, this command effectively creates an isolated system within your "host" system:
# cp $(which qemu-arm-static) \ /home/user/A13System/debian-rootfs/usr/bin # mount -t proc proc \ /home/user/A13System/debian-rootfs/proc # chroot /home/user/debian-rootfs /bin/bash I have no name!# ./debootstrap/debootstrap \ --second-stage
Copy the qemu-arm-static binary into your root filesystem's
/usr/bin directory. The qemu-arm-static binary helps run the armhf
binaries from your x86/64-bit systems. You also need to mount the host's
proc filesystem into your chroot system. When you first get inside the
chroot system, you might find a strange prompt greeting you ("I have no
name!"). This is not a cause for concern, and you can safely disregard
it. Once you are inside your chroot system, execute another call to
debootstrap to complete the base system (with
If you are curious whether you really are running an armhf system within
your chroot system, issue the
uname command to
check. If you see something
like "armv7l" somewhere in the output, it is an indication
chroot is running the armhf system.
The next step is to update your apt source list file. Within your chroot system, or using the build host's editor, go and edit the file /etc/apt/sources.list that resides inside your root filesystem directory. Add the following lines to this file (remember, you can use other Debian repositories as well):
deb http://ftp.debian.org/debian wheezy main \ contrib non-free deb-src http://ftp.debian.org/debian wheezy main \ contrib non-free deb http://ftp.debian.org/debian wheezy-updates \ main contrib non-free deb-src http://ftp.debian.org/debian \ wheezy-updates main contrib non-free deb http://security.debian.org/ wheezy/updates \ main contrib non-free deb-src http://security.debian.org/ \ wheezy/updates main contrib non-free
Ronald Kurniawan is a software developer living in Brisbane, Australia. Ronald is interested in embedded systems, Linux, Java development and trying to come up with interesting and wacky ways to combine them.