On 11/4/19 6:36 PM, Alex Bennée wrote:
From: Gerd Hoffmann <[email protected]>

Instead of fetching the prebuilt image from patchew download the install
iso and prepare the image locally.  Install to disk, using the serial
console.  Create qemu user, configure ssh login.  Install packages
needed for qemu builds.

It would be nice to be able to mount some host directory as target ccachedir and use ccache within the VM.

Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Kamil Rytarowski <[email protected]>
Tested-by: Thomas Huth <[email protected]>
[ehabkost: rebased to latest qemu.git master]
Signed-off-by: Eduardo Habkost <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Alex Bennée <[email protected]>
---
  tests/vm/netbsd | 189 +++++++++++++++++++++++++++++++++++++++++++++---
  1 file changed, 179 insertions(+), 10 deletions(-)

diff --git a/tests/vm/netbsd b/tests/vm/netbsd
index 18aa56ae826..5e04dcd9b16 100755
--- a/tests/vm/netbsd
+++ b/tests/vm/netbsd
@@ -2,10 +2,11 @@
  #
  # NetBSD VM image
  #
-# Copyright 2017 Red Hat Inc.
+# Copyright 2017-2019 Red Hat Inc.
  #
  # Authors:
  #  Fam Zheng <[email protected]>
+#  Gerd Hoffmann <[email protected]>
  #
  # This code is licensed under the GPL version 2 or later.  See
  # the COPYING file in the top-level directory.
@@ -13,20 +14,53 @@
import os
  import sys
+import time
  import subprocess
  import basevm
class NetBSDVM(basevm.BaseVM):
      name = "netbsd"
      arch = "x86_64"
+
+    link = 
"https://cdn.netbsd.org/pub/NetBSD/NetBSD-8.0/images/NetBSD-8.0-amd64.iso";
+    size = "20G"
+    pkgs = [
+        # tools
+        "git-base",
+        "pkgconf",
+        "xz",
+        "python37",
+
+        # gnu tools
+        "bash",
+        "gmake",
+        "gsed",
+        "flex", "bison",
+
+        # libs: crypto
+        "gnutls",
+
+        # libs: images
+        "jpeg",
+        "png",
+
+       # libs: ui
+        "SDL2",
+        "gtk3+",
+        "libxkbcommon",
+    ]
[...]

Reply via email to