Create a Mini PC or Server with Olimex's Olinuxino A13/A13Micro
Preparing the Kernel and U-Boot
The good people at Linux Sunxi are kind enough to share the kernel and U-Boot code tailored to run on Allwinner chips. You have the option of getting and compiling version 3.0 or 3.4 of the Linux kernel. The compilation procedures are similar. For the purpose of this article, I am using kernel version 3.4. Get the kernel and U-Boot source from Linux Sunxi's GitHub repository:
$ git clone -b sunxi-3.4 https://github.com/linux-sunxi/linux-sunxi.git $ git clone -b sunxi https://github.com/linux-sunxi/u-boot-sunxi.git
Let's compile U-Boot first. Depending on the target system (A13 or A13Micro), go to the U-Boot directory and issue the following command:
$ make a13-olinuxino \ CROSS_COMPILE=arm-linux-gnueabihf-
$ make a13-olinuxinom \ CROSS_COMPILE=arm-linux-gnueabihf-
Note: the dash (-) at the end of the commands are not typos. After the make process finishes, if everything goes correctly, you should end up with u-boot.bin and spl/sunxi-spl.bin.
Go to the kernel source directory. Check the configuration directory ($KERNEL_DIR/arch/arm/configs) for the A13 configuration file (a13_defconfig) or A13Micro (a13om_defconfig). If you do not have the configuration file for A13Micro (which is usually the case), you can find the download URL in the Resources section.
Now you need to check the configuration file for a specific line. I learned the hard way that without this line, the compilation will fail. Add the following line to your configuration file if it does not exist or uncomment it:
Once again, depending on the target system, issue one of these sets of commands to compile the kernel source:
$ make ARCH=arm a13_defconfig $ make menuconfig
$ make ARCH=arm a13om_defconfig $ make menuconfig
The last step allows you to customize your kernel. In order to avoid a long and painful debugging process, always make sure you are able to compile the minimal kernel (that means compiling without any options added) successfully first. Once you succeed, you can add more options to your kernel. Note any options you add to the kernel configuration, as it will aid you in figuring out which feature(s) does not work.
There is a special step you should adhere to if you are compiling the kernel for A13Micro boards. You need to remove the option to "Suspend to RAM and standby", which is located under "Power Management options". A13Micro boards do not support this option.
Figure 1. Selecting Power Management Options
Figure 2. Uncheck Suspend to RAM and Standby
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.
|December Daily Giveaways are Back!||Dec 01, 2015|
|December 2015 Video Preview||Nov 30, 2015|
|Take Control of Your PC with UEFI Secure Boot||Nov 30, 2015|
|Geek Hide-away in Guatemala - Stay for Free!||Nov 26, 2015|
|Microsoft and Linux: True Romance or Toxic Love?||Nov 25, 2015|
|Non-Linux FOSS: Install Windows? Yeah, Open Source Can Do That.||Nov 24, 2015|
- Take Control of Your PC with UEFI Secure Boot
- Cipher Security: How to harden TLS and SSH
- Non-Linux FOSS: Install Windows? Yeah, Open Source Can Do That.
- December Daily Giveaways are Back!
- Web Stores Held Hostage
- Firefox's New Feature for Tighter Security
- Microsoft and Linux: True Romance or Toxic Love?
- Geek Hide-away in Guatemala - Stay for Free!
- diff -u: What's New in Kernel Development
- PuppetLabs Introduces Application Orchestration