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 945584bd0a..ec453c1f38 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 1.4.1