[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#69899] [PATCH 3/7] vm: When target riscv64-linux, use u-boot-qemu-r
From: |
Zheng Junjie |
Subject: |
[bug#69899] [PATCH 3/7] vm: When target riscv64-linux, use u-boot-qemu-riscv64-bootloader. |
Date: |
Tue, 19 Mar 2024 23:18:37 +0800 |
* gnu/system/vm.scm (virtualized-operating-system) When target riscv64-linux,
use u-boot-qemu-riscv64-bootloader. Add system, target keyword.
Change-Id: I22d64d00670a705e4b81427e44a83d504598b536
---
gnu/system/vm.scm | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 40e965d272..d4044a4a39 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -52,6 +52,7 @@ (define-module (gnu system vm)
#:use-module (gnu bootloader)
#:use-module (gnu bootloader grub)
+ #:use-module (gnu bootloader u-boot)
#:use-module (gnu image)
#:use-module (gnu system image)
#:use-module (gnu system linux-container)
@@ -137,7 +138,9 @@ (define (mapping->file-system mapping)
(define* (virtualized-operating-system os
#: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
environment with the store shared with the host. MAPPINGS is a list of
<file-system-mapping> to realize in the virtualized OS."
@@ -167,15 +170,18 @@ (define* (virtualized-operating-system os
(append (map mapping->file-system mappings)
user-file-systems)))
- (operating-system (inherit os)
-
+ (operating-system
+ (inherit os)
;; XXX: Until we run QEMU with UEFI support (with the OVMF firmware),
;; force the traditional i386/BIOS method.
;; See <https://bugs.gnu.org/28768>.
(bootloader (bootloader-configuration
- (inherit (operating-system-bootloader os))
- (bootloader grub-bootloader)
- (targets '("/dev/vda"))))
+ (inherit (operating-system-bootloader os))
+ (bootloader
+ (if (target-riscv64? (or target system))
+ u-boot-qemu-riscv64-bootloader
+ grub-bootloader))
+ (targets '("/dev/vda"))))
(initrd (lambda (file-systems . rest)
(apply (operating-system-initrd os)
@@ -259,7 +265,9 @@ (define* (system-qemu-image/shared-store-script os
(mlet* %store-monad ((os -> (virtualized-operating-system
os mappings
#:full-boot? full-boot?
- #:volatile? volatile?))
+ #:volatile? volatile?
+ #:system system
+ #:target target))
(base-image -> (system-image
(image
(inherit
--
2.41.0
- [bug#69899] [PATCH 0/7] support to use `guix system vm' with riscv64., Zheng Junjie, 2024/03/19
- [bug#69899] [PATCH 2/7] vm: use #$ for kernel-arguments., Zheng Junjie, 2024/03/19
- [bug#69899] [PATCH 7/7] vm: If not the same local architecture, don't enable kvm., Zheng Junjie, 2024/03/19
- [bug#69899] [PATCH 5/7] linux-initrd: don't add hid-apple module for riscv64-linux., Zheng Junjie, 2024/03/19
- [bug#69899] [PATCH 1/7] bootloader: Add u-boot-qemu-riscv64-bootloader., Zheng Junjie, 2024/03/19
- [bug#69899] [PATCH 4/7] gnu: linux-libre-riscv64-generic: add more options., Zheng Junjie, 2024/03/19
- [bug#69899] [PATCH 6/7] vm: add arguments to use virt machine type for qemu-riscv64., Zheng Junjie, 2024/03/19
- [bug#69899] [PATCH 3/7] vm: When target riscv64-linux, use u-boot-qemu-riscv64-bootloader.,
Zheng Junjie <=
- [bug#69899] [PATCH 0/7] support to use `guix system vm' with riscv64., Leo Famulari, 2024/03/26
- bug#69899: [PATCH 0/7] support to use `guix system vm' with riscv64., Ludovic Courtès, 2024/03/31