summary refs log tree commit diff
path: root/gnu/packages/virtualization.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-12-25 12:34:31 +0100
committerMarius Bakke <marius@gnu.org>2022-12-25 14:15:59 +0100
commit71b8707100e2fbc00f123566717ba3958c6afabb (patch)
tree06c2c97b03a228cbf47e77ae3d5c8027760d5e0d /gnu/packages/virtualization.scm
parent53a1fce25afdaf81c964c8867f3b9cce61b846ba (diff)
downloadguix-71b8707100e2fbc00f123566717ba3958c6afabb.tar.gz
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.
Diffstat (limited to 'gnu/packages/virtualization.scm')
-rw-r--r--gnu/packages/virtualization.scm14
1 files changed, 12 insertions, 2 deletions
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