mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 13:49:23 -05:00
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.
This commit is contained in:
parent
c8e836991d
commit
f81c05d89b
1 changed files with 17 additions and 2 deletions
|
@ -184,6 +184,9 @@ (define-public qemu
|
|||
;; 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 @@ (define-public qemu
|
|||
'("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 @@ (define-public qemu
|
|||
(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 @@ (define-public qemu
|
|||
(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 @@ (define-public qemu
|
|||
(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 @@ (define-public qemu
|
|||
(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 @@ (define-public qemu
|
|||
(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 @@ (define-public qemu
|
|||
mesa
|
||||
ncurses
|
||||
openbios-qemu-ppc
|
||||
opensbi-qemu
|
||||
;; ("pciutils" ,pciutils)
|
||||
pixman
|
||||
pulseaudio
|
||||
|
|
Loading…
Reference in a new issue