xsysroot

Swiss army knife to manipulate operating system images

Integrate GNU/Linux systems for single-board computers.

xsysroot is free software

Albert Casals - 2015, 2016

Introduction

xsysroot is a tool that tries to minimize the steps needed to prepare and install operating systems on embedded boards, making it easier to transport the OS to storage devices.

Installing

$ sudo curl -L https://raw.githubusercontent.com/skarbat/xsysroot/master/xsysroot > /usr/bin/xsysroot
$ sudo chmod +x /usr/bin/xsysroot

Tutorial: Build Raspbian for the RaspberryPI

Step 1: Creating a blank image

$ xsysroot --geometry "raspbian.img fat32:40 ext4:800"

Step 2: Defining the image

Create a profile in JSON in xsysroot.conf defining nbdev, sysroot, backing_image, and qcow_image.

Step 3: Accessing the image

$ xsysroot --profile raspbian --renew

Step 4: Installing Raspbian

$ sudo debootstrap --no-check-gpg --verbose --foreign --variant=minbase --arch=armhf jessie $(xsysroot --query sysroot) http://mirror.us.leaseweb.net/raspbian/raspbian/

Step 5: Installing Raspberry firmware

$ xsysroot --chroot
$ apt-get install curl binutils -y
$ /usr/bin/rpi-update

Step 6: Booting the image

$ xsysroot --umount
$ qemu-img convert $(xsysroot --query qcow_image) raspbian-bootable.img
$ sudo dd if=raspbian-bootable.img of=/dev/sda bs=4M

Building Debian packages

xsysroot can create Debian package skeletons and build packages natively for ARM targets.

Python bindings

import xsysroot
print xsysroot.__version__

← Back to Albert Casals homepage