Edit: This is outdated (old uboot), see the official guide for Cubox-i on Arch Linux Arm
I wasn't happy with the rootfs from Solidrun wiki and the installation guide so here's a quick how to make your own Cubox-i rootfs and install it on the SD card.
Because we use SPL no changes are needed for the different Cubox-i models.
I tested this from another Armv7 device (Samsung Chromebook) but this should work the same from an x86-64 (or any other architecture).
Create the work folder
$this->bbcode_second_pass_code('', '# mkdir -f /tmp/workdir/alarm
# mkdir -f /tmp/workdir/boot
# cd /tmp/workdir')
Connect your sd card and find the device:
$this->bbcode_second_pass_code('', '# dmesg|tail')
From here till the end we will assume that the device is /dev/sdX
Create the partitions and format them.
We will leave enough space before the first partition for writing the SPL and uBoot
$this->bbcode_second_pass_code('', '# fdisk /dev/sdX
# o (purge the partition table)')
Create the boot partition
$this->bbcode_second_pass_code('', '# n (new partition)
# p (default, primary)
# 1
# 2048 (default, start at sector 2048 that will leave 1MB of free space before the first partition)
# +15M (more than enough space)
# t (change the partition id to fat16)
# 6')
Create the root partition
$this->bbcode_second_pass_code('', '# n
# p
# 2
# Enter
# Enter
')
Write and exit
$this->bbcode_second_pass_code('', '# w')
Download uBoot and SPL (from Rabeeh's Dropbox, one of SolidRun engineers)
$this->bbcode_second_pass_code('', '# wget http://dl.dropboxusercontent.com/u/72661517/tbr/spl/SPL
# wget http://dl.dropboxusercontent.com/u/72661517/tbr/spl/u-boot.img')
Write the SPL and uBoot to the SD card
$this->bbcode_second_pass_code('', '# dd if=SPL of=/dev/sdX bs=512 seek=2
# dd if=u-boot.img of=/dev/sdX bs=1K seek=42')
Create the filesystems
$this->bbcode_second_pass_code('', '# mkfs.vfat /dev/sdX1
# mkfs.ext4 /dev/sdX2')
Mount
$this->bbcode_second_pass_code('', '# mount /dev/sdX1 boot
# mount /dev/sdX2 alarm')
Download and extract the rootfs
$this->bbcode_second_pass_code('', '# cd alarm
# wget http://archlinuxarm.org/os/ArchLinuxARM-imx6-latest.tar.gz (although I prefer axel, for ex' "# axel -a -n 5")
# tar -xvf ArchLinuxARM-imx6-latest.tar.gz
# rm ArchLinuxARM-imx6-latest.tar.gz')
Remove the Nitrogen6X kernel package
$this->bbcode_second_pass_code('', '# pacman -R -r ./ --arch armv7h linux-imx6')
Remove unneeded boot scripts
$this->bbcode_second_pass_code('', '# rm 6*')
Install the Cubox-i kernel package
Visit one of the Arch Linux Arm mirrors and get the link for the latest Cubox-i kernel.
$this->bbcode_second_pass_code('', '# wget http://de.us.mirror.archlinuxarm.org/armv7h/core/linux-imx6-cubox-3.0.35-2-armv7h.pkg.tar.xz
# pacman -U -r ./ --arch armv7h linux-imx6-cubox-*-armv7h.pkg.tar.xz
# rm linux-imx6-cubox-*-armv7h.pkg.tar.xz')
Copy the uImage to the boot paratition
$this->bbcode_second_pass_code('', '# cp boot/uImage ../boot/')
Edit fstab
$this->bbcode_second_pass_code('', '# nano etc/fstab')
Enter the following line:
$this->bbcode_second_pass_quote('', '/')dev/mmcblk0p1 /boot vfat defaults,noatime 0 0