From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id ANSaGHmu+WWhDQEA62LTzQ:P1 (envelope-from ) for ; Tue, 19 Mar 2024 16:25:45 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id ANSaGHmu+WWhDQEA62LTzQ (envelope-from ) for ; Tue, 19 Mar 2024 16:25:45 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710861945; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=s6KjggRSus6VDpqkqcBhifa68+hi14jl0s3IUYkA6Bo=; b=UOMInnQaW337GgcvW13QiTL2lqeqi6itofOyUxLuHJEIBTj17DIUKeuUgFD9m2CYr8wq+i Uof3YftXNufFRVIL1QgWDuoaPIJIVB6ISnwm35Wvhkvr1pDpHGbCty8V1TtL+3W8ee5psr aYU13vSV43icpeF6BZ7BalZuU/5L2KiTocDfRf6/OE4Zj6g6Xk3i0ZTDdZKerU+brPsLvh TFabA1qnHf748tQYfrvZzX+1ACGibU8AD3d0oXS3P6oyNMYzkwMDE+moeq/WRL6xO0BqBy iCviWqgYEAbm9b8mRcEC8enM0EwGBd36eRZBaNU8NbIcH2WgYXkZ1nZdQsbdyA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710861945; a=rsa-sha256; cv=none; b=Y59JFQKmKnjYLJb/xLOWqa8mDdYT1zPADLNtEG1JB81JQ9rF/f9Vro/2Ck0+PZ6tEoLHUN IK7S7IelwDpb0Wdk4AZY3wwIbtjmcDu5sAmxDHUsOLH/GsMQhW9Enr8A2oFG1ar9jFQjoM 4MX+h5wOg8GPT3HIfdmUqeH7skQGzAn0TEZiPju/zIwpscv5YuoMcu8XMpHNS99r9gnpff mgsYSFkFwyZEWgp3eylYOScpJ0ZSsooEPP4IVwwZqjBFaBrG4WoiDRWJy5NeNo5zwjrSI+ SEQaZtyZtCYtYspjVom0IGdcQIFcT6DQlslxQjlMA39GIxmXQVdHLrrhnSC5EQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4816A6F4E9 for ; Tue, 19 Mar 2024 16:25:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmbLH-000738-S0; Tue, 19 Mar 2024 11:25:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rmbLB-0006zq-B2 for guix-patches@gnu.org; Tue, 19 Mar 2024 11:25:25 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rmbLB-0001jR-0B for guix-patches@gnu.org; Tue, 19 Mar 2024 11:25:25 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rmbLn-0001FN-OJ for guix-patches@gnu.org; Tue, 19 Mar 2024 11:26:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69899] [PATCH 3/7] vm: When target riscv64-linux, use u-boot-qemu-riscv64-bootloader. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Mar 2024 15:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69899 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69899@debbugs.gnu.org Received: via spool by 69899-submit@debbugs.gnu.org id=B69899.17108619184535 (code B ref 69899); Tue, 19 Mar 2024 15:26:03 +0000 Received: (at 69899) by debbugs.gnu.org; 19 Mar 2024 15:25:18 +0000 Received: from localhost ([127.0.0.1]:51148 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbL4-0001Az-1k for submit@debbugs.gnu.org; Tue, 19 Mar 2024 11:25:18 -0400 Received: from smtp84.cstnet.cn ([159.226.251.84]:51192 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbFa-0000gG-KK for 69899@debbugs.gnu.org; Tue, 19 Mar 2024 11:19:43 -0400 Received: from m.taildaf0f.ts.net (unknown [183.247.5.22]) by APP-05 (Coremail) with SMTP id zQCowAAnLLzZrPlljqBBBw--.46102S4; Tue, 19 Mar 2024 23:18:50 +0800 (CST) From: Zheng Junjie Date: Tue, 19 Mar 2024 23:18:37 +0800 Message-ID: <528b248a19b9debbaad5181749f49f5aa4e82f77.1710861023.git.zhengjunjie@iscas.ac.cn> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME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2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWI evJa73UjIFyTuYvjxUqqYpUUUUU X-Originating-IP: [183.247.5.22] X-CM-SenderInfo: x2kh0wxmxqyx3h6l2u1dvotugofq/ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.81 X-Spam-Score: -4.81 X-Migadu-Queue-Id: 4816A6F4E9 X-Migadu-Scanner: mx11.migadu.com X-TUID: 5Xr+9A48TNMp * 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 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 . (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