From 8fe6d3e8446944294856950ef192cac83e03e58b Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 4 Dec 2022 01:00:52 +0100 Subject: gnu: yajl: Drop custom ‘lib-’ prefix. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/web.scm (yajl): New variable, renamed from… (libyajl): …this one, which is now a DEPRECATED-PACKAGE alias of yajl. Adjust all users. --- gnu/packages/virtualization.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index c0334f1760c..1218112a202 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -1363,7 +1363,7 @@ pretty simple, REST API.") openssl readline cyrus-sasl - libyajl + yajl audit dmidecode dnsmasq @@ -1403,7 +1403,7 @@ to integrate other virtualization mechanisms if needed.") (build-system meson-build-system) (inputs (list openssl cyrus-sasl lvm2 ; for libdevmapper - libyajl)) + yajl)) (native-inputs (list pkg-config intltool `(,glib "bin") vala)) @@ -2269,7 +2269,7 @@ override CC = " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gcc")) ("iproute" ,iproute) ; TODO: patch invocations. ("libaio" ,libaio) ("libx11" ,libx11) - ("libyajl" ,libyajl) + ("yajl" ,yajl) ("ncurses" ,ncurses) ("openssl" ,openssl) ("ovmf" ,ovmf) -- cgit v1.3 From 810b455013037f44801cf1048c81796e77577962 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 17 Dec 2022 01:46:23 +0100 Subject: gnu: QEMU: Update to 7.2.0. * gnu/packages/virtualization.scm (qemu): Update to 7.2.0. [source](snippet): Don't remove slirp, as it's no longer bundled. [arguments]: Remove related configure-flag. Specify Meson path. [native-inputs]: Change from MESON to MESON-0.63. --- gnu/packages/virtualization.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 1218112a202..6890f13233f 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -160,7 +160,7 @@ (define-public qemu (package (name "qemu") - (version "7.1.0") + (version "7.2.0") (source (origin (method url-fetch) @@ -168,7 +168,7 @@ version ".tar.xz")) (sha256 (base32 - "1rmvrgqjhrvcmchnz170dxvrrf14n6nm39y8ivrprmfydd9lwqx0")) + "0mr1xd78bgp1l61281sdx0338ji0aa68j2p9994sskblhwkcwjav")) (patches (search-patches "qemu-build-info-manual.patch" "qemu-disable-aarch64-migration-test.patch" "qemu-fix-agent-paths.patch")) @@ -178,7 +178,7 @@ ;; Delete bundled code that we provide externally. ;; TODO: Unbundle SeaBIOS! (for-each delete-file-recursively - '("dtc" "meson" "slirp")))))) + '("dtc" "meson")))))) (outputs '("out" "static" "doc")) ;5.3 MiB of HTML docs (build-system gnu-build-system) (arguments @@ -195,7 +195,8 @@ (string-append "--host-cc=" gcc) (string-append "--prefix=" out) "--sysconfdir=/etc" - "--enable-slirp=system" + (string-append "--meson=" (search-input-file %build-inputs + "bin/meson")) "--enable-fdt=system" (string-append "--smbd=" out "/libexec/samba-wrapper") "--disable-debug-info" ;for space considerations @@ -371,7 +372,7 @@ exec smbd $@"))) perl flex bison - meson + meson-0.63 ninja pkg-config python-wrapper -- cgit v1.3 From 814214c369851da50e7006266f718b2d9324ada0 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 17 Dec 2022 23:26:09 +0100 Subject: gnu: QEMU: Unbundle SeaBIOS. * gnu/packages/virtualization.scm (qemu)[source](snippet): Delete SeaBIOS ROMs and source code. [arguments]: Add replace-firmwares and delete-firmwares phases. [inputs]: Add SEABIOS. [native-inputs]: Add ACPICA. While here, sort inputs. --- gnu/packages/virtualization.scm | 69 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 8 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 6890f13233f..d0f5fd5af46 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -175,10 +175,13 @@ (modules '((guix build utils))) (snippet '(begin + ;; TODO: Scrub all firmwares from this directory! + (with-directory-excursion "pc-bios" + ;; Delete firmwares provided by SeaBIOS. + (for-each delete-file (find-files "." "^(bios|vgabios).*\\.bin$"))) ;; Delete bundled code that we provide externally. - ;; TODO: Unbundle SeaBIOS! (for-each delete-file-recursively - '("dtc" "meson")))))) + '("dtc" "meson" "roms/seabios")))))) (outputs '("out" "static" "doc")) ;5.3 MiB of HTML docs (build-system gnu-build-system) (arguments @@ -189,15 +192,20 @@ (not (string=? "i686-linux" (%current-system)))) #:configure-flags #~(let ((gcc (search-input-file %build-inputs "/bin/gcc")) + (meson (search-input-file %build-inputs "bin/meson")) + (seabios (search-input-file %build-inputs + "share/firmware/bios.bin")) (out #$output)) (list (string-append "--cc=" gcc) ;; Some architectures insist on using HOST_CC. (string-append "--host-cc=" gcc) + (string-append "--meson=" meson) (string-append "--prefix=" out) + "--sysconfdir=/etc" - (string-append "--meson=" (search-input-file %build-inputs - "bin/meson")) "--enable-fdt=system" + (string-append "--firmwarepath=" out "/share/qemu:" + (dirname seabios)) (string-append "--smbd=" out "/libexec/samba-wrapper") "--disable-debug-info" ;for space considerations ;; The binaries need to be linked against -lrt. @@ -211,6 +219,33 @@ ,@%gnu-build-system-modules) #:phases #~(modify-phases %standard-phases + ;; Since we removed the bundled firmwares above, many tests + ;; can't work. Re-add them here. + (add-after 'unpack 'replace-firmwares + (lambda* (#:key inputs #:allow-other-keys) + (let* ((seabios (dirname (search-input-file + inputs "share/firmware/bios.bin"))) + (seabios-firmwares (find-files seabios "\\.bin$")) + (allowed-differences + ;; Ignore minor differences (addresses etc) in the firmware + ;; data tables compared to what the test suite expects. + '("tests/data/acpi/pc/SSDT.dimmpxm" + "tests/data/acpi/pc/DSDT.dimmpxm" + "tests/data/acpi/pc/ERST.acpierst" + "tests/data/acpi/q35/ERST.acpierst" + "tests/data/acpi/q35/DSDT.cxl")) + (allowed-differences-whitelist + (open-file "tests/qtest/bios-tables-test-allowed-diff.h" + "a"))) + (with-directory-excursion "pc-bios" + (for-each (lambda (file) + (symlink file (basename file))) + seabios-firmwares)) + (for-each (lambda (file) + (format allowed-differences-whitelist + "\"~a\",~%" file)) + allowed-differences) + (close-port allowed-differences-whitelist)))) (add-after 'unpack 'extend-test-time-outs (lambda _ ;; These tests can time out on heavily-loaded and/or slow storage. @@ -277,17 +312,22 @@ (mkdir-p "b/qemu") (chdir "b/qemu") (apply invoke "../../configure" configure-flags))) + ;; Configure, build and install QEMU user-emulation static binaries. (add-after 'configure 'configure-user-static (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((static (assoc-ref outputs "static")) (gcc (search-input-file inputs "/bin/gcc")) + (seabios (search-input-file inputs "/share/firmware/bios.bin")) ;; This is the common set of configure flags; it is ;; duplicated here to isolate this phase from manipulations ;; to the #:configure-flags build argument, as done in ;; derived packages such as qemu-minimal. (configure-flags (list (string-append "--cc=" gcc) (string-append "--host-cc=" gcc) + (string-append "--firmwarepath=" + #$output "/share/qemu:" + (dirname seabios)) "--sysconfdir=/etc" "--disable-debug-info"))) (mkdir-p "../user-static") @@ -313,6 +353,15 @@ (scandir "." (cut string-suffix? "-linux-user" <>)))))))) + + (add-after 'install 'delete-firmwares + (lambda _ + ;; Delete firmares that are accessible on --firmwarepath. + ;; For some reason tests fail if we simply remove them from + ;; pc-bios/meson.build, hence this roundabout way. + (with-directory-excursion (string-append #$output "/share/qemu") + (for-each delete-file + (find-files "." "^(vga)?bios(-[a-z0-9-]+)?\\.bin$"))))) ;; Create a wrapper for Samba. This allows QEMU to use Samba without ;; pulling it in as an input. Note that you need to explicitly install ;; Samba in your Guix profile for Samba support. @@ -357,6 +406,7 @@ exec smbd $@"))) pixman pulseaudio sdl2 + seabios spice usbredir util-linux @@ -367,13 +417,16 @@ exec smbd $@"))) zlib `(,zstd "lib"))) (native-inputs - (list gettext-minimal - `(,glib "bin") ;gtester, etc. - perl - flex + ;; Note: acpica is here only to pretty-print firmware differences with IASL + ;; (see the replace-firmwares phase above). + (list acpica bison + flex + gettext-minimal + `(,glib "bin") ;gtester, etc. meson-0.63 ninja + perl pkg-config python-wrapper python-sphinx -- cgit v1.3 From 35530133ae38ba7ba85a52ba769802e1c4fec6d1 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 20 Dec 2022 17:10:17 +0200 Subject: Revert "gnu: QEMU: Unbundle SeaBIOS." This reverts commit 814214c369851da50e7006266f718b2d9324ada0. SeaBIOS is only buildable on i686-linux machines and has flags set to force building for i386 so that it works from x86_64-linux. This commit breaks qemu and qemu-minimal on all other architectures. --- gnu/packages/virtualization.scm | 69 +++++------------------------------------ 1 file changed, 8 insertions(+), 61 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index d0f5fd5af46..6890f13233f 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -175,13 +175,10 @@ (modules '((guix build utils))) (snippet '(begin - ;; TODO: Scrub all firmwares from this directory! - (with-directory-excursion "pc-bios" - ;; Delete firmwares provided by SeaBIOS. - (for-each delete-file (find-files "." "^(bios|vgabios).*\\.bin$"))) ;; Delete bundled code that we provide externally. + ;; TODO: Unbundle SeaBIOS! (for-each delete-file-recursively - '("dtc" "meson" "roms/seabios")))))) + '("dtc" "meson")))))) (outputs '("out" "static" "doc")) ;5.3 MiB of HTML docs (build-system gnu-build-system) (arguments @@ -192,20 +189,15 @@ (not (string=? "i686-linux" (%current-system)))) #:configure-flags #~(let ((gcc (search-input-file %build-inputs "/bin/gcc")) - (meson (search-input-file %build-inputs "bin/meson")) - (seabios (search-input-file %build-inputs - "share/firmware/bios.bin")) (out #$output)) (list (string-append "--cc=" gcc) ;; Some architectures insist on using HOST_CC. (string-append "--host-cc=" gcc) - (string-append "--meson=" meson) (string-append "--prefix=" out) - "--sysconfdir=/etc" + (string-append "--meson=" (search-input-file %build-inputs + "bin/meson")) "--enable-fdt=system" - (string-append "--firmwarepath=" out "/share/qemu:" - (dirname seabios)) (string-append "--smbd=" out "/libexec/samba-wrapper") "--disable-debug-info" ;for space considerations ;; The binaries need to be linked against -lrt. @@ -219,33 +211,6 @@ ,@%gnu-build-system-modules) #:phases #~(modify-phases %standard-phases - ;; Since we removed the bundled firmwares above, many tests - ;; can't work. Re-add them here. - (add-after 'unpack 'replace-firmwares - (lambda* (#:key inputs #:allow-other-keys) - (let* ((seabios (dirname (search-input-file - inputs "share/firmware/bios.bin"))) - (seabios-firmwares (find-files seabios "\\.bin$")) - (allowed-differences - ;; Ignore minor differences (addresses etc) in the firmware - ;; data tables compared to what the test suite expects. - '("tests/data/acpi/pc/SSDT.dimmpxm" - "tests/data/acpi/pc/DSDT.dimmpxm" - "tests/data/acpi/pc/ERST.acpierst" - "tests/data/acpi/q35/ERST.acpierst" - "tests/data/acpi/q35/DSDT.cxl")) - (allowed-differences-whitelist - (open-file "tests/qtest/bios-tables-test-allowed-diff.h" - "a"))) - (with-directory-excursion "pc-bios" - (for-each (lambda (file) - (symlink file (basename file))) - seabios-firmwares)) - (for-each (lambda (file) - (format allowed-differences-whitelist - "\"~a\",~%" file)) - allowed-differences) - (close-port allowed-differences-whitelist)))) (add-after 'unpack 'extend-test-time-outs (lambda _ ;; These tests can time out on heavily-loaded and/or slow storage. @@ -312,22 +277,17 @@ (mkdir-p "b/qemu") (chdir "b/qemu") (apply invoke "../../configure" configure-flags))) - ;; Configure, build and install QEMU user-emulation static binaries. (add-after 'configure 'configure-user-static (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((static (assoc-ref outputs "static")) (gcc (search-input-file inputs "/bin/gcc")) - (seabios (search-input-file inputs "/share/firmware/bios.bin")) ;; This is the common set of configure flags; it is ;; duplicated here to isolate this phase from manipulations ;; to the #:configure-flags build argument, as done in ;; derived packages such as qemu-minimal. (configure-flags (list (string-append "--cc=" gcc) (string-append "--host-cc=" gcc) - (string-append "--firmwarepath=" - #$output "/share/qemu:" - (dirname seabios)) "--sysconfdir=/etc" "--disable-debug-info"))) (mkdir-p "../user-static") @@ -353,15 +313,6 @@ (scandir "." (cut string-suffix? "-linux-user" <>)))))))) - - (add-after 'install 'delete-firmwares - (lambda _ - ;; Delete firmares that are accessible on --firmwarepath. - ;; For some reason tests fail if we simply remove them from - ;; pc-bios/meson.build, hence this roundabout way. - (with-directory-excursion (string-append #$output "/share/qemu") - (for-each delete-file - (find-files "." "^(vga)?bios(-[a-z0-9-]+)?\\.bin$"))))) ;; Create a wrapper for Samba. This allows QEMU to use Samba without ;; pulling it in as an input. Note that you need to explicitly install ;; Samba in your Guix profile for Samba support. @@ -406,7 +357,6 @@ exec smbd $@"))) pixman pulseaudio sdl2 - seabios spice usbredir util-linux @@ -417,16 +367,13 @@ exec smbd $@"))) zlib `(,zstd "lib"))) (native-inputs - ;; Note: acpica is here only to pretty-print firmware differences with IASL - ;; (see the replace-firmwares phase above). - (list acpica - bison - flex - gettext-minimal + (list gettext-minimal `(,glib "bin") ;gtester, etc. + perl + flex + bison meson-0.63 ninja - perl pkg-config python-wrapper python-sphinx -- cgit v1.3 From 70d9a3171792ce1c409ba86398fd23c84d5c95ac Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 17 Dec 2022 23:26:09 +0100 Subject: gnu: QEMU: Unbundle SeaBIOS. * gnu/packages/virtualization.scm (qemu)[source](snippet): Delete SeaBIOS ROMs and source code. [arguments]: Add replace-firmwares and delete-firmwares phases. [inputs]: Add SEABIOS. [native-inputs]: Add ACPICA. While here, sort inputs. --- gnu/packages/virtualization.scm | 69 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 61 insertions(+), 8 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 6890f13233f..d0f5fd5af46 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -175,10 +175,13 @@ (modules '((guix build utils))) (snippet '(begin + ;; TODO: Scrub all firmwares from this directory! + (with-directory-excursion "pc-bios" + ;; Delete firmwares provided by SeaBIOS. + (for-each delete-file (find-files "." "^(bios|vgabios).*\\.bin$"))) ;; Delete bundled code that we provide externally. - ;; TODO: Unbundle SeaBIOS! (for-each delete-file-recursively - '("dtc" "meson")))))) + '("dtc" "meson" "roms/seabios")))))) (outputs '("out" "static" "doc")) ;5.3 MiB of HTML docs (build-system gnu-build-system) (arguments @@ -189,15 +192,20 @@ (not (string=? "i686-linux" (%current-system)))) #:configure-flags #~(let ((gcc (search-input-file %build-inputs "/bin/gcc")) + (meson (search-input-file %build-inputs "bin/meson")) + (seabios (search-input-file %build-inputs + "share/firmware/bios.bin")) (out #$output)) (list (string-append "--cc=" gcc) ;; Some architectures insist on using HOST_CC. (string-append "--host-cc=" gcc) + (string-append "--meson=" meson) (string-append "--prefix=" out) + "--sysconfdir=/etc" - (string-append "--meson=" (search-input-file %build-inputs - "bin/meson")) "--enable-fdt=system" + (string-append "--firmwarepath=" out "/share/qemu:" + (dirname seabios)) (string-append "--smbd=" out "/libexec/samba-wrapper") "--disable-debug-info" ;for space considerations ;; The binaries need to be linked against -lrt. @@ -211,6 +219,33 @@ ,@%gnu-build-system-modules) #:phases #~(modify-phases %standard-phases + ;; Since we removed the bundled firmwares above, many tests + ;; can't work. Re-add them here. + (add-after 'unpack 'replace-firmwares + (lambda* (#:key inputs #:allow-other-keys) + (let* ((seabios (dirname (search-input-file + inputs "share/firmware/bios.bin"))) + (seabios-firmwares (find-files seabios "\\.bin$")) + (allowed-differences + ;; Ignore minor differences (addresses etc) in the firmware + ;; data tables compared to what the test suite expects. + '("tests/data/acpi/pc/SSDT.dimmpxm" + "tests/data/acpi/pc/DSDT.dimmpxm" + "tests/data/acpi/pc/ERST.acpierst" + "tests/data/acpi/q35/ERST.acpierst" + "tests/data/acpi/q35/DSDT.cxl")) + (allowed-differences-whitelist + (open-file "tests/qtest/bios-tables-test-allowed-diff.h" + "a"))) + (with-directory-excursion "pc-bios" + (for-each (lambda (file) + (symlink file (basename file))) + seabios-firmwares)) + (for-each (lambda (file) + (format allowed-differences-whitelist + "\"~a\",~%" file)) + allowed-differences) + (close-port allowed-differences-whitelist)))) (add-after 'unpack 'extend-test-time-outs (lambda _ ;; These tests can time out on heavily-loaded and/or slow storage. @@ -277,17 +312,22 @@ (mkdir-p "b/qemu") (chdir "b/qemu") (apply invoke "../../configure" configure-flags))) + ;; Configure, build and install QEMU user-emulation static binaries. (add-after 'configure 'configure-user-static (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((static (assoc-ref outputs "static")) (gcc (search-input-file inputs "/bin/gcc")) + (seabios (search-input-file inputs "/share/firmware/bios.bin")) ;; This is the common set of configure flags; it is ;; duplicated here to isolate this phase from manipulations ;; to the #:configure-flags build argument, as done in ;; derived packages such as qemu-minimal. (configure-flags (list (string-append "--cc=" gcc) (string-append "--host-cc=" gcc) + (string-append "--firmwarepath=" + #$output "/share/qemu:" + (dirname seabios)) "--sysconfdir=/etc" "--disable-debug-info"))) (mkdir-p "../user-static") @@ -313,6 +353,15 @@ (scandir "." (cut string-suffix? "-linux-user" <>)))))))) + + (add-after 'install 'delete-firmwares + (lambda _ + ;; Delete firmares that are accessible on --firmwarepath. + ;; For some reason tests fail if we simply remove them from + ;; pc-bios/meson.build, hence this roundabout way. + (with-directory-excursion (string-append #$output "/share/qemu") + (for-each delete-file + (find-files "." "^(vga)?bios(-[a-z0-9-]+)?\\.bin$"))))) ;; Create a wrapper for Samba. This allows QEMU to use Samba without ;; pulling it in as an input. Note that you need to explicitly install ;; Samba in your Guix profile for Samba support. @@ -357,6 +406,7 @@ exec smbd $@"))) pixman pulseaudio sdl2 + seabios spice usbredir util-linux @@ -367,13 +417,16 @@ exec smbd $@"))) zlib `(,zstd "lib"))) (native-inputs - (list gettext-minimal - `(,glib "bin") ;gtester, etc. - perl - flex + ;; Note: acpica is here only to pretty-print firmware differences with IASL + ;; (see the replace-firmwares phase above). + (list acpica bison + flex + gettext-minimal + `(,glib "bin") ;gtester, etc. meson-0.63 ninja + perl pkg-config python-wrapper python-sphinx -- cgit v1.3 From aeabddcfc576961c8c6697b64408bdf034104b9e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 22 Dec 2022 14:06:01 +0100 Subject: gnu: QEMU: Don't provide --firmwarepath for user-mode binaries. * gnu/packages/virtualization.scm (qemu)[arguments]: Remove --firmwarepath from the user-mode emulation configure invocation. --- gnu/packages/virtualization.scm | 4 ---- 1 file changed, 4 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index d0f5fd5af46..4a048450a52 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -318,16 +318,12 @@ (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((static (assoc-ref outputs "static")) (gcc (search-input-file inputs "/bin/gcc")) - (seabios (search-input-file inputs "/share/firmware/bios.bin")) ;; This is the common set of configure flags; it is ;; duplicated here to isolate this phase from manipulations ;; to the #:configure-flags build argument, as done in ;; derived packages such as qemu-minimal. (configure-flags (list (string-append "--cc=" gcc) (string-append "--host-cc=" gcc) - (string-append "--firmwarepath=" - #$output "/share/qemu:" - (dirname seabios)) "--sysconfdir=/etc" "--disable-debug-info"))) (mkdir-p "../user-static") -- cgit v1.3 From ffc0037458674d80267878ccec370300c45a0209 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 20 Dec 2022 17:00:15 +0100 Subject: gnu: SeaBIOS: Split QEMU variants out to separate package. * gnu/packages/firmware.scm (seabios)[arguments]: Move custom build and install phases out to ... (seabios-qemu): ... this new variable. * gnu/packages/virtualization.scm (qemu)[inputs]: Change from SEABIOS to SEABIOS-QEMU. --- gnu/packages/firmware.scm | 193 ++++++++++++++++++++++------------------ gnu/packages/virtualization.scm | 2 +- 2 files changed, 109 insertions(+), 86 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 66e4b63d40b..03c84fbe884 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -420,12 +420,7 @@ executing in M-mode.") (for-each delete-file (find-files "." "\\.hex$")))))) (build-system gnu-build-system) (native-inputs - (append - (list acpica python-wrapper) - (if (member (%current-system) '("i686-linux" "x86_64-linux")) - '() - (list (cross-gcc "i686-linux-gnu") - (cross-binutils "i686-linux-gnu"))))) + (list acpica python-wrapper)) (arguments (list #:tests? #f ;no tests @@ -435,9 +430,6 @@ executing in M-mode.") ;; by Build_overview.md. #~'("EXTRAVERSION=/GNU Guix" "V=1") ;build verbosely - #:modules `(,@%gnu-build-system-modules - (ice-9 threads) - (ice-9 match)) #:phases #~(modify-phases %standard-phases (replace 'configure @@ -449,95 +441,23 @@ executing in M-mode.") (format port #$(package-version this-package)))) ;; If we use (cc-for-target) then we have the system prefix ;; twice or we might have the wrong prefix. - (setenv "CC" "gcc") - #$@(match (%current-system) - ((or "i686-linux" "x86_64-linux") - #~()) - (_ - #~((substitute* "Makefile" - (("CROSS_PREFIX=") - "CROSS_PREFIX=i686-linux-gnu-"))))))) + (setenv "CC" "gcc"))) (add-before 'build 'build-description-tables (lambda _ ;; Regenerate the ACPI description tables. (invoke "make" "iasl") ;; Clear temporary files added by the iasl target. (invoke "make" "clean"))) - (replace 'build - (lambda* (#:key (make-flags #~'()) #:allow-other-keys) - ;; Note: These BIOS configurations are taken from QEMUs roms/ - ;; directory. - (let ((biosen - '(;; The standard BIOS using default options. - ("bios-256k" . ("QEMU=y" "ROM_SIZE=256" "ATA_DMA=n")) - ;; A minimal BIOS for old QEMU machine types. - ("bios-128k" - . ("QEMU=y" "ROM_SIZE=128" "ATA_DMA=n" "BOOTSPLASH=n" - "XEN=n" "USB_OHCI=n" "USB_XHCI=n" "USB_UAS=n" - "SDCARD=n" "TCGBIOS=n" "MPT_SCSI=n" "ESP_SCSI=n" - "MEGASAS=n" "PVSCSI=n" "NVME=n" "USE_SMM=n" - "VGAHOOKS=n" "HOST_BIOS_GEOMETRY=n" "ACPI_PARSE=n")) - ;; Minimal BIOS for the "microvm" machine type. - ("bios-microvm" - . ("QEMU=y" "ROM_SIZE=128" "XEN=n" "BOOTSPLASH=n" "ATA=n" - "AHCI=n" "SDCARD=n" "PVSCSI=n" "ESP_SCSI=n" "LSI_SCSI=n" - "MEGASAS=n" "MPT_SCSI=n" "FLOPPY=n" "FLASH_FLOPPY=n" - "NVME=n" "PS2PORT=n" "USB=n" "LPT=n" "RTC_TIMER=n" - "USE_SMM=n" "PMTIMER=n" "TCGBIOS=n" "HARDWARE_IRQ=n" - "ACPI_PARSE=y")))) - (vgabiosen - '(("ati" . ("VGA_ATI=y" "VGA_PCI=y")) - ("bochs-display" . ("DISPLAY_BOCHS=y" "VGA_PCI=y")) - ("cirrus" . ("VGA_CIRRUS=y" "VGA_PCI=y")) - ("stdvga" . ("VGA_BOCHS=y" "VGA_PCI=y")) - ("virtio" . ("VGA_BOCHS=y" "VGA_BOCHS_VIRTIO=y" "VGA_PCI=y")) - ("vmware" . ("VGA_BOCHS=y" "VGA_BOCHS_VMWARE=y" "VGA_PCI=y")) - ("qxl" . ("VGA_BOCHS=y" "VGA_BOCHS_QXL=y" "VGA_PCI=y")) - ("isavga" . ("VGA_BOCHS=y" "VGA_PCI=n")) - ("ramfb" . ("VGA_RAMFB=y" "VGA_PCI=n"))))) - (mkdir "out") - (n-par-for-each (parallel-job-count) - (match-lambda - ((target . config) - (let* ((dot-config (string-append (getcwd) "/" target - "/.config")) - (flags (append make-flags - (list (string-append "KCONFIG_CONFIG=" - dot-config) - (string-append "OUT=" target "/"))))) - (mkdir target) - (call-with-output-file dot-config - (lambda (port) - (for-each (lambda (entry) - (format port "CONFIG_~a~%" entry)) - config))) - (apply invoke "make" "oldnoconfig" flags) - (apply invoke "make" flags) - (link (string-append target "/" - (if (string-prefix? "vgabios" target) - "vgabios.bin" "bios.bin")) - (string-append "out/" target ".bin"))))) - (append biosen - (map (lambda (pair) - `(,(string-append "vgabios-" (car pair)) - . - ,(cons "BUILD_VGABIOS=y" (cdr pair)))) - vgabiosen)))))) (replace 'install (lambda _ - (let ((firmware (string-append #$output "/share/firmware"))) - (for-each (lambda (bios) - (install-file bios firmware)) - (find-files "out" "\\.bin$")) - (with-directory-excursion firmware - ;; Compatibility symlinks for QEMU. - (symlink "bios-128k.bin" "bios.bin") - (symlink "vgabios-isavga.bin" "vgabios.bin")))))))) + (install-file "out/bios.bin" + (string-append #$output "/share/firmware"))))))) (home-page "https://www.seabios.org/SeaBIOS") (synopsis "x86 BIOS implementation") (description "SeaBIOS is an implementation of a 16bit x86 BIOS. SeaBIOS can run in an emulator or it can run natively on X86 hardware with the use of coreboot.") + (supported-systems '("i686-linux" "x86_64-linux")) ;; Dual licensed. (license (list license:gpl3+ license:lgpl3+ ;; src/fw/acpi-dsdt.dsl is lgpl2 @@ -546,6 +466,109 @@ coreboot.") ;; cpl with a linking exception. license:cpl1.0)))) +(define-public seabios-qemu + (package/inherit seabios + (name "seabios-qemu") + (native-inputs + (if (member (%current-system) '("i686-linux" "x86_64-linux")) + (package-native-inputs seabios) + (modify-inputs (package-native-inputs seabios) + (prepend (cross-gcc "i686-linux-gnu") + (cross-binutils "i686-linux-gnu"))))) + (supported-systems %supported-systems) + (arguments + (substitute-keyword-arguments (package-arguments seabios) + ((#:modules modules %gnu-build-system-modules) + `((ice-9 match) + (ice-9 threads) + ,@modules)) + ((#:phases phases) + #~(modify-phases #$phases + #$@(match (%current-system) + ((or "i686-linux" "x86_64-linux") + #~()) + (_ + #~((add-after 'configure 'configure-cross + (lambda _ + (substitute* "Makefile" + (("CROSS_PREFIX=") + "CROSS_PREFIX=i686-linux-gnu-"))))))) + (replace 'build + (lambda* (#:key (make-flags #~'()) #:allow-other-keys) + ;; Note: These BIOS configurations are taken from QEMUs roms/ + ;; directory. + (let ((biosen + '( ;; The standard BIOS using default options. + ("bios-256k" . ("QEMU=y" "ROM_SIZE=256" "ATA_DMA=n")) + ;; A minimal BIOS for old QEMU machine types. + ("bios-128k" + . ("QEMU=y" "ROM_SIZE=128" "ATA_DMA=n" "BOOTSPLASH=n" + "XEN=n" "USB_OHCI=n" "USB_XHCI=n" "USB_UAS=n" + "SDCARD=n" "TCGBIOS=n" "MPT_SCSI=n" "ESP_SCSI=n" + "MEGASAS=n" "PVSCSI=n" "NVME=n" "USE_SMM=n" + "VGAHOOKS=n" "HOST_BIOS_GEOMETRY=n" "ACPI_PARSE=n")) + ;; Minimal BIOS for the "microvm" machine type. + ("bios-microvm" + . ("QEMU=y" "ROM_SIZE=128" "XEN=n" "BOOTSPLASH=n" + "ATA=n" "AHCI=n" "SDCARD=n" "PVSCSI=n" "ESP_SCSI=n" + "LSI_SCSI=n" "MEGASAS=n" "MPT_SCSI=n" "FLOPPY=n" + "FLASH_FLOPPY=n" "NVME=n" "PS2PORT=n" "USB=n" + "LPT=n" "RTC_TIMER=n" "USE_SMM=n" "PMTIMER=n" + "TCGBIOS=n" "HARDWARE_IRQ=n" "ACPI_PARSE=y")))) + (vgabiosen + '(("ati" . ("VGA_ATI=y" "VGA_PCI=y")) + ("bochs-display" . ("DISPLAY_BOCHS=y" "VGA_PCI=y")) + ("cirrus" . ("VGA_CIRRUS=y" "VGA_PCI=y")) + ("stdvga" . ("VGA_BOCHS=y" "VGA_PCI=y")) + ("virtio" . ("VGA_BOCHS=y" "VGA_BOCHS_VIRTIO=y" + "VGA_PCI=y")) + ("vmware" . ("VGA_BOCHS=y" "VGA_BOCHS_VMWARE=y" + "VGA_PCI=y")) + ("qxl" . ("VGA_BOCHS=y" "VGA_BOCHS_QXL=y" + "VGA_PCI=y")) + ("isavga" . ("VGA_BOCHS=y" "VGA_PCI=n")) + ("ramfb" . ("VGA_RAMFB=y" "VGA_PCI=n"))))) + (mkdir "out") + (n-par-for-each + (parallel-job-count) + (match-lambda + ((target . config) + (let* ((dot-config (string-append (getcwd) "/" target + "/.config")) + (flags (append + make-flags + (list (string-append "KCONFIG_CONFIG=" + dot-config) + (string-append "OUT=" target "/"))))) + (mkdir target) + (call-with-output-file dot-config + (lambda (port) + (for-each (lambda (entry) + (format port "CONFIG_~a~%" entry)) + config))) + (apply invoke "make" "oldnoconfig" flags) + (apply invoke "make" flags) + (link (string-append target "/" + (if (string-prefix? "vgabios" target) + "vgabios.bin" "bios.bin")) + (string-append "out/" target ".bin"))))) + (append biosen + (map (lambda (pair) + `(,(string-append "vgabios-" (car pair)) + . + ,(cons "BUILD_VGABIOS=y" (cdr pair)))) + vgabiosen)))))) + (replace 'install + (lambda _ + (let ((firmware (string-append #$output "/share/firmware"))) + (for-each (lambda (bios) + (install-file bios firmware)) + (find-files "out" "\\.bin$")) + (with-directory-excursion firmware + ;; Compatibility symlinks for QEMU. + (symlink "bios-128k.bin" "bios.bin") + (symlink "vgabios-isavga.bin" "vgabios.bin"))))))))))) + (define-public edk2-tools (package (name "edk2-tools") diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 4a048450a52..18289dd9630 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -402,7 +402,7 @@ exec smbd $@"))) pixman pulseaudio sdl2 - seabios + seabios-qemu spice usbredir util-linux -- cgit v1.3 From ba7f6f0bf3922968d16ad433da818928381e1578 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 22 Dec 2022 13:25:50 +0100 Subject: gnu: QEMU: Unbundle iPXE. * gnu/packages/virtualization.scm (qemu)[source](snippet): Purge iPXE. [arguments]: Re-add firmware files from IPXE-QEMU. [inputs]: Add IPXE-QEMU. --- gnu/packages/virtualization.scm | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 18289dd9630..5c832beb9f7 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -178,10 +178,14 @@ ;; TODO: Scrub all firmwares from this directory! (with-directory-excursion "pc-bios" ;; Delete firmwares provided by SeaBIOS. - (for-each delete-file (find-files "." "^(bios|vgabios).*\\.bin$"))) + (for-each delete-file (find-files "." "^(bios|vgabios).*\\.bin$")) + ;; Delete iPXE firmwares. + (for-each delete-file (find-files "." "^(efi|pxe)-.*\\.rom$"))) ;; Delete bundled code that we provide externally. (for-each delete-file-recursively - '("dtc" "meson" "roms/seabios")))))) + '("dtc" "meson" + "roms/ipxe" + "roms/seabios")))))) (outputs '("out" "static" "doc")) ;5.3 MiB of HTML docs (build-system gnu-build-system) (arguments @@ -195,6 +199,8 @@ (meson (search-input-file %build-inputs "bin/meson")) (seabios (search-input-file %build-inputs "share/firmware/bios.bin")) + (ipxe (search-input-file %build-inputs + "share/firmware/pxe-virtio.rom")) (out #$output)) (list (string-append "--cc=" gcc) ;; Some architectures insist on using HOST_CC. @@ -205,7 +211,8 @@ "--sysconfdir=/etc" "--enable-fdt=system" (string-append "--firmwarepath=" out "/share/qemu:" - (dirname seabios)) + (dirname seabios) ":" + (dirname ipxe)) (string-append "--smbd=" out "/libexec/samba-wrapper") "--disable-debug-info" ;for space considerations ;; The binaries need to be linked against -lrt. @@ -226,6 +233,9 @@ (let* ((seabios (dirname (search-input-file inputs "share/firmware/bios.bin"))) (seabios-firmwares (find-files seabios "\\.bin$")) + (ipxe (dirname (search-input-file + inputs "share/firmware/pxe-virtio.rom"))) + (ipxe-firmwares (find-files ipxe "\\.rom$")) (allowed-differences ;; Ignore minor differences (addresses etc) in the firmware ;; data tables compared to what the test suite expects. @@ -240,7 +250,7 @@ (with-directory-excursion "pc-bios" (for-each (lambda (file) (symlink file (basename file))) - seabios-firmwares)) + (append seabios-firmwares ipxe-firmwares))) (for-each (lambda (file) (format allowed-differences-whitelist "\"~a\",~%" file)) @@ -357,7 +367,9 @@ ;; pc-bios/meson.build, hence this roundabout way. (with-directory-excursion (string-append #$output "/share/qemu") (for-each delete-file - (find-files "." "^(vga)?bios(-[a-z0-9-]+)?\\.bin$"))))) + (append + (find-files "." "^(vga)?bios(-[a-z0-9-]+)?\\.bin$") + (find-files "." "^(efi|pxe)-.*\\.rom$")))))) ;; Create a wrapper for Samba. This allows QEMU to use Samba without ;; pulling it in as an input. Note that you need to explicitly install ;; Samba in your Guix profile for Samba support. @@ -385,6 +397,7 @@ exec smbd $@"))) dtc glib gtk+ + ipxe-qemu libaio libcacard ;smartcard support attr libcap-ng ;VirtFS support -- cgit v1.3 From 209aed9511f41b2bfabe32d2e280192e64e3d54b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 22 Dec 2022 13:50:30 +0100 Subject: gnu: Install QEMU firmare files to 'share/qemu'. This paves the way for using a native search path in the future. * gnu/packages/bootloaders.scm (ipxe-qemu)[arguments]: Install firmware files to 'share/qemu' instead of 'share/firmware'. * gnu/packages/firmware.scm (seabios-qemu)[arguments]: Likewise. * gnu/packages/virtualization.scm (qemu)[arguments]: Adjust accordingly. --- gnu/packages/bootloaders.scm | 2 +- gnu/packages/firmware.scm | 2 +- gnu/packages/virtualization.scm | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 04d7eefae2a..7c4c92ad9d2 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1577,7 +1577,7 @@ the features of iPXE without the hassle of reflashing.") #~(modify-phases #$phases (replace 'install (lambda _ - (let ((firmware (string-append #$output "/share/firmware"))) + (let ((firmware (string-append #$output "/share/qemu"))) (mkdir-p firmware) (for-each (match-lambda diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 03c84fbe884..eac3176d72f 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -560,7 +560,7 @@ coreboot.") vgabiosen)))))) (replace 'install (lambda _ - (let ((firmware (string-append #$output "/share/firmware"))) + (let ((firmware (string-append #$output "/share/qemu"))) (for-each (lambda (bios) (install-file bios firmware)) (find-files "out" "\\.bin$")) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 5c832beb9f7..9f1db849a3e 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -198,9 +198,9 @@ #~(let ((gcc (search-input-file %build-inputs "/bin/gcc")) (meson (search-input-file %build-inputs "bin/meson")) (seabios (search-input-file %build-inputs - "share/firmware/bios.bin")) + "share/qemu/bios.bin")) (ipxe (search-input-file %build-inputs - "share/firmware/pxe-virtio.rom")) + "share/qemu/pxe-virtio.rom")) (out #$output)) (list (string-append "--cc=" gcc) ;; Some architectures insist on using HOST_CC. @@ -231,10 +231,10 @@ (add-after 'unpack 'replace-firmwares (lambda* (#:key inputs #:allow-other-keys) (let* ((seabios (dirname (search-input-file - inputs "share/firmware/bios.bin"))) + inputs "share/qemu/bios.bin"))) (seabios-firmwares (find-files seabios "\\.bin$")) (ipxe (dirname (search-input-file - inputs "share/firmware/pxe-virtio.rom"))) + inputs "share/qemu/pxe-virtio.rom"))) (ipxe-firmwares (find-files ipxe "\\.rom$")) (allowed-differences ;; Ignore minor differences (addresses etc) in the firmware -- cgit v1.3 From c9392e6fc6d92f3df8642b6fa0197f62f7f4d7bd Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 22 Dec 2022 16:00:56 +0100 Subject: gnu: QEMU: Unbundle SGABIOS. * gnu/packages/virtualization.scm (qemu)[source]: Purge sgabios. [arguments]: Replace bundled variant with the one from INPUTS. [inputs]: Add SGABIOS. --- gnu/packages/virtualization.scm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 9f1db849a3e..945584bd0a8 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -179,13 +179,16 @@ (with-directory-excursion "pc-bios" ;; Delete firmwares provided by SeaBIOS. (for-each delete-file (find-files "." "^(bios|vgabios).*\\.bin$")) + ;; Delete SGABIOS. + (delete-file "sgabios.bin") ;; Delete iPXE firmwares. (for-each delete-file (find-files "." "^(efi|pxe)-.*\\.rom$"))) ;; Delete bundled code that we provide externally. (for-each delete-file-recursively '("dtc" "meson" "roms/ipxe" - "roms/seabios")))))) + "roms/seabios" + "roms/sgabios")))))) (outputs '("out" "static" "doc")) ;5.3 MiB of HTML docs (build-system gnu-build-system) (arguments @@ -199,6 +202,8 @@ (meson (search-input-file %build-inputs "bin/meson")) (seabios (search-input-file %build-inputs "share/qemu/bios.bin")) + (sgabios (search-input-file %build-inputs + "/share/qemu/sgabios.bin")) (ipxe (search-input-file %build-inputs "share/qemu/pxe-virtio.rom")) (out #$output)) @@ -212,7 +217,8 @@ "--enable-fdt=system" (string-append "--firmwarepath=" out "/share/qemu:" (dirname seabios) ":" - (dirname ipxe)) + (dirname ipxe) ":" + (dirname sgabios)) (string-append "--smbd=" out "/libexec/samba-wrapper") "--disable-debug-info" ;for space considerations ;; The binaries need to be linked against -lrt. @@ -233,6 +239,7 @@ (let* ((seabios (dirname (search-input-file inputs "share/qemu/bios.bin"))) (seabios-firmwares (find-files seabios "\\.bin$")) + (sgabios (search-input-file inputs "share/qemu/sgabios.bin")) (ipxe (dirname (search-input-file inputs "share/qemu/pxe-virtio.rom"))) (ipxe-firmwares (find-files ipxe "\\.rom$")) @@ -250,7 +257,8 @@ (with-directory-excursion "pc-bios" (for-each (lambda (file) (symlink file (basename file))) - (append seabios-firmwares ipxe-firmwares))) + (append seabios-firmwares ipxe-firmwares + (list sgabios)))) (for-each (lambda (file) (format allowed-differences-whitelist "\"~a\",~%" file)) @@ -368,6 +376,7 @@ (with-directory-excursion (string-append #$output "/share/qemu") (for-each delete-file (append + '("sgabios.bin") (find-files "." "^(vga)?bios(-[a-z0-9-]+)?\\.bin$") (find-files "." "^(efi|pxe)-.*\\.rom$")))))) ;; Create a wrapper for Samba. This allows QEMU to use Samba without @@ -416,6 +425,7 @@ exec smbd $@"))) pulseaudio sdl2 seabios-qemu + sgabios spice usbredir util-linux -- cgit v1.3 From 71b8707100e2fbc00f123566717ba3958c6afabb Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 25 Dec 2022 12:34:31 +0100 Subject: gnu: QEMU: Unbundle OpenBIOS. * gnu/packages/virtualization.scm (qemu)[source](snippet): Remove precompiled PPC OpenBIOS firmware, and its source code. [arguments]: Replace with the one from Guix. [inputs]: Add OPENBIOS-QEMU-PPC. --- gnu/packages/virtualization.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 945584bd0a8..ec453c1f381 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -181,12 +181,16 @@ (for-each delete-file (find-files "." "^(bios|vgabios).*\\.bin$")) ;; Delete SGABIOS. (delete-file "sgabios.bin") + ;; Delete ppc64 OpenBIOS. TODO: Remove sparc32 and sparc64 too + ;; once they are supported in Guix. + (delete-file "openbios-ppc") ;; Delete iPXE firmwares. (for-each delete-file (find-files "." "^(efi|pxe)-.*\\.rom$"))) ;; Delete bundled code that we provide externally. (for-each delete-file-recursively '("dtc" "meson" "roms/ipxe" + "roms/openbios" "roms/seabios" "roms/sgabios")))))) (outputs '("out" "static" "doc")) ;5.3 MiB of HTML docs @@ -200,6 +204,8 @@ #:configure-flags #~(let ((gcc (search-input-file %build-inputs "/bin/gcc")) (meson (search-input-file %build-inputs "bin/meson")) + (openbios (search-input-file %build-inputs + "share/qemu/openbios-ppc")) (seabios (search-input-file %build-inputs "share/qemu/bios.bin")) (sgabios (search-input-file %build-inputs @@ -218,6 +224,7 @@ (string-append "--firmwarepath=" out "/share/qemu:" (dirname seabios) ":" (dirname ipxe) ":" + (dirname openbios) ":" (dirname sgabios)) (string-append "--smbd=" out "/libexec/samba-wrapper") "--disable-debug-info" ;for space considerations @@ -243,6 +250,8 @@ (ipxe (dirname (search-input-file inputs "share/qemu/pxe-virtio.rom"))) (ipxe-firmwares (find-files ipxe "\\.rom$")) + (openbios (search-input-file + inputs "share/qemu/openbios-ppc")) (allowed-differences ;; Ignore minor differences (addresses etc) in the firmware ;; data tables compared to what the test suite expects. @@ -258,7 +267,7 @@ (for-each (lambda (file) (symlink file (basename file))) (append seabios-firmwares ipxe-firmwares - (list sgabios)))) + (list openbios sgabios)))) (for-each (lambda (file) (format allowed-differences-whitelist "\"~a\",~%" file)) @@ -376,7 +385,7 @@ (with-directory-excursion (string-append #$output "/share/qemu") (for-each delete-file (append - '("sgabios.bin") + '("openbios-ppc" "sgabios.bin") (find-files "." "^(vga)?bios(-[a-z0-9-]+)?\\.bin$") (find-files "." "^(efi|pxe)-.*\\.rom$")))))) ;; Create a wrapper for Samba. This allows QEMU to use Samba without @@ -420,6 +429,7 @@ exec smbd $@"))) libusb ;USB pass-through support mesa ncurses + openbios-qemu-ppc ;; ("pciutils" ,pciutils) pixman pulseaudio -- cgit v1.3 From f81c05d89bf9a91cb46524cb777f65d0295e6981 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 25 Dec 2022 13:44:17 +0100 Subject: gnu: QEMU: Unbundle OpenSBI. * gnu/packages/virtualization.scm (qemu)[source](snippet): Delete precompiled riscv64 firmware, and its source code. [arguments]: Provide OpenSBI. [inputs]: Add OPENSBI-QEMU. --- gnu/packages/virtualization.scm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'gnu/packages/virtualization.scm') diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index ec453c1f381..64a26edb021 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -184,6 +184,9 @@ ;; Delete ppc64 OpenBIOS. TODO: Remove sparc32 and sparc64 too ;; once they are supported in Guix. (delete-file "openbios-ppc") + ;; Delete riscv64 OpenSBI. TODO: Remove riscv32 when supported + ;; in Guix. + (delete-file "opensbi-riscv64-generic-fw_dynamic.bin") ;; Delete iPXE firmwares. (for-each delete-file (find-files "." "^(efi|pxe)-.*\\.rom$"))) ;; Delete bundled code that we provide externally. @@ -191,6 +194,7 @@ '("dtc" "meson" "roms/ipxe" "roms/openbios" + "roms/opensbi" "roms/seabios" "roms/sgabios")))))) (outputs '("out" "static" "doc")) ;5.3 MiB of HTML docs @@ -206,6 +210,9 @@ (meson (search-input-file %build-inputs "bin/meson")) (openbios (search-input-file %build-inputs "share/qemu/openbios-ppc")) + (opensbi (search-input-file + %build-inputs + "share/qemu/opensbi-riscv64-generic-fw_dynamic.bin")) (seabios (search-input-file %build-inputs "share/qemu/bios.bin")) (sgabios (search-input-file %build-inputs @@ -225,6 +232,7 @@ (dirname seabios) ":" (dirname ipxe) ":" (dirname openbios) ":" + (dirname opensbi) ":" (dirname sgabios)) (string-append "--smbd=" out "/libexec/samba-wrapper") "--disable-debug-info" ;for space considerations @@ -252,6 +260,10 @@ (ipxe-firmwares (find-files ipxe "\\.rom$")) (openbios (search-input-file inputs "share/qemu/openbios-ppc")) + (opensbi-riscv64 + (search-input-file + inputs + "share/qemu/opensbi-riscv64-generic-fw_dynamic.bin")) (allowed-differences ;; Ignore minor differences (addresses etc) in the firmware ;; data tables compared to what the test suite expects. @@ -267,7 +279,7 @@ (for-each (lambda (file) (symlink file (basename file))) (append seabios-firmwares ipxe-firmwares - (list openbios sgabios)))) + (list openbios opensbi-riscv64 sgabios)))) (for-each (lambda (file) (format allowed-differences-whitelist "\"~a\",~%" file)) @@ -385,7 +397,9 @@ (with-directory-excursion (string-append #$output "/share/qemu") (for-each delete-file (append - '("openbios-ppc" "sgabios.bin") + '("openbios-ppc" + "opensbi-riscv64-generic-fw_dynamic.bin" + "sgabios.bin") (find-files "." "^(vga)?bios(-[a-z0-9-]+)?\\.bin$") (find-files "." "^(efi|pxe)-.*\\.rom$")))))) ;; Create a wrapper for Samba. This allows QEMU to use Samba without @@ -430,6 +444,7 @@ exec smbd $@"))) mesa ncurses openbios-qemu-ppc + opensbi-qemu ;; ("pciutils" ,pciutils) pixman pulseaudio -- cgit v1.3