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.
This commit is contained in:
Marius Bakke 2022-12-25 12:34:31 +01:00
parent 53a1fce25a
commit 71b8707100
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -181,12 +181,16 @@ (define-public qemu
(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 @@ (define-public qemu
#: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 @@ (define-public qemu
(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 @@ (define-public qemu
(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 @@ (define-public qemu
(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 @@ (define-public qemu
(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 @@ (define-public qemu
libusb ;USB pass-through support
mesa
ncurses
openbios-qemu-ppc
;; ("pciutils" ,pciutils)
pixman
pulseaudio