GNOME3 Rootfs Demo

This is the rootfs used by default to build the images for the Chromebooks. The main purpose of this rootfs is show current support in mainline for different boards. The demo runs a Debian based image with GNOME3 and accelerated graphics when possible.

The Debian images are assembled using the debos utility, which uses the Debian package feed beneath. Stuff not available in official Debian packages will be built from sources or downloaded into the final image.

The Debian way to build the demo rootfs

To install debos you can do the following steps:

$ sudo apt install golang git libglib2.0-dev libostree-dev qemu-system-x86 qemu-user-static debootstrap systemd-container xz-utils bmap-tools
$ export GOPATH=`pwd`/gocode
$ go get -u

First, make sure you have KVM installed:

$ sudo apt install qemu-kvm ovmf

And then run:

$ $GOPATH/bin/debos -m 4G <debos-image.yaml>

Now that debos is installed, let’s create the demos images, run:

Export the architecture of your device (arm or arm64 or amd64):

$ export architecture=arm64

And then run:

$ $GOPATH/bin/debos -m 4G -t architecture:$architecture tools/debos/images/gnome-desktop/gnome-desktop.yaml

Will create the following output:

  • debian-gnome-desktop-sid-$architecture.tar.gz, a tarball with the Debian GNOME3 based filesystem.

After that, to create an image run (note this is only supported for arm and arm64 architectures):

$ $GOPATH/bin/debos -m 4G -t architecture:$architecture tools/debos/images/gnome-desktop/chromebook-image.yaml

Will create the following output:

  • debian-gnome-desktop-sid-$architecture.img.gz, a gz-compressed image file for a Chromebook.
  • debian-gnome-desktop-sid-$architecture.img.gz.md5, the image checksum.
  • debian-gnome-desktop-sid-$architecture.img.bmap, a bitmap summary for faster flashing via bmaptools.

To flash it, assuming your SD card is /dev/mmcblk0, use:

$ bmaptool copy debian-gnome-desktop-sid-$architecture.img.gz /dev/mmcblk0

The bmap file is automatically looked for in the current directory.

Note that the credentials to login are debian:debian.


The Docker way to build the demo rootfs


This is really simple as an official container is provided for it:

$ docker pull godebos/debos

To build the image run:

$ docker run --rm --interactive --tty --device /dev/kvm --user $(id -u) --workdir /recipes --mount "type=bind,source=$(pwd),destination=/recipes" --security-opt label=disable godebos/debos <debos-image.yaml>

Extend the rootfs partition to fill available space

What you need to do is to run growpart against you physical disk and partition.

For example your disk is /dev/mmcblk0 and your partition is 2. What growpart does is actually extending the size of your partition to the maximum allowed physical disk size.

You can run below command:

$ growpart /dev/mmcblk0 2

Once it finish you will see growpart has extend your partition table to the maximum available disk size.

Now, you need to reboot your machine. When the machine comes live again, you can run resize2fs command to extend the filesystem. Below is the sample command.

$ resize2fs /dev/mmcblk0p2