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 ( 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 in a Linux PC e.g.:

as well as 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

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:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

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

16 Replies to “AllWinner A10 Initramfs Support and Linaro 12.07 Image”

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

  2. 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.

  3. 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.

  4. @cnxsoft

    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!

  5. 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.

  6. @nklh
    There must be an option in the GUI, but sure where. This is basically Lubuntu so there must be some doc somewhere.
    Using the command line

    sudo dpkg-reconfigure console-data
    sudo dpkg-reconfigure locales

    should work.

  7. @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 french azerty keyboard but was not able to do the same under Alip, I’ll try harder 😀

  8. @cnxsoft
    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 )

  9. 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?

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC