summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Wolf <gwolf@gwolf.org>2019-01-14 17:25:34 -0600
committerGitHub <noreply@github.com>2019-01-14 17:25:34 -0600
commitb785c4837f7c0df6963e8faf8b03e9397c65a595 (patch)
tree0386f5967c4fad957dd72102b1d789ee42b57cf5
parent7137dfb51f10321c3735abb219bcb29b02371bf5 (diff)
parentfe68770d3e1de015c93be414227b2aa7df3cc3d1 (diff)
Merge pull request #49 from liwfi/liw/fix-for-vmdb2
Liw/fix for vmdb2
-rw-r--r--raspi3.yaml41
1 files changed, 25 insertions, 16 deletions
diff --git a/raspi3.yaml b/raspi3.yaml
index 3db9ff3..c3e5b3b 100644
--- a/raspi3.yaml
+++ b/raspi3.yaml
@@ -12,29 +12,31 @@ steps:
device: "{{ output }}"
start: 0%
end: 20%
- part-tag: boot-part
+ tag: /boot
- mkpart: primary
device: "{{ output }}"
start: 20%
end: 100%
- part-tag: root-part
+ tag: /
+
+ - kpartx: "{{ output }}"
- mkfs: vfat
- partition: boot-part
+ partition: /boot
label: RASPIFIRM
- mkfs: ext4
- partition: root-part
+ partition: /
label: RASPIROOT
- - mount: root-part
- fs-tag: root-fs
+ - mount: /
- - mount: boot-part
- mount-on: root-fs
+ - mount: /boot
+ mount-on: /
dirname: '/boot/firmware'
- fs-tag: boot-fs
+
+ - unpack-rootfs: /
# We need to use Debian buster (currently testing) instead of Debian stretch
# (currently stable) for:
@@ -51,19 +53,21 @@ steps:
# required by the WiFi driver.
- qemu-debootstrap: buster
mirror: http://deb.debian.org/debian
- target: root-fs
+ target: /
arch: arm64
components:
- main
- contrib
- non-free
+ unless: rootfs_unpacked
# TODO(https://bugs.debian.org/877855): remove this workaround once
# debootstrap is fixed
- - chroot: root-fs
+ - chroot: /
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:
@@ -76,7 +80,11 @@ steps:
- wpasupplicant
- raspi3-firmware
- linux-image-arm64
- fs-tag: root-fs
+ tag: /
+ unless: rootfs_unpacked
+
+ - cache-rootfs: /
+ unless: rootfs_unpacked
- shell: |
echo "rpi3" > "${ROOT?}/etc/hostname"
@@ -108,23 +116,24 @@ steps:
Please change the root password by running passwd
EOT
- root-fs: root-fs
+ root-fs: /
# Clean up archive cache (likely not useful) and lists (likely outdated) to
# reduce image size by several hundred megabytes.
- - chroot: root-fs
+ - chroot: /
shell: |
apt-get clean
rm -rf /var/lib/apt/lists
# Modify the kernel commandline we take from the firmware to boot from
# the partition labeled raspiroot instead of forcing it to mmcblk0p2
- - chroot: root-fs
+ - chroot: /
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
# clears /etc/resolv.conf on its own.
- shell: |
rm "${ROOT?}/etc/resolv.conf"
- root-fs: root-fs
+ root-fs: /