Enabling Arch Linux ARM on Springboard

Arch Linux is my favorite Linux distribution of the half the dozen I’ve used. It has cutting edge packages, a rolling release (instead of fixed releases it keeps everything always up to date), the best package manager I’ve seen (pacman), an amazing community & wiki — and also ARM support. This last point does matters for Springboard and is the main topic of this post.

The original Linux Development Package for the Springboard uses Debian, and after all the exploration I did recently, I wanted to figure out if I can install Arch Linux instead. This write up is a hopefully detailed, and definitely very technical guide to what I have done to get there.

A quick intro: the VIA Springboard is a Pico-ITX form factor (10cm x 7.2cm) 800MHz ARM Cortex-A9 SoC with 4Gb integrated storage, IGb RAM, HDMI out, 8xGPIO, and support for TTL/LVDS screens too, including touch-screens.

The ingredients

Preparation

On the hardware side I needed:
• Springboard
• an SD card ( above 1Gb should be already good)
• a male mini-USB to female USB converter
• an USB hub
• USB keyboard and mouse
• screen, (and because I use VGA screen, a mini-HDMI to VGA converter)

On the software side let’s start with the Linux Development Package v1.00.00 from the software development packages page. It’s a zip file which has all the kernel source, the toolchain, the installation files, as well as the documentation to how to use all these. Highly recommended to poke around in there, see what’s available.

Kernel compilation

Based on my experiments, for Arch Linux to work I had to to recompile the kernel. The detailed description on how to do that is in the Development Guide pdf inside the dev pack (for convenience, it’s online too).

First I needed the cross-compiler toolchain for ARM (in the BSP/ToolChain directory in the dev pack). To make it easier to install it I’ve made an Arch Linux User Repository (AUR) package called arm-toolchain-springboard.

The BSP/Kernel_Source_Codes directory in the dev pack has the kernel sources (3.0.8), the graphics kernel modules precompiled (binary only), and the basic config file (VAB-600_Linux_defconfig). I have unpacked the kernel sources and the graphics modules in the same directory, and copied the configuration to “.config”. I usually do my changes with “make menuconfig”.

Kernel configuration with `make menuconfig`

As I checked, the minimum required change for Arch Linux to run is to enable “Control Group support” (with pretty much everything inside enabled and compiled in), and “Automatic process group scheduling”. I’ve posted the .config I’ve used online.

After all these changes, ready for compilation. The kernel source zip has a file called “toolchain_setup” to set up the environment, and then run the kernel compilation as

make ubin CROSS_COMPILE=arm_1103_le-

When that command is finished, I had a brand new  “uzImage.bin” file in the kernel directory: the kernel image needed for the further steps.

Installation media

Now I could set up my installation media, based on the original installation instructions at EVK/Update_Package/README.txt in the dev pack. In a nutshell, copy everything from EVK/Update_Package onto a FAT formatted SD card. That includes “scriptcmd” and the “bspinst” directory.

I’ve done the following modifications:
• Replace “bspinst/uzImage.bin” with the newly compiled version from the previous step.
• Remove the tar-gzip compressed root file system image from “bspinst/packages” (the only file there).
• Download the latest Arch Linux ARM armv7 root image, change the extension from .tar.gz to .tgz (peculiarity of the install scripts), and place it in the “bspinst/packages” directory.

That should be all that’s strictly necessary, though I added two added bonus steps. First, if using VGA monitor (via the HDMI to VGA converter), looks like I had to explicitly specify the screen resolution in the configuration file, otherwise the display will be messed up. In my case the monitor is 1280 x 1024px at 75Hz, thus in “bspinst.cfg” in the section “<b>[tpevb]</b>” I had to change

setenv wmt.display.param 4:6:1:1920:1080:60

to

setenv wmt.display.param 4:6:1:1280:1024:75

This should not be needed with HDMI monitors, and wide screens.

The second one is a mere cosmetic change. The “u-boot-logo.data” file turned out to be a BMP image that is shown during the boot. Replace it with another BMP image, and you have your unique splash screen on boot! Design it for black background for best visuals (unlike the photo I used in an earlier post).

After this, I’ve plugged in the SD card, power up Springboard, and in 10-15 seconds or so the new install began in a very obvious way (blue screen, large white lettering). The install took 2-3 minutes in total. When that finished, remove the SD card, the board shut down automatically, and was ready to reboot into my new system.

Some troubleshooting notes:
• If the install hasn’t started after 30 seconds or so, but the splash image is showing, then likely the kernel (uzImage.bin) is not quite right. Can put back the original one onto the install media to debug.
• If the screen is scrambled after the splash image, just leave everything running for 10 minutes or so, remove the SD card, and reboot. The install should be finished correctly regardless of the display during the procedure.

In the new system

If the system boots properly after this, then everything is on track, and ready to make myself at “~/”.

Screenshot of Arch Linux running on Springboard (click to enlarge)

Springboard has 4Gb onboard storage, enough for the Arch Linux base system together with graphical environment and more. I will have to check out how can the home directory be moved onto an SD card for extra storage.

One thing to note. The system thinks that it has one kernel installed (the one comes with Arch Linux), while actually it has another (the one we compiled). The kernel and boot files are stored on /dev/mmcblk1p1, and can be updated through there.

Ready for more?

This is just the first step down the road to get to a properly functioning, optimized, stable, and upgradable Arch Linux system. Hopefully it will be interesting enough for the community to keep exploring and improving on these procedures, and Springboard can be a proper member of the Arch Linux family.

This procedure should be also applicable for other Linux distributions that use a root file system image for installation. I wonder which distribution would be interesting to check out next?