Linaro has a tool called linaro-media-create to install Linaro Ubuntu to an SD card by passing the device, hardware pack file, the rootfs and the board as arguments. Hardware packs are files that contains hardware specific binaries and configs files (e.g. bootloader, kernel…).
I’ve done something similar (albeit more basic) for AllWinner A10 devices so that you can easily install and run Ubuntu (and possibly other distributions) on an SD card. I’ve written 2 scripts for this:
- a10-hwpack-bld.sh – Script to generate evb.bin, build the latest u-boot and linux kernel, retrieve some config files and compress all this in an hardware pack file
- a1x-media-create.sh – Script to make a bootable SD card for AllWinner A10 devices.
You can get the scripts with git:
1 |
git clone git://github.com/cnxsoft/a10-tools.git |
I’ve only tested it with Mele A1000, but if you have other A10 devices such as MK802 mini PC or MINI X media player, it should also work. Installing Ubuntu on tablets should also be possible, but you’ll need to generate the hardware pack files and test it yourself. This is alpha and many things still need to be improved. (Update: I’ve just seen I forgot to enable Wi-Fi by default. Just run “depmod -a” to make sure 8192cu is loaded).
In the first section of this post, I’ll explain some details about the scripts, so If you’re just interesting in trying out Ubuntu 12.04, you can skip to the “Creating a bootable Ubuntu SD card for Mele A1000, MK802, MINI X…” section at the end of this post.
a10-hwpack-bld.sh Script
I wrote this script because a build server will be setup soon, and we should be able to get regular builds for u-boot & the Linux kernel (e.g. daily or weekly), without everybody having to build their own.
The build will clone the following repositories:
- https://github.com/cnxsoft/a10-config – Contains the fex files and some config files for the rootfs
- https://github.com/hno/uboot-allwinner – The recommended u-boot for A1X (v2011.09-sun4i branch for now)
- https://github.com/amery/linux-allwinner – The recommended Linux kernel (3.0.31) for A1X.
- https://github.com/cnxsoft/a10-bin – Binary files (now just Open GLES files) for armel and soon armhf
a10-config has the script.fex for the following devices:
- Mele A1000/A2000. 1 file for HDMI and 1 file for VGA and composite (display mirroring). This should also work for other A10 media player / mini PC such as MK802 and MINI X.
- A few EVB fex files – Extracted from leaked tools.rar
- Ainol tablet (tools.rar)
- BK7011 (tools.rar). I don’t know what this is.
- Onda M702(H6) and N507H5 tablets (tools.rar)
- Teclast T780 tablet (tools.rar)
- TVDEVEVB (TV Development Board?) (tools.rar)
a10-hwpack-bld.sh is run with the file name (without extension) of the fex files and calls fex2bin utility to generate script.bin (aka evb.bin). For example:
1 |
./a10-hwpack-bld.sh mele-a1000 |
The script will then build u-boot and the Linux kernel and generate the hardpack file which will be available in bld_a10_hwpack_${blddate}/${board}_hwpack_${blddate}.7z (e.g. bld_a10_hwpack_2012.06.12/mele-a1000_hwpack_2012.06.12.7z)
Subsequent calls to ./a10-hwpack-bld.sh will not build u-boot nor the kernel, but simply generates the hwpack file for the new device.
a1x-media-create.sh
a1x-media-create.sh will partition the SD card, format the partition, extract the hwpack file and the rootfs and copy all necessary files to create a bootable SD card.
It basically follows the instructions provided on How to Create Your Own Debian / Ubuntu Image for Mele A1000 page.
It is called as follows:
1 |
./a1x-media-create.sh sd_card_device hwpack_file.7z rootfs_file |
You can see examples in the section below.
Creating a bootable Ubuntu 12.04 SD card for Mele A1000, MK802, MINI X…
I’ll provide 2 examples:
- ALIP (ARM Linux Internet Platform) which is based on Ubuntu with Xfce desktop and with the application to access the net such as Firefox and Thunderbird. If needed, you can always use apt-get to install other applications. This is the one I use now.
- Linaro Ubuntu Desktop – The full Ubuntu 12.04 experience with the monthly Linaro release. This is not supposed to be as stable as the official Ubuntu released every 6 months, but still reasonably stable and you can test the very latest Ubuntu improvements.
The first time, make sure git and 7z are installed and download a1x-media-create.sh script:
1 2 3 4 |
sudo apt-get install git p7zip-full git clone git://github.com/cnxsoft/a10-tools.git cd a10-tools chmod +x *.sh |
1 |
./a10-hwpack-bld.sh mk802 |
Warning: If you use the wrong device in the instructions below (I use/dev/sdb as an example), you may completely wipe out your system, so use with care.
Here are the instructions to install ALIP 12.05 on an SD card:
wget http://dl.dropbox.com/u/45842273/mele-a1000_hwpack_2012.06.13.7z
wget http://releases.linaro.org/12.05/ubuntu/precise-images/alip/linaro-precise-alip-20120525-143.tar.gz
./a1x-media-create.sh /dev/sdb mele-a1000_hwpack_2012.06.13.7z linaro-precise-alip-20120525-143.tar.gz
and the instructions to install Linaro Ubuntu Desktop 12.05:
wget http://dl.dropbox.com/u/45842273/mele-a1000_hwpack_2012.06.13.7z
wget http://releases.linaro.org/12.05/ubuntu/precise-images/ubuntu-desktop/linaro-precise-ubuntu-desktop-20120524-177.tar.gz
./a1x-media-create.sh /dev/sdb mele-a1000_hwpack_2012.06.13.7z linaro-precise-ubuntu-desktop-20120524-177.tar.gz

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress