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 --second-stage).

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 that your 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.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

python world from tips,tricks,jobs info,opensource,linux

neo12's picture

good post,we can also find more in www.impythonist.wordpress.com

تلغرام للاندرويد

برنامج تلغرام للاندرويد 's picture

The second biggest increase. nice thanks

The second biggest increase:

sollen's picture

The second biggest increase: Insurance costs, which rose 2.76%, or $28, to an annual 18W 12V Work lamps For Motorcycles average of $1,029. AAA’s insurance cost estimates are based on a low-risk driver with a clean driving record.

The second biggest increase:

sollen's picture

The second biggest increase: Insurance costs, which rose 2.76%, or $28, to an annual average of $1,029. AAA’s insurance cost 18W 12V Work lamps For Motorcycles estimates are based on a low-risk driver with a clean driving record.

Reply to comment | Linux Journal

Knights and Dragons hack herunterladen's picture

Hacks Iphone Ipad Jeux Triche Astuces sans jailbreak.Android Hacks Apk Triche sans root illimité Gemmes Pièces OR
Argent Gratuit Telecharger.
www.jeux-hacked.net

Reply to comment | Linux Journal

herrenschmuck wiederverkäufer's picture

I like the valuable info you supply on your articles. I'll bookmark your blog and take a look at again right here regularly.
I'm quite sure I will learn many new stuff proper right here!
Best of luck for the next!

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix