diff options
| author | Lars Wirzenius <liw@liw.fi> | 2019-01-02 10:40:34 +0200 |
|---|---|---|
| committer | Lars Wirzenius <liw@liw.fi> | 2019-01-13 15:43:12 +0200 |
| commit | 5e2dc9c56977942a96c1ce5d2bb7bd03b861540a (patch) | |
| tree | 84692da1da9da1cce5b1751dbfbfa75802956a1f | |
| parent | 92f08cce01d7e84ad43fe2633dd8933b0b089384 (diff) | |
Add: support for caching and unpacking the rootfs
This speeds up iterative development of a vmdb specification file: the
output of qemu-debootstrap and the apt installation additinal packages
are cached. They take up most of the time of a full run. If modifying
other parts of raspi3.yaml, this means an iteration drops from about
20 minutes to 16 seconds on my laptop.
If making changes to the cached parts, the cache tarball needs to be
deleted between runs.
The --rootfs-tarball options MUST now be used on all invocations.
| -rw-r--r-- | raspi3.yaml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/raspi3.yaml b/raspi3.yaml index 328fb91..df03ba1 100644 --- a/raspi3.yaml +++ b/raspi3.yaml @@ -37,6 +37,8 @@ steps: dirname: '/boot/firmware' fs-tag: boot-fs + - unpack-rootfs: root-fs + # We need to use Debian buster (currently testing) instead of Debian stretch # (currently stable) for: # @@ -58,6 +60,7 @@ steps: - main - contrib - non-free + unless: rootfs_unpacked # TODO(https://bugs.debian.org/877855): remove this workaround once # debootstrap is fixed @@ -65,6 +68,7 @@ steps: shell: | echo 'deb http://deb.debian.org/debian buster main contrib non-free' > /etc/apt/sources.list apt-get update + unless: rootfs_unpacked - apt: install packages: @@ -78,6 +82,10 @@ steps: - raspi3-firmware - linux-image-arm64 fs-tag: root-fs + unless: rootfs_unpacked + + - cache-rootfs: root-fs + unless: rootfs_unpacked - shell: | echo "rpi3" > "${ROOT?}/etc/hostname" @@ -122,6 +130,7 @@ steps: # the partition labeled raspiroot instead of forcing it to mmcblk0p2 - chroot: root-fs shell: | + ls -aR /boot sed -i 's/.dev.mmcblk0p2/LABEL=RASPIROOT/' /boot/firmware/cmdline.txt # TODO(https://github.com/larswirzenius/vmdb2/issues/24): remove once vmdb |
