Message ID | 78e614438f4b7e4f07be2b764eeb71d41875607e.1742546953.git.efraim@flashner.co.il |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C048F27BBEA; Fri, 21 Mar 2025 08:55:34 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, 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 463E127BBE2 for <patchwork@mira.cbaines.net>; Fri, 21 Mar 2025 08:55:34 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1tvY9k-00073v-FG; Fri, 21 Mar 2025 04:55:08 -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 <Debian-debbugs@debbugs.gnu.org>) id 1tvY9i-00071Z-EX for guix-patches@gnu.org; Fri, 21 Mar 2025 04:55:06 -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 <Debian-debbugs@debbugs.gnu.org>) id 1tvY9i-0001gp-2X for guix-patches@gnu.org; Fri, 21 Mar 2025 04:55:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=9+381lkr/m2fK/me/mA14S40l9E6BpapMyQXWw3aJks=; b=aIClbo8ypa9C3k39HsjZsKVY9O4C8asSpfqe0FLpvdiQDAhFmzEkkKMfAxLagpCflByKTzj+66uoPgsWSfz+ScMQixZ92JleNjHI1T5oGf5OjE6V7g4WW6ThXtsE3Y6PAMojRvwMT+s/Y4GgYcivwCoVAuaPTIqUkyvJxGleNzY+EbGP1BYQGkqqq5b4ML9wIhegzBhaNT0f6rq6T0Rin1lCuJWJuWNgqIDGhsq8Xn4mectkDxt5KzR2rp3rbcs+7X+//mTD1NqCSgwkn0EbunLW4tv2H2ll3gbjRTZFYMtJ5J4WdwurnD7BcJrOI+PKA+HWbyx1CFqyjKgqHrRT5w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tvY9h-0001DF-TU; Fri, 21 Mar 2025 04:55:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77148] [PATCH 9/9] gnu: Add ovmf-loongarch64. Resent-From: Efraim Flashner <efraim@flashner.co.il> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: efraim@flashner.co.il, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Fri, 21 Mar 2025 08:55:05 +0000 Resent-Message-ID: <handler.77148.B77148.17425472764320@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77148 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77148@debbugs.gnu.org Cc: Efraim Flashner <efraim@flashner.co.il>, Maxim Cournoyer <maxim.cournoyer@gmail.com>, Efraim Flashner <efraim@flashner.co.il>, Vagrant Cascadian <vagrant@debian.org> X-Debbugs-Original-Xcc: Efraim Flashner <efraim@flashner.co.il>, Vagrant Cascadian <vagrant@debian.org> Received: via spool by 77148-submit@debbugs.gnu.org id=B77148.17425472764320 (code B ref 77148); Fri, 21 Mar 2025 08:55:05 +0000 Received: (at 77148) by debbugs.gnu.org; 21 Mar 2025 08:54:36 +0000 Received: from localhost ([127.0.0.1]:35056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1tvY9E-00017X-2m for submit@debbugs.gnu.org; Fri, 21 Mar 2025 04:54:36 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:50510) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <efraim.flashner@gmail.com>) id 1tvY8W-00011Y-1V for 77148@debbugs.gnu.org; Fri, 21 Mar 2025 04:53:54 -0400 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-5e535e6739bso2718813a12.1 for <77148@debbugs.gnu.org>; Fri, 21 Mar 2025 01:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742547226; x=1743152026; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=9+381lkr/m2fK/me/mA14S40l9E6BpapMyQXWw3aJks=; b=bkVVMApMe+5Z1nupmSoKLmuea/QKHm/J9GqK16x5N+JZ/CWAHC4YZHzYbKu43U6DTc 2ESrLPOIiedFdcdTN0yBaJQewqQVAWhu/sB5ivdGWHP4g99US8kvi0iIEpgesWe5gZGc rD+r9Am1Pk+K5VC3dBFfX7SFFFYPylXJEenZYR7fYkjIriQVVsrmo6TQAOIbZZOyaeju L2RrOClyp2Ei8sQvvt3teX4K1RUTqZwa/dx2EfcT5KVinDSq0oQfvjsQviziG1c0wB87 yLYzB9aOHCMItRqMt/+G4jYOezzOi1dqhr5/2lLH0ROTFG9BloBfYPKCGhk0rbCecfvV icDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742547226; x=1743152026; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=9+381lkr/m2fK/me/mA14S40l9E6BpapMyQXWw3aJks=; b=LwF5GWCiagTcwjStfyV9HS1+iB/BdWjzoElGUZ723nUZFxjajHpmnijuEC99IJ4TiK CtEaD4rTgQK+KX6tPAGdDJ/zFy/PwjzlRzPn4dmwgllfqjc50Smh0GtfCvt5AKiLhxMH HtvWcA1ZoOJ++QF93L3swpfkYddkF38ViXheKN93VXoCRrxC3y3yfwEEdIhsbbkXk05J siECfJL0LH2HRIyW95AbAMtRxcdODg9ZXR8L/nugrJI6TYt0QJ2mlWDdBNF6GrwWdpXE CIEQAguOv13AneuLjFpfp8zrNP6pciILVGuvh1u8TewSXdUW8g0GWkznc9q5gIdJXkmt zzPQ== X-Gm-Message-State: AOJu0Ywsx5LHVR68sPre8KiQsHGmvt0DwZdY/2RjCS8i2fJmvjYxeiry DpYzBEd+3egKjqS/yVfLCkwCWL3gySi2+SDcRidcosM/ARtPnwsBFjMley9w X-Gm-Gg: ASbGnctu4JyXnNfTmjjPDHV8yS8TBqzUTkQLif/JAxLP86OaSga+rXYnw8uMHv3rLw4 cbFAG+7cxsN5TR9MIcNOddLJJoxvcxLxYOmZP6jSwP6QqC1xOopXNF1er8ILppE5B0YRu8/vctf 7QdR2sAvDn38bNcBB4dqqwLiRvDfiifCEFHMPfNm7JUkXts2wffHIzo0EDUXqAAFnW9A9Q4lI9e lXz7w0C15XiGG1IPd/I0FVdilraRnK6/E9KBci/8hvUuDFWLHZkkJJVlKlpDM/MpAJ7U9ntF41e EshjbmPs4z2kaQp2E/bcFRArBFtVb5I5sQZzzCOJhHw8XNmV X-Google-Smtp-Source: AGHT+IF+dKfwYAjglEtMz1QnRHdGbcUnTxLrV12p5lComR32b53bbeLvC+pKA+GJIYSQAM/aTvzAdA== X-Received: by 2002:a05:6402:5211:b0:5e7:b02b:6430 with SMTP id 4fb4d7f45d1cf-5ebcd4f0dcemr1908575a12.23.1742547225554; Fri, 21 Mar 2025 01:53:45 -0700 (PDT) Received: from localhost ([31.210.181.32]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ebccf87341sm994326a12.26.2025.03.21.01.53.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Mar 2025 01:53:45 -0700 (PDT) From: Efraim Flashner <efraim@flashner.co.il> Date: Fri, 21 Mar 2025 10:53:10 +0200 Message-ID: <78e614438f4b7e4f07be2b764eeb71d41875607e.1742546953.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.48.1 In-Reply-To: <cover.1742546953.git.efraim@flashner.co.il> References: <cover.1742546953.git.efraim@flashner.co.il> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=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 |
Series |
New firmware and updates
|
|
Commit Message
Efraim Flashner
March 21, 2025, 8:53 a.m. UTC
* gnu/packages/firmware.scm (ovmf-loongarch64): New variable. (make-ovmf-firmware)[arguments]: Adjust the 'build phase to add a case for loongarch64. Change-Id: Ibb916b50fd3dc7831ac895cb8b59695688750377 --- gnu/packages/firmware.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
Comments
Hello, Efraim Flashner <efraim@flashner.co.il> writes: > * gnu/packages/firmware.scm (ovmf-loongarch64): New variable. > (make-ovmf-firmware)[arguments]: Adjust the 'build phase to add a case > for loongarch64. > > Change-Id: Ibb916b50fd3dc7831ac895cb8b59695688750377 > --- > gnu/packages/firmware.scm | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm > index fe2956fbfdf..6f784a281d3 100644 > --- a/gnu/packages/firmware.scm > +++ b/gnu/packages/firmware.scm > @@ -1090,6 +1090,8 @@ (define* (make-ovmf-firmware arch) > "ArmVirtPkg/ArmVirtQemu.dsc") > ("riscv64" > "OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc") > + ("loongarch64" > + "OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc") > (_ #t))))) > (add-before 'install 'install-efi-shell > (lambda _ > @@ -1247,6 +1249,25 @@ (define-public ovmf-riscv64 > (install-file "RISCV_VIRT_CODE.fd" fmw) > (install-file "RISCV_VIRT_VARS.fd" fmw)))))))))))) > > +(define-public ovmf-loongarch64 > + (let ((base (make-ovmf-firmware "loongarch64"))) > + (package > + (inherit base) > + (arguments > + (substitute-keyword-arguments (package-arguments base) > + ((#:phases phases) > + #~(modify-phases #$phases > + (replace 'install > + (lambda _ > + (let ((fmw (string-append #$output "/share/firmware"))) > + (mkdir-p fmw) Nitpick: fw is more commond than fwm as an abbrevation. > + (with-directory-excursion "Build/LoongArchVirtQemu/RELEASE_GCC/FV" Other nitpick: I'd break the directory part on a newline to fit under 80 columns, per our code style guidelines. Otherwise, my general comments elsewhere apply it too, but it LGTM otherwise. I think we should add the QEMU firmware descriptors everywhere so that they'll be usable with the libvirt-configuration firmwares field I proposed in bug#77110. Perhaps we can apply that one first to make this slightly easier (it provided some `ovmf-aux-file' procedure you'll probably want to use to locate the a locally kept .json QEMU firmware descriptor file).
On Sat, Mar 22, 2025 at 04:33:37PM +0900, Maxim Cournoyer wrote: > Hello, > > Efraim Flashner <efraim@flashner.co.il> writes: > > > * gnu/packages/firmware.scm (ovmf-loongarch64): New variable. > > (make-ovmf-firmware)[arguments]: Adjust the 'build phase to add a case > > for loongarch64. > > > > Change-Id: Ibb916b50fd3dc7831ac895cb8b59695688750377 > > --- > > gnu/packages/firmware.scm | 21 +++++++++++++++++++++ > > 1 file changed, 21 insertions(+) > > > > diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm > > index fe2956fbfdf..6f784a281d3 100644 > > --- a/gnu/packages/firmware.scm > > +++ b/gnu/packages/firmware.scm > > @@ -1090,6 +1090,8 @@ (define* (make-ovmf-firmware arch) > > "ArmVirtPkg/ArmVirtQemu.dsc") > > ("riscv64" > > "OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc") > > + ("loongarch64" > > + "OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc") > > (_ #t))))) > > (add-before 'install 'install-efi-shell > > (lambda _ > > @@ -1247,6 +1249,25 @@ (define-public ovmf-riscv64 > > (install-file "RISCV_VIRT_CODE.fd" fmw) > > (install-file "RISCV_VIRT_VARS.fd" fmw)))))))))))) > > > > +(define-public ovmf-loongarch64 > > + (let ((base (make-ovmf-firmware "loongarch64"))) > > + (package > > + (inherit base) > > + (arguments > > + (substitute-keyword-arguments (package-arguments base) > > + ((#:phases phases) > > + #~(modify-phases #$phases > > + (replace 'install > > + (lambda _ > > + (let ((fmw (string-append #$output "/share/firmware"))) > > + (mkdir-p fmw) > > Nitpick: fw is more commond than fwm as an abbrevation. > > > + (with-directory-excursion "Build/LoongArchVirtQemu/RELEASE_GCC/FV" > > Other nitpick: I'd break the directory part on a newline to fit under 80 > columns, per our code style guidelines. > > Otherwise, my general comments elsewhere apply it too, but it LGTM > otherwise. > > I think we should add the QEMU firmware descriptors everywhere so that > they'll be usable with the libvirt-configuration firmwares field I > proposed in bug#77110. Perhaps we can apply that one first to make this > slightly easier (it provided some `ovmf-aux-file' procedure you'll > probably want to use to locate the a locally kept .json QEMU firmware > descriptor file). Sounds good to me.
Hi Efraim, [...] >> I think we should add the QEMU firmware descriptors everywhere so that >> they'll be usable with the libvirt-configuration firmwares field I >> proposed in bug#77110. Perhaps we can apply that one first to make this >> slightly easier (it provided some `ovmf-aux-file' procedure you'll >> probably want to use to locate the a locally kept .json QEMU firmware >> descriptor file). > > Sounds good to me. I've now merged bug#77110, so feel free to go ahead and add the relevant .json QEMU firmware descriptors that'll make the firmware usable with our libvirt service.
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index fe2956fbfdf..6f784a281d3 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1090,6 +1090,8 @@ (define* (make-ovmf-firmware arch) "ArmVirtPkg/ArmVirtQemu.dsc") ("riscv64" "OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc") + ("loongarch64" + "OvmfPkg/LoongArchVirt/LoongArchVirtQemu.dsc") (_ #t))))) (add-before 'install 'install-efi-shell (lambda _ @@ -1247,6 +1249,25 @@ (define-public ovmf-riscv64 (install-file "RISCV_VIRT_CODE.fd" fmw) (install-file "RISCV_VIRT_VARS.fd" fmw)))))))))))) +(define-public ovmf-loongarch64 + (let ((base (make-ovmf-firmware "loongarch64"))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases) + #~(modify-phases #$phases + (replace 'install + (lambda _ + (let ((fmw (string-append #$output "/share/firmware"))) + (mkdir-p fmw) + (with-directory-excursion "Build/LoongArchVirtQemu/RELEASE_GCC/FV" + ;; Make the files the desired length and then install them + (truncate-file "QEMU_EFI.fd" (* 16 1024 1024)) + (truncate-file "QEMU_VARS.fd" (* 16 1024 1024)) + (install-file "QEMU_EFI.fd" fmw) + (install-file "QEMU_VARS.fd" fmw)))))))))))) + (define-public ovmf (deprecated-package "ovmf" ovmf-x86-64))