mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
vm: When target riscv64-linux, use u-boot-qemu-riscv64-bootloader.
* gnu/system/vm.scm (virtualized-operating-system) When target riscv64-linux, use u-boot-qemu-riscv64-bootloader. Add system, target keyword. Change-Id: I22d64d00670a705e4b81427e44a83d504598b536 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
a5deb90fd4
commit
ad9832f82e
1 changed files with 15 additions and 7 deletions
|
@ -52,6 +52,7 @@ (define-module (gnu system vm)
|
||||||
|
|
||||||
#:use-module (gnu bootloader)
|
#:use-module (gnu bootloader)
|
||||||
#:use-module (gnu bootloader grub)
|
#:use-module (gnu bootloader grub)
|
||||||
|
#:use-module (gnu bootloader u-boot)
|
||||||
#:use-module (gnu image)
|
#:use-module (gnu image)
|
||||||
#:use-module (gnu system image)
|
#:use-module (gnu system image)
|
||||||
#:use-module (gnu system linux-container)
|
#:use-module (gnu system linux-container)
|
||||||
|
@ -137,7 +138,9 @@ (define (mapping->file-system mapping)
|
||||||
|
|
||||||
(define* (virtualized-operating-system os
|
(define* (virtualized-operating-system os
|
||||||
#:optional (mappings '())
|
#:optional (mappings '())
|
||||||
#:key (full-boot? #f) volatile?)
|
#:key (full-boot? #f) volatile?
|
||||||
|
(system (%current-system))
|
||||||
|
(target (%current-target-system)))
|
||||||
"Return an operating system based on OS suitable for use in a virtualized
|
"Return an operating system based on OS suitable for use in a virtualized
|
||||||
environment with the store shared with the host. MAPPINGS is a list of
|
environment with the store shared with the host. MAPPINGS is a list of
|
||||||
<file-system-mapping> to realize in the virtualized OS."
|
<file-system-mapping> to realize in the virtualized OS."
|
||||||
|
@ -167,15 +170,18 @@ (define virtual-file-systems
|
||||||
(append (map mapping->file-system mappings)
|
(append (map mapping->file-system mappings)
|
||||||
user-file-systems)))
|
user-file-systems)))
|
||||||
|
|
||||||
(operating-system (inherit os)
|
(operating-system
|
||||||
|
(inherit os)
|
||||||
;; XXX: Until we run QEMU with UEFI support (with the OVMF firmware),
|
;; XXX: Until we run QEMU with UEFI support (with the OVMF firmware),
|
||||||
;; force the traditional i386/BIOS method.
|
;; force the traditional i386/BIOS method.
|
||||||
;; See <https://bugs.gnu.org/28768>.
|
;; See <https://bugs.gnu.org/28768>.
|
||||||
(bootloader (bootloader-configuration
|
(bootloader (bootloader-configuration
|
||||||
(inherit (operating-system-bootloader os))
|
(inherit (operating-system-bootloader os))
|
||||||
(bootloader grub-bootloader)
|
(bootloader
|
||||||
(targets '("/dev/vda"))))
|
(if (target-riscv64? (or target system))
|
||||||
|
u-boot-qemu-riscv64-bootloader
|
||||||
|
grub-bootloader))
|
||||||
|
(targets '("/dev/vda"))))
|
||||||
|
|
||||||
(initrd (lambda (file-systems . rest)
|
(initrd (lambda (file-systems . rest)
|
||||||
(apply (operating-system-initrd os)
|
(apply (operating-system-initrd os)
|
||||||
|
@ -259,7 +265,9 @@ (define* (system-qemu-image/shared-store-script os
|
||||||
(mlet* %store-monad ((os -> (virtualized-operating-system
|
(mlet* %store-monad ((os -> (virtualized-operating-system
|
||||||
os mappings
|
os mappings
|
||||||
#:full-boot? full-boot?
|
#:full-boot? full-boot?
|
||||||
#:volatile? volatile?))
|
#:volatile? volatile?
|
||||||
|
#:system system
|
||||||
|
#:target target))
|
||||||
(base-image -> (system-image
|
(base-image -> (system-image
|
||||||
(image
|
(image
|
||||||
(inherit
|
(inherit
|
||||||
|
|
Loading…
Reference in a new issue