From 8c6bd87e9b0f3f2ae3ef7326c524472905489943 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Tue, 30 Jul 2019 20:55:59 -0400 Subject: [PATCH] images/debian: improve build.yml for cross build --- images/debian/build.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/images/debian/build.yml b/images/debian/build.yml index fa84933..9cd3314 100644 --- a/images/debian/build.yml +++ b/images/debian/build.yml @@ -2,7 +2,6 @@ image: debian/unstable packages: - debootstrap - e2fsprogs - - qemu-system-x86 - qemu-user-static - binfmt-support - rsync @@ -24,10 +23,19 @@ tasks: - genimg: | cd builds.sr.ht cd images/debian/$release + case "$arch" in + arm64) + qpkg=arm + ;; + amd64) + qpkg=x86 + ;; + esac + sudo apt install -y qemu-system-"$qpkg" sudo ./genimg $arch - sanity-check: | cd builds.sr.ht - if [ -e /dev/kvm ] && [ "$(uname -m)" = "x86_64" ] + if [ -e /dev/kvm ] && [ "$(uname -m)" = "x86_64" ] && [ "$arch" = "amd64" ] then # Debian does not have a kvm group so we just gotta do it this way sudo chown build:build /dev/kvm -- 2.38.5