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.
|When BirdCam Goes Mainstream||Oct 27, 2016|
|Nightfall on Linux||Oct 26, 2016|
|Daily Giveaway - Fun Prizes from Red Hat!||Oct 25, 2016|
|Installing and Running a Headless Virtualization Server||Oct 25, 2016|
|Ubuntu MATE, Not Just a Whim||Oct 21, 2016|
|Non-Linux FOSS: Screenshotting for Fun and Profit!||Oct 20, 2016|
- Nightfall on Linux
- Installing and Running a Headless Virtualization Server
- When BirdCam Goes Mainstream
- Secure Desktops with Qubes: Compartmentalization
- Daily Giveaway - Fun Prizes from Red Hat!
- Ubuntu MATE, Not Just a Whim
- Nasdaq Selects Drupal 8
- Build Your Own Raspberry Pi Camera
- Non-Linux FOSS: Screenshotting for Fun and Profit!
- Polishing the wegrep Wrapper Script