The Mini-X is a small ARM device intended to run Android (on Allwinner A10 CPU) and be plugged into a TV. This document is about installing the dCore variant (2015-06-01 release) of TinyCoreLinux (TCL) on a micro-SD (uSD) card to run instead of Android. On the TCL website there is a script to setup the uSD card, but it is intended to be run on a machne already running TCL, so I did it manually instead.

This document isn't a howto - it's just a set of notes for myself. Consider yourself lucky if it is helpful to you.

WARNING: Getting this wrong could wipe data off your computer. Don't proceed unless you accept the risk.

NOTE: Wherever these instructions say "sdX", replace with the correct device for your uSD card. If you get it wrong, you may wipe stuff off your computer. Some parts of the process need to be done as root.

Obtain files

Some of the files come from mksdcard.tgz (which is also where these instructions are derived from).

I didn't need a special script.bin or sunxi-spl.bin or u-boot.bin - I just used the ones from mksdcard.tgz

Wipe first part of uSD

user@host:~$ dd of=/dev/sdX if=/dev/zero bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.104036 s, 10.1 MB/s

Create boot partition

root@host:~# fdisk -u=sectors /dev/sdX

Welcome to fdisk (util-linux 2.26.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xc371ef29.

Command (m for help): n
Partition type
    p   primary (0 primary, 0 extended, 4 free)
    e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-15693823, default 2048): 2048
Last sector, +sectors or +size{K,M,G,T,P} (2048-15693823, default 15693823): +8M

Created a new partition 1 of type 'Linux' and of size 8 MiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

Format boot partition

root@host:~# mkfs.vfat /dev/sdX1
mkfs.fat 3.0.28 (2015-05-16)

Install boot files

user@host:~$ dd if=sunxi-spl.bin of=/dev/sdX bs=1024 seek=8
20+1 records in
20+1 records out
20992 bytes (21 kB) copied, 0.0100839 s, 2.1 MB/s

user@host:~$ dd if=u-boot.bin of=/dev/sdX bs=1024 seek=32
247+1 records in
247+1 records out
253296 bytes (253 kB) copied, 0.0874771 s, 2.9 MB/s

Copy more boot files

root@host:~# mkdir mnt
root@host:~# mount /dev/sdX1 mnt
root@host:~# cp uImage uCore uEnv.txt script.bin boot.scr /root/mnt/
‘uImage’ -> ‘/root/mnt/uImage’
‘uCore’ -> ‘/root/mnt/uCore’
‘uEnv.txt’ -> ‘/root/mnt/uEnv.txt’
‘script.bin’ -> ‘/root/mnt/script.bin’
‘boot.scr’ -> ‘/root/mnt/boot.scr’

This is what you'll have:

root@host:~# ls /root/mnt -l
total 7320
-rwx------ 1 root root     304 Jun 26 22:13 boot.scr
-rwx------ 1 root root   42144 Jun 26 22:13 script.bin
-rwx------ 1 root root 2957185 Jun 26 22:13 uCore
-rwx------ 1 root root     117 Jun 26 22:13 uEnv.txt
-rwx------ 1 root root 4484836 Jun 26 22:13 uImage


Stick the uSD in the Mini-X and power it up - it should boot...