From patchwork Tue Mar 19 15:18:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Z572 X-Patchwork-Id: 61991 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D132127BBEA; Tue, 19 Mar 2024 15:25:54 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 60F1727BBE2 for ; Tue, 19 Mar 2024 15:25:53 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmbLH-00072S-I0; 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-00070j-PB for guix-patches@gnu.org; Tue, 19 Mar 2024 11:25:26 -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-0001jj-GF 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 1rmbLo-0001FU-7n for guix-patches@gnu.org; Tue, 19 Mar 2024 11:26:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69899] [PATCH 1/7] bootloader: Add 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:04 +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.17108619194542 (code B ref 69899); Tue, 19 Mar 2024 15:26:04 +0000 Received: (at 69899) by debbugs.gnu.org; 19 Mar 2024 15:25:19 +0000 Received: from localhost ([127.0.0.1]:51150 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbL4-0001B6-Fz for submit@debbugs.gnu.org; Tue, 19 Mar 2024 11:25:19 -0400 Received: from smtp84.cstnet.cn ([159.226.251.84]:51170 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbFZ-0000gB-KM for 69899@debbugs.gnu.org; Tue, 19 Mar 2024 11:19:44 -0400 Received: from m.taildaf0f.ts.net (unknown [183.247.5.22]) by APP-05 (Coremail) with SMTP id zQCowAAnLLzZrPlljqBBBw--.46102S2; Tue, 19 Mar 2024 23:18:49 +0800 (CST) From: Zheng Junjie Date: Tue, 19 Mar 2024 23:18:35 +0800 Message-ID: <560d073808f3cda2f330a0b30bf2f59b79f21fbd.1710861023.git.zhengjunjie@iscas.ac.cn> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: zQCowAAnLLzZrPlljqBBBw--.46102S2 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUY-7k0a2IF6F4UM7kC6x804xWl14x267AK xVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGw A2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r1j 6r1xM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r1j6r4UM28EF7xvwVC2z280aVAFwI0_Gc CE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxI r21le4C262xC7I0v67AEwI8IwI1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20x vE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xv r2IYc2Ij64vIr41lw4CEx2IqxVAFz4v204v26I0v724l42xK82IYc2Ij64vIr41l4I8I3I 0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWU JVWUGwC2zVAF1VAY17CE14v26r1j6r15MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI 0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0 rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r 4UYxBIdaVFxhVjvjDU0xZFpf9x07jbManUUUUU= 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/bootloader/u-boot.scm (u-boot-qemu-riscv64-bootloader): New variable. Change-Id: If6622838d2250c90a26380849b92387aa7122fbb --- gnu/bootloader/u-boot.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gnu/bootloader/u-boot.scm b/gnu/bootloader/u-boot.scm index d20aabd538..8e7cc05191 100644 --- a/gnu/bootloader/u-boot.scm +++ b/gnu/bootloader/u-boot.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2022 Maxim Cournoyer ;;; Copyright © 2023 Efraim Flashner ;;; Copyright © 2023 Herman Rimm +;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -47,6 +48,7 @@ (define-module (gnu bootloader u-boot) u-boot-rock64-rk3328-bootloader u-boot-rockpro64-rk3399-bootloader u-boot-sifive-unmatched-bootloader + u-boot-qemu-riscv64-bootloader u-boot-ts7970-q-2g-1000mhz-c-bootloader u-boot-wandboard-bootloader)) @@ -157,6 +159,12 @@ (define install-sifive-unmatched-u-boot (write-file-on-device u-boot (stat:size (stat u-boot)) image (* 2082 512))))) +(define install-qemu-riscv64-u-boot + #~(lambda (bootloader device mount-point) + (let ((u-boot.bin (string-append bootloader "/libexec/u-boot.bin")) + (install-dir (string-append mount-point "/boot"))) + (install-file u-boot.bin install-dir)))) + ;;; @@ -307,3 +315,10 @@ (define u-boot-sifive-unmatched-bootloader (inherit u-boot-bootloader) (package u-boot-sifive-unmatched) (disk-image-installer install-sifive-unmatched-u-boot))) + +(define u-boot-qemu-riscv64-bootloader + (bootloader + (inherit u-boot-bootloader) + (package u-boot-qemu-riscv64) + (installer install-qemu-riscv64-u-boot) + (disk-image-installer #f))) From patchwork Tue Mar 19 15:18:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Z572 X-Patchwork-Id: 61986 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6723027BBEA; Tue, 19 Mar 2024 15:19:39 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 41F9C27BBE2 for ; Tue, 19 Mar 2024 15:19:38 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmbFN-000345-Sq; Tue, 19 Mar 2024 11:19:26 -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 1rmbFL-00033D-U6 for guix-patches@gnu.org; Tue, 19 Mar 2024 11:19:23 -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 1rmbFL-0000Mm-LU for guix-patches@gnu.org; Tue, 19 Mar 2024 11:19:23 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rmbFy-0000lV-8O for guix-patches@gnu.org; Tue, 19 Mar 2024 11:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69899] [PATCH 2/7] vm: use #$ for kernel-arguments. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Mar 2024 15:20:02 +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.17108615852747 (code B ref 69899); Tue, 19 Mar 2024 15:20:02 +0000 Received: (at 69899) by debbugs.gnu.org; 19 Mar 2024 15:19:45 +0000 Received: from localhost ([127.0.0.1]:51122 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbFg-0000i3-Ah for submit@debbugs.gnu.org; Tue, 19 Mar 2024 11:19:44 -0400 Received: from smtp84.cstnet.cn ([159.226.251.84]:51172 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbFZ-0000gA-Hp for 69899@debbugs.gnu.org; Tue, 19 Mar 2024 11:19:42 -0400 Received: from m.taildaf0f.ts.net (unknown [183.247.5.22]) by APP-05 (Coremail) with SMTP id zQCowAAnLLzZrPlljqBBBw--.46102S3; Tue, 19 Mar 2024 23:18:49 +0800 (CST) From: Zheng Junjie Date: Tue, 19 Mar 2024 23:18:36 +0800 Message-ID: <384e20b4da664cd75a9e6f3be0b6fff8605033e7.1710861023.git.zhengjunjie@iscas.ac.cn> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: zQCowAAnLLzZrPlljqBBBw--.46102S3 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUOn7k0a2IF6F4UM7kC6x804xWl14x267AK xVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGw A2048vs2IY020E87I2jVAFwI0_Jr4l82xGYIkIc2x26xkF7I0E14v26r18M28lY4IEw2II xxk0rwA2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjc xK6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0 Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wASzI0E04 IjxsIE14AKx2xKxwAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JrI_ JrylYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwI xGrwAKzVC20s0267AEwI8IwI0ExsIj0wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkE bVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r1j6r18MI8E67 AF67kF1VAFwI0_Jr0_JrylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI 42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMI IF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUvcSsGvfC2 KfnxnUUI43ZEXa7IU8zc_3UUUUU== 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Use #$ allow cross-compile to with support current system kernel. e.g. linux-libre-riscv64-generic. * gnu/system/vm.scm(system-qemu-image/shared-store-script) (linux-image-startup-command): use #$ for kernel-arguments. Change-Id: I9d2e7df296ce590b95cd30996b33f8ca692ac1b1 --- gnu/system/vm.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index fcfd1cdb48..40e965d272 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2018 Chris Marusich +;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -270,7 +271,7 @@ (define* (system-qemu-image/shared-store-script os (volatile-root? volatile?))))) (define kernel-arguments #~(list #$@(if graphic? #~() #~("console=ttyS0")) - #+@(operating-system-kernel-arguments os "/dev/vda1"))) + #$@(operating-system-kernel-arguments os "/dev/vda1"))) (define rw-image #~(format #f "/tmp/guix-image-~a" (basename #$base-image))) @@ -340,7 +341,7 @@ (define* (linux-image-startup-command image (define kernel-arguments #~(list #$@(if graphic? #~() #~("console=ttyS0")) - #+@(operating-system-kernel-arguments os "/dev/vda1"))) + #$@(operating-system-kernel-arguments os "/dev/vda1"))) #~`(#+(file-append qemu "/bin/" (qemu-command (or target system))) From patchwork Tue Mar 19 15:18:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Z572 X-Patchwork-Id: 61988 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DD69627BBED; Tue, 19 Mar 2024 15:25:45 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2A93C27BBE2 for ; Tue, 19 Mar 2024 15:25:45 +0000 (GMT) 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-Version: 1.0 X-CM-TRANSID: zQCowAAnLLzZrPlljqBBBw--.46102S4 X-Coremail-Antispam: 1UD129KBjvJXoW7Ary8Ww4kCFWDtr4kuFyUZFb_yoW8KF4rpF s5Za4Skw45GrW3Zw40gF9rKr1aqryvy3y5Aa4fuw1Fv3W5uryv9r13ta45JayUX34fCr18 Ary8tr15uryDXr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvEb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r4j6ryUM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI 8067AKxVWUXwA2048vs2IY020Ec7CjxVAFwI0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kE wVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0cI8IcVCY1x 0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x02 67AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I 80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCj c4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4 AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE 17CEb7AF67AKxVWUJVWUXwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMI IF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4l IxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCTnIWI 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 From patchwork Tue Mar 19 15:18:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Z572 X-Patchwork-Id: 61990 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A1C4B27BBEB; Tue, 19 Mar 2024 15:25:49 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 37E5727BBE2 for ; Tue, 19 Mar 2024 15:25:49 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmbLI-00073z-5i; Tue, 19 Mar 2024 11:25:32 -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 1rmbLC-00070p-OP for guix-patches@gnu.org; Tue, 19 Mar 2024 11:25:26 -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 1rmbLC-0001jx-Fz for guix-patches@gnu.org; Tue, 19 Mar 2024 11:25:26 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rmbLm-0001F8-PZ; Tue, 19 Mar 2024 11:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69899] [PATCH 4/7] gnu: linux-libre-riscv64-generic: add more options. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: leo@famulari.name, me@tobias.gr, w@wmeyer.eu, guix-patches@gnu.org Resent-Date: Tue, 19 Mar 2024 15:26:02 +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 Cc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer X-Debbugs-Original-Xcc: Leo Famulari , Tobias Geerinckx-Rice , Wilko Meyer Received: via spool by 69899-submit@debbugs.gnu.org id=B69899.17108619174520 (code B ref 69899); Tue, 19 Mar 2024 15:26:02 +0000 Received: (at 69899) by debbugs.gnu.org; 19 Mar 2024 15:25:17 +0000 Received: from localhost ([127.0.0.1]:51144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbL2-0001Ak-Rl for submit@debbugs.gnu.org; Tue, 19 Mar 2024 11:25:17 -0400 Received: from smtp84.cstnet.cn ([159.226.251.84]:51182 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbFa-0000gD-4y 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--.46102S5; Tue, 19 Mar 2024 23:18:51 +0800 (CST) From: Zheng Junjie Date: Tue, 19 Mar 2024 23:18:38 +0800 Message-ID: <8d66e9e260397c834199f77d124f4e5841a60653.1710861023.git.zhengjunjie@iscas.ac.cn> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: zQCowAAnLLzZrPlljqBBBw--.46102S5 X-Coremail-Antispam: 1UD129KBjvJXoW7Cr45tFWUKF13JFyxZw47urg_yoW8Jw15pr s3JryY9r1rGrs3JrW3uF4vk3Z0qr4xAFWvyayxCr15CFy8ZaykX34DKr4Fyr9rXFWxCa17 uF1kKwnxua4UA3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9Yb7Iv0xC_Cr1lb4IE77IF4wAFF20E14v26r4j6ryUM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI 8067AKxVWUWwA2048vs2IY020Ec7CjxVAFwI0_Jrv_JF4l8cAvFVAK0II2c7xJM28CjxkF 64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcV CY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY 1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4 xG6I80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCa FVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxC20s026xCaFV Cjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWl x4CE17CEb7AF67AKxVWUJVWUXwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r 1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_Jr0_ JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8JbIYCT nIWIevJa73UjIFyTuYvjxUzxR6DUUUU 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This is required by `guix system vm'. * gnu/packages/linux (linux-libre-riscv64-generic)[#:extra-options]: Add more option. Change-Id: I5697ba7158d44ef0ea9cf28cadb4d59f312b4206 --- gnu/packages/linux.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 343e8c1032..73b08fcf82 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1312,7 +1312,24 @@ (define-public linux-libre-riscv64-generic linux-libre-gnu-revision linux-libre-source '("riscv64-linux") - #:extra-version "riscv64-generic")) + #:extra-version "riscv64-generic" + #:extra-options + (append + ;; required `guix system vm' + `(("CONFIG_USB_HID" . m) + ("CONFIG_HID_GEMBIRD" . m) + ("CONFIG_AHCI_DWC" . m) + ("CONFIG_SATA_AHCI" . m) + ("CONFIG_CRYPTO_SERPENT" . m) + ("CONFIG_CRYPTO_WP512" . m) + ("CONFIG_USB_UAS" . m) + ("CONFIG_USB_STORAGE" . m) + ("CONFIG_HID_GENERIC" . m) + ("CONFIG_DRM_CIRRUS_QEMU" . m) + ("CONFIG_HW_RANDOM_VIRTIO" . m) + ("CONFIG_VIRTIO_CONSOLE" . m) + ("CONFIG_CRYPTO_XTS" . m)) + %default-extra-linux-options))) (define-public linux-libre-mips64el-fuloong2e (make-linux-libre* linux-libre-version From patchwork Tue Mar 19 15:18:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Z572 X-Patchwork-Id: 61989 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2D46227BBE2; Tue, 19 Mar 2024 15:25:47 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3E95127BBEB for ; Tue, 19 Mar 2024 15:25:45 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmbLG-00071G-Fn; 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 1rmbL9-0006wg-VZ for guix-patches@gnu.org; Tue, 19 Mar 2024 11:25:24 -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 1rmbL9-0001iD-Mt for guix-patches@gnu.org; Tue, 19 Mar 2024 11:25:23 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rmbLm-0001F0-Bm for guix-patches@gnu.org; Tue, 19 Mar 2024 11:26:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69899] [PATCH 5/7] linux-initrd: don't add hid-apple module for riscv64-linux. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Mar 2024 15:26:02 +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.17108619174513 (code B ref 69899); Tue, 19 Mar 2024 15:26:02 +0000 Received: (at 69899) by debbugs.gnu.org; 19 Mar 2024 15:25:17 +0000 Received: from localhost ([127.0.0.1]:51142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbL0-0001AO-QF for submit@debbugs.gnu.org; Tue, 19 Mar 2024 11:25:16 -0400 Received: from smtp84.cstnet.cn ([159.226.251.84]:51194 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbFb-0000gI-Je 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--.46102S6; Tue, 19 Mar 2024 23:18:51 +0800 (CST) From: Zheng Junjie Date: Tue, 19 Mar 2024 23:18:39 +0800 Message-ID: <531cfd3b53b47867c80b30f69abef3bdcbf66c06.1710861023.git.zhengjunjie@iscas.ac.cn> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: zQCowAAnLLzZrPlljqBBBw--.46102S6 X-Coremail-Antispam: 1UD129KBjvdXoWruw1fAF43XF1UAF15Jr4fXwb_yoWDGwb_G3 s7WFs7JFWUXw4UAwnavw15XF1Ykr9293W3W3ZrXF4jgrWFqwn5uasxZrWxA348W3yxGFy3 JF4DJrySyr13WjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbaxYjsxI4VWDJwAYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7 IE14v26r126s0DM28IrcIa0xkI8VCY1x0267AKxVWUXVWUCwA2ocxC64kIII0Yj41l84x0 c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r1I6r4UM28EF7xvwVC0I7IYx2 IY6xkF7I0E14v26r1j6r4UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv 6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c 02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm72CE 4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l4I8I3I0E4I kC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWU WwC2zVAF1VAY17CE14v26r1j6r15MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_JF I_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWU JVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYx BIdaVFxhVjvjDU0xZFpf9x07jjYL9UUUUU= 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system/linux-initrd.scm(default-initrd-modules): when target-riscv64, don't add hid-apple module. Change-Id: I633468421db0cb1ebd61e0603021fa1c79038473 --- gnu/system/linux-initrd.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 6236d25b9d..f5d86219a8 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -363,7 +363,10 @@ (define* (default-initrd-modules `("ahci" ;for SATA controllers "usb-storage" "uas" ;for the installation image etc. - "usbhid" "hid-generic" "hid-apple" ;keyboards during early boot + "usbhid" "hid-generic" ;keyboards during early boot + ,@(if (target-riscv64? system) + '() + '("hid-apple")) "dm-crypt" "xts" "serpent_generic" "wp512" ;for encrypted root partitions "nls_iso8859-1" ;for `mkfs.fat`, et.al ,@(if (string-match "^(x86_64|i[3-6]86)-" system) From patchwork Tue Mar 19 15:18:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Z572 X-Patchwork-Id: 61992 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id EB0AB27BBEA; Tue, 19 Mar 2024 15:26:07 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5362727BBE2 for ; Tue, 19 Mar 2024 15:26:06 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmbLH-00071Y-71; 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-0006z7-6G 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 1rmbLA-0001jM-GC for guix-patches@gnu.org; Tue, 19 Mar 2024 11:25:24 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rmbLn-0001FE-83 for guix-patches@gnu.org; Tue, 19 Mar 2024 11:26:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69899] [PATCH 6/7] vm: add arguments to use virt machine type for qemu-riscv64. 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.17108619184528 (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]:51146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbL3-0001Ar-Hc for submit@debbugs.gnu.org; Tue, 19 Mar 2024 11:25:18 -0400 Received: from smtp84.cstnet.cn ([159.226.251.84]:51184 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbFa-0000gE-5H 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--.46102S7; Tue, 19 Mar 2024 23:18:51 +0800 (CST) From: Zheng Junjie Date: Tue, 19 Mar 2024 23:18:40 +0800 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: zQCowAAnLLzZrPlljqBBBw--.46102S7 X-Coremail-Antispam: 1UD129KBjvdXoW7Xw1UZrWDZFy8Gr4rKF4xtFb_yoWfWrXEka 92qr92kFWrJF1Yyrs5Aa43Xan0qrs2g34Iqr47KFZFq3s5Zws5GF97Ar92vw1F9Fs7WF13 Crs7Xry3JrWUKjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbaxYjsxI4VWkCwAYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7 IE14v26r126s0DM28IrcIa0xkI8VCY1x0267AKxVWUXVWUCwA2ocxC64kIII0Yj41l84x0 c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r1I6r4UM28EF7xvwVC0I7IYx2 IY6xkF7I0E14v26r1j6r4UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv 6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c 02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm72CE 4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41l42xK82IYc2Ij64vIr41l4I8I3I0E4I kC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWU WwC2zVAF1VAY17CE14v26r1j6r15MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_JF I_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWU JVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYx BIdaVFxhVjvjDU0xZFpf9x07jjdgAUUUUU= 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system/vm.scm (system-qemu-image/shared-store-script): When target riscv64, add arguments to set qemu virt machine type. Change-Id: I974c82fdd2d5bfc01caff9e6411db38e472b5cd4 --- gnu/system/vm.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index d4044a4a39..64cc321ebf 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -295,6 +295,10 @@ (define* (system-qemu-image/shared-store-script os "-initrd" #$(file-append os "/initrd") (format #f "-append ~s" (string-join #$kernel-arguments " ")))) + ;; Default qemu-riscv64 have not PCI, virt have it, so we set it. + #$@(if (target-riscv64? (or target system)) + #~("-M" "virt") + #~()) #$@(common-qemu-options (if volatile? base-image rw-image) (map file-system-mapping-source (cons %store-mapping mappings)) From patchwork Tue Mar 19 15:18:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Z572 X-Patchwork-Id: 61987 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7F8CA27BBEB; Tue, 19 Mar 2024 15:19:53 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 14C7E27BBE2 for ; Tue, 19 Mar 2024 15:19:53 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rmbFP-00034T-4B; Tue, 19 Mar 2024 11:19:27 -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 1rmbFM-00033M-AW for guix-patches@gnu.org; Tue, 19 Mar 2024 11:19:24 -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 1rmbFM-0000Ms-25 for guix-patches@gnu.org; Tue, 19 Mar 2024 11:19:24 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rmbFy-0000ld-Qv for guix-patches@gnu.org; Tue, 19 Mar 2024 11:20:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69899] [PATCH 7/7] vm: If not the same local architecture, don't enable kvm. Resent-From: Zheng Junjie Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Mar 2024 15:20:02 +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.17108615852763 (code B ref 69899); Tue, 19 Mar 2024 15:20:02 +0000 Received: (at 69899) by debbugs.gnu.org; 19 Mar 2024 15:19:45 +0000 Received: from localhost ([127.0.0.1]:51124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbFg-0000iG-Td for submit@debbugs.gnu.org; Tue, 19 Mar 2024 11:19:45 -0400 Received: from smtp84.cstnet.cn ([159.226.251.84]:51188 helo=cstnet.cn) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rmbFa-0000gF-3r for 69899@debbugs.gnu.org; Tue, 19 Mar 2024 11:19:42 -0400 Received: from m.taildaf0f.ts.net (unknown [183.247.5.22]) by APP-05 (Coremail) with SMTP id zQCowAAnLLzZrPlljqBBBw--.46102S8; Tue, 19 Mar 2024 23:18:52 +0800 (CST) From: Zheng Junjie Date: Tue, 19 Mar 2024 23:18:41 +0800 Message-ID: <94accdc1b6c6b86766117e8bf1720f79e33ad2aa.1710861023.git.zhengjunjie@iscas.ac.cn> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 X-CM-TRANSID: zQCowAAnLLzZrPlljqBBBw--.46102S8 X-Coremail-Antispam: 1UD129KBjvJXoW7CFyUCFyfXw17Cw17tFyUGFg_yoW8Gw15p3 ZIk3WYkr1rGrZFg3WvgFn7Zr9IgwnYk34Uu3yxZw4xZwn8trykKr1Syr13CFWUZFWxCr1D ZFW09ryUZr45Ar7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUU9Ib7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26ryj6rWUM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI 8067AKxVWUAVCq3wA2048vs2IY020Ec7CjxVAFwI0_JFI_Gr1l8cAvFVAK0II2c7xJM28C jxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI 8IcVCY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280 aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzV Aqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S 6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JMxAIw28IcxkI7VAKI48JMxC20s026x CaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_ JrWlx4CE17CEb7AF67AKxVWUJVWUXwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r 1I6r4UMIIF0xvE2Ix0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_ Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVWUJVW8Jb IYCTnIWIevJa73UjIFyTuYvjxUgeHqDUUUU 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system/vm.scm (common-qemu-options): Add target keyword. Change-Id: Ic9bf18cf60ac5ce623289df31ea050a22c6e604e --- gnu/system/vm.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 64cc321ebf..7d9d07ebb7 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -210,7 +210,9 @@ (define* (virtualized-operating-system os virtual-file-systems))))) (define* (common-qemu-options image shared-fs - #:key rw-image?) + #:key + rw-image? + (target (%current-target-system))) "Return the a string-value gexp with the common QEMU options to boot IMAGE, with '-virtfs' options for the host file systems listed in SHARED-FS." @@ -221,7 +223,7 @@ (define* (common-qemu-options image shared-fs #~(;; Only enable kvm if we see /dev/kvm exists. ;; This allows users without hardware virtualization to still use these ;; commands. - #$@(if (file-exists? "/dev/kvm") + #$@(if (and (not target) (file-exists? "/dev/kvm")) '("-enable-kvm") '()) @@ -302,7 +304,8 @@ (define* (system-qemu-image/shared-store-script os #$@(common-qemu-options (if volatile? base-image rw-image) (map file-system-mapping-source (cons %store-mapping mappings)) - #:rw-image? (not volatile?)) + #:rw-image? (not volatile?) + #:target target) "-m " (number->string #$memory-size) #$@options))