From d3b442654c24920f2eba14e4340c5c8d8d9fa38f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 24 Jan 2019 02:00:23 +0100 Subject: archive-source.sh: Clone the submodules locally MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We cloned the QEMU repository from the local storage. Since the submodules are also available there, clone them too. This is quicker and reduce network use. Signed-off-by: Philippe Mathieu-Daudé [AJB: incorporated review suggestions from danpb] Signed-off-by: Alex Bennée --- scripts/archive-source.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts') diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index 6eed2a2..d3a88f7 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -38,6 +38,13 @@ else fi git clone --shared . "$vroot_dir" test $? -ne 0 && error "failed to clone into '$vroot_dir'" +for sm in $submodules; do + if test -d "$sm/.git" + then + git clone --shared "$sm" "$vroot_dir/$sm" + test $? -ne 0 && error "failed to clone submodule $sm" + fi +done cd "$vroot_dir" test $? -ne 0 && error "failed to change into '$vroot_dir'" -- cgit v1.1 From 2d4e4c01b1a9f5c4f9d066cfdd3fd66542faa8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 22 Jan 2019 11:49:57 +0000 Subject: scripts/qemu.py: allow arches use KVM for their 32bit cousins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A lot of architectures can run their 32 bit cousins on KVM so the kvm_available function needs to be a little less restricting when deciding if KVM is available. Signed-off-by: Alex Bennée --- scripts/qemu.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/qemu.py b/scripts/qemu.py index 0a5e02e..32b00af 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -25,10 +25,18 @@ import tempfile LOG = logging.getLogger(__name__) +# Mapping host architecture to any additional architectures it can +# support which often includes its 32 bit cousin. +ADDITIONAL_ARCHES = { + "x86_64" : "i386", + "aarch64" : "armhf" +} def kvm_available(target_arch=None): - if target_arch and target_arch != os.uname()[4]: - return False + host_arch = os.uname()[4] + if target_arch and target_arch != host_arch: + if target_arch != ADDITIONAL_ARCHES.get(host_arch): + return False return os.access("/dev/kvm", os.R_OK | os.W_OK) -- cgit v1.1