summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmondson <dme@dme.org>2020-10-29 16:04:56 +0000
committerDavid Edmondson <dme@dme.org>2020-11-02 08:42:02 +0000
commit8317f3f19d1a9a749fe80232bf3729325fc4c6f2 (patch)
tree824519b62273db765d68eb55c19606d8c78eaefc
parenta44a58f399193ce173567cb18e4bdd9065fcedd1 (diff)
downloadvmdb2-8317f3f19d1a9a749fe80232bf3729325fc4c6f2.tar.gz
test: check-all: Generate an arm64 UEFI image
-rw-r--r--arm64-uefi.vmdb62
-rwxr-xr-xcheck-all7
2 files changed, 69 insertions, 0 deletions
diff --git a/arm64-uefi.vmdb b/arm64-uefi.vmdb
new file mode 100644
index 0000000..4477cd7
--- /dev/null
+++ b/arm64-uefi.vmdb
@@ -0,0 +1,62 @@
+# This is a sample VMDB2 input file that specifies a simple system for
+# an arm64 machine that boots with UEFI.
+
+steps:
+ - mkimg: "{{ output }}"
+ size: 4G
+
+ - mklabel: gpt
+ device: "{{ output }}"
+
+ - mkpart: primary
+ device: "{{ output }}"
+ start: 0%
+ end: 1G
+ tag: efi
+
+ - mkpart: primary
+ device: "{{ output }}"
+ start: 1G
+ end: 100%
+ tag: /
+
+ - kpartx: "{{ output }}"
+
+ - mkfs: vfat
+ partition: efi
+
+ - mkfs: ext4
+ partition: /
+
+ - mount: /
+
+ # Using the virtual-filesystems plugin here upsets qemu-debootstrap,
+ # which ends up unable to create /dev/fd within the chroot, causing
+ # the qemu-debootstrap phase to fail. Until we get to the bottom
+ # that, don't enable the plugin.
+ #- virtual-filesystems: /
+
+ - unpack-rootfs: /
+
+ - qemu-debootstrap: buster
+ arch: arm64
+ mirror: http://deb.debian.org/debian
+ target: /
+ unless: rootfs_unpacked
+
+ - apt: install
+ packages:
+ - linux-image-arm64
+ fs-tag: /
+ unless: rootfs_unpacked
+
+ - cache-rootfs: /
+ unless: rootfs_unpacked
+
+ - chroot: /
+ shell: |
+ echo arm64-uefi-vmdb2 > /etc/hostname
+
+ - grub: uefi
+ tag: /
+ efi: efi
diff --git a/check-all b/check-all
index ffec728..0ac3bdb 100755
--- a/check-all
+++ b/check-all
@@ -4,6 +4,8 @@ set -eu
amd64_tarball="$1"
shift
+arm64_tarball="$1"
+shift
tryit()
{
@@ -34,4 +36,9 @@ do
tryit "$dst/$x.img" "$x.vmdb" "$amd64_tarball"
done
+for x in "$@" arm64-uefi
+do
+ tryit "$dst/$x.img" "$x.vmdb" "$arm64_tarball"
+done
+
echo All test images built successfully.