AllWinner A10 Initramfs Support and Linaro 12.07 Image

An initramfs is a minimal root filesystem that is loaded at an early stage of the boot process, before the rootfs partition is mounted. This is optional but is now used by many Linux distributions such as Ubuntu in order to speed up boot time among others things.

Up to recently, there was no support for this in the AllWinner A10 nightly builds, and there would be lot of error messages due to ureadahead process with Ubuntu, but I’ve changed that by:

  • Using a boot.scr file (U-Boot Script) for each supported device in order to either follow the default init boot method or do an initramfs boot if uInitrd file is present in the FAT partition.
  • Adding a script (a1x-initramfs.sh) to generate and install uInitrd initramfs in the rootfs. The initramfs can’t be generated at build time since the hardware packs are (mostly) distribution agnostic. If you want an initramfs, you’ll need to run the script manually, as initramfs support is optional.

I mainly followed and adapted the instructions provided by Peter (j1nx) for boot.scr and the initramfs.

As an example, I’ll generate a Linaro ALIP (ARM Linux Internet Platform) 12.07 SD card for Mele A1000 with VGA output.

First let’s download the latest hardware pack from http://dl.linux-sunxi.org/nightly/latest/ in a Linux PC e.g.:


as well as a1x-media-create.sh script and Linaro ALIP 12.07 rootfs:


We’ve got all we need. Let’s create a bootable SD card the usual way:


Now let’s insert the SD card into the Mele A1000 and boot as usual. You should notice a lot of error messages:


Those are due to the lack of initramfs, but are not critical. The boot from power to LXDE took 1m 8s.

I’ll run all the next command as root in the serial console, if you want to run those with a terminal window in LXDE as linaro user, simply run add “sudo”to the commands.

Let’s check the content of the FAT partition:


There’s the u-boot script, script.bin and the kernel image.

Time to generate the initramfs, simply run a1x-initramfs.sh:


uInitrd file has been properly generated in the FAT partition:


Let’s reboot. All errors messages are gone and it just took 38s to boot to LXDE.

This script currently only support Ubuntu / Debian. Feel free to update it to support other distributions.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
16 Comments
oldest
newest
12 years ago

Great job!

Is this now also included into the build server?

e8hffff
e8hffff
12 years ago

Has anyone yet got the build to write to the internet memory? I’m not that interested running off a SD.

12 years ago

ok, well done.

Does ureadahead also terminates at the end of the boot? The errors are gone but I still had ureadahead terminating at the end of the boot process.

12 years ago

I saw that thread indeed. Will look into it again after the holidays. Disabled ureadahead, because it is meant to lower the disk access times anyways.

12 years ago

Oh and I think I have a very good idea which board you are looking at ;). Hope to see a review soon 😀

e8hffff
e8hffff
12 years ago

Many thanks. I’m working on other projects, but would have loved to look into using LiveSuit to write an Linux Image a while back. The other day I spent some time catching up on how to use adb and fastboot to manage Android devices. I’m just way behind the mark compared to others in this field.

I really hope those that make Linux images use something like PPA’s or repositories to keep systems up to date.

Thanks everyone!

nklh
nklh
12 years ago

Boot in less than 20seconds using HDMI hwpack, Linaro’s precise alip and a 16GB Class10 SDcard : very fast but didn’t find how to change locale or at least layout for keyboard.

nklh
nklh
12 years ago

@Jean-Luc Aufranc (CNXSoft) ok, I’ll try but linaro’s alip seems to have a “weird” lxde. it’s very different from Lubuntu’s Desktop version that I use through a VM, although I’m not a Linux Power User. Not afraid of command Line but a GUI is far away effortlessly accessible. Meanwhile, I switched to linaro’s ubuntu Desktop but It’s obviously to heavy to be usable without graphic acceleration (I assume isn’t supported yet?), very laggy, freezing sometime (mostly everytime) and also I definitively hate unity :D. thanks, for helping, I started to tweak mele’s android config files to switch for a full… Read more »

nklh
nklh
12 years ago


finally , nothing seems worked with linaro’s alip.

so :
-I switched to Linaro’s ubuntu desktop version (hdmi hwpack 2012.08.09 build)
-Installed lxde through apt-get
-Added “setxkbmap -layout fr” at end of .bashrc

it’s a lot smother now.

Sometimes, the mele don’t achieve boot and the screen don’t switch on if the ethernet cable is connected (I assume it’s that because the ethernet activity led blink a lot) but maybe it’s due to my ISP adsl box.

And also it don’t let me shutdown it through GUI (command line are salvation )

Pawel
Pawel
12 years ago

Hi, I have my first Android box (mele a2000). I tried this instruction, everything ended with success, but when mele is booting it stops logging after “Starting kernel …”, sometime is logged 1-5 lines more. I used 3 different SDHC 4GB cards without success. Did someone have the same problem and knows solution?

Boardcon Rockchip and Allwinner SoM and SBC products