Building Up Your ARMs
Creating boot images for Cubieboards
Due to the impending finish of the EU FP7 funded User Centric Networking1 I recently had cause to revisit the excellent work that Thomas Leonard did for the project in getting Xen/ARM running on the Cubieboard2 and Cubietruck (aka Cubieboard3).
The resulting repo, mirage/xen-arm-builder, had languished for several months and the past SD card images had some problems and had been allowed to drop off the ‘Net as a result. However, sterling work by Ian Campbell at a recent Mirage hackathon had started to resurrect this work based on the Alpine Linux distribution. This seemed a promising place to start, so I did :)
Building an Image
Clone the repo:
git clone https://github.com/mor1/arm-image-builder.git cd arm-image-builder
make all # runs `make prepare build image` # make prepare # clones repos, pulls tarballs # make build # use Docker to build the `linux/` and `u-boot/` trees # make image # finally, create the on-disk `sdcard.img`
This clones the necessary repos (Linux, u-boot), builds them, and then puts
together the image file
sdcard.img in the current directory. If on OSX,
sdcard will then attempt to write that to a blank, mounted SD card. This does a
rather hacky auto-discovery of where the SD card might be mounted; if in doubt,
and in any case, always safer to simply
MNT=the-correct-mount-point make sdcard
…or simply use your favourite tools to write the
sdcard.img file to your SD
Using the Image
The end result should be an SD card that you can use to boot your device into Alpine Linux v3.4. At present, completing installation requires then:
- resetting the environment,
- completing Alpine setup via
- (if desired) installing Xen via the
/media/mmcblk0p1/alpine-dom0-install.shscript created as part of building the SD card image,
- (if desired) finally,
domUs via the
/media/mmcblk0p1/debian-domU-install.shscripts, also created as part of building the image.
Hopefully the net result is you end up with a Cubieboard2/3 running Xen with an
dom0 and some
domU images available.
As ever, comments, patches, pull requests welcome!
Grant No. 611001 for those who care. ↩