---
layout: post
title: SlackwareARM in Cubieboard2
date: 2014-07-09
## Make sure to change these
published: true
hidden: false
sitemap: false
---

From early this year I’ve been playing with an Allwiner SoC, the
Cubieboard2 is a System on a Chip with 1GHz dual core CPU, 1GB RAM, 4GB
NAND, 1 100MB Ethernet port, MicroSD card slot and a bunch of other
niceties, expansion ports and what not. It comes preloaded with Android
Jelly Bean, but there are several GNU/Linux flavors available.

Sadly I ain’t very fond of none of the available distros, and Slackware
has an ARM port which is now officialy endorsed by Patrick Volkerdi
himself. So I decided to give it a try.

SlackwareARM has official support for some boards and community support
for some others, the main difference is that the official ones work with
the standard Slackware installer and the ones supported by the community
don’t. Luckly the SlackwareARM team provides a compressed mini-root
filesystem with the bare minimal to bootstrap the system.

Here I’ll give only an overview of the steps needed to bootstrap
SlackwareARM 14.1 on Cubieboard2. Detailed guidelines are available in
Spanish language in [Mi
Kiwi](https://freeshell.de/~ecelis/doku.php?id=cubieboard2).

All my hardware runs some sort of Unix like operating system, everything
I describe here was done in a laptop running Slackware64 14.1 with
multi-lib enabled.

1. You need to get a miniroot file from
  [here](http://ftp.arm.slackware.com/slackwarearm/slackwarearm-devtools/minirootfs/roots/)
and unpackit somewhere.
2. You’ll also need the
  [u-boot-sunxi](https://github.com/linux-sunxi/u-boot-sunxi.git),
[sunxi-tools](https://github.com/linux-sunxi/sunxi-tools.git),
[sunxi-boards](https://github.com/linux-sunxi/sunxi-boards.git) and
[linux-sunxi](https://github.com/linux-sunxi/linux-sunxi.git) git cloned
repositories.
3. Finally a cross toolchain to build the sources, get one from
  [here](http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/).
I did choose the arm-2012-03-57-arm-none-linux-gnueabi.
4. Build the sunxi-tools, u-boot-sunxi and linux-sunxi
5. Copy the `u-boot-with-spl.bin` to the mSD
6. Then copy the resulting `uImage` kernel and install `modules` into
  the rootfs directory.
7. Edit and compile the `Cubieboard2.fex` into the `script.bin` file
8. Edit the `uEnv.txt` file
9. Edit and compile the `boot.cmd` into boot.scr
10. Edit `rootfs/etc/fstab`

Place the mSD card into the Cubieboard2 and boot it, if you have an USB
Serial converter you can watch/debug the boot and load of the kernel
attaching your terminal to the serial console using either, `cu`, `minicom`
or `screen`.

For the lazy bums out there, you can download either, a mSD card image
file ready to boot, or the root filesystem compressed and the
u-boot-with-spl.bin files to customize your install from
[MediaFire](http://www.mediafire.com/?gj4k5mvneq7mn).

EOF