From patchwork Fri Mar 21 08:53:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 40549 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 E3FAD27BBEC; Fri, 21 Mar 2025 08:54:35 +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 332DB27BBE2 for ; Fri, 21 Mar 2025 08:54:32 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tvY8q-0006kM-4M; Fri, 21 Mar 2025 04:54:12 -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 1tvY8n-0006jZ-LA for guix-patches@gnu.org; Fri, 21 Mar 2025 04:54:10 -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 1tvY8n-0000ls-CV for guix-patches@gnu.org; Fri, 21 Mar 2025 04:54:09 -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=UBJ3UDR4TOidH2BD10HWxIF5cBv3Ro02LG+2VKtPd08=; b=H+TAraUuf2qSIfOcCW7ekzMWAvlmKAsA9tmtSTX+xIMBDvDKqCpOyS9RZEwDZM6/ReVZBIO6CWdJAOYlA37YxgWocMqNRzNprDPVOjdiIO3hDUCckJwBANc4r3FeA2pAqsYd1so59Gy1EAYPP9prLQt/44WKMS2nsGblytPLHCfYrJJ58z1okpXAJZdNE5H94W29ziFYOtmhIcq25I4YkKd6ZvEh9mf2mUg+9cPtsRW81kwL+yIxc9czK8EfUjG9p2ocHilZMGZkkolbn8n57CcR2g3fQO2HrmNvRHRR0qri/SWTSsPXsrOpssL3JI3q41l5y+920QxKDTt9NOgwoQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tvY8n-00015D-6W; Fri, 21 Mar 2025 04:54:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77148] [PATCH 3/9] gnu: Add skiboot-qemu. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, vagrant@debian.org, guix-patches@gnu.org Resent-Date: Fri, 21 Mar 2025 08:54:09 +0000 Resent-Message-ID: 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 , Maxim Cournoyer , Efraim Flashner , Vagrant Cascadian X-Debbugs-Original-Xcc: Efraim Flashner , Vagrant Cascadian Received: via spool by 77148-submit@debbugs.gnu.org id=B77148.17425472243917 (code B ref 77148); Fri, 21 Mar 2025 08:54:09 +0000 Received: (at 77148) by debbugs.gnu.org; 21 Mar 2025 08:53:44 +0000 Received: from localhost ([127.0.0.1]:35026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvY8M-00010h-BS for submit@debbugs.gnu.org; Fri, 21 Mar 2025 04:53:44 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:55612) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tvY8J-0000z4-7a for 77148@debbugs.gnu.org; Fri, 21 Mar 2025 04:53:40 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-ac2dfdf3c38so56080066b.3 for <77148@debbugs.gnu.org>; Fri, 21 Mar 2025 01:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742547213; x=1743152013; 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=UBJ3UDR4TOidH2BD10HWxIF5cBv3Ro02LG+2VKtPd08=; b=R2/KfD7ZZRKu9wpCaeZvhguPr5/1mFslE0LNwCo1Ch9GaZjXghzHoS3eo4fKkXJZm4 oyFrdBlffio1qO4siFIOcoKfJIv706DjO973E2MNaVL0/t+pALyGhbWZD96lUJ7cVGdI TZf2X7cnQ5M3CHwyw6E2EEjAnGbdlhOe6lW+/cmdkRTRtgY4tAJ1Ah/K2avXSjV7ldTE cxSOCLO4Plf34PDqDAEzThuFFK1Pv2tO4R8ciHxwuERIyK8ooaSCaDkJRncAIkicGxrM GWwlLIYxobjapi1IWqWvBiSzkd0ibmB6VF33T0vsYyf97nW1aS5NCeR9fze5XQTpJjM+ XeVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742547213; x=1743152013; 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=UBJ3UDR4TOidH2BD10HWxIF5cBv3Ro02LG+2VKtPd08=; b=sbo24chJA6nHWbTK0OfcRNabcOZN+A2eLe4cTNqvQI/9i0zgYq7O7y9xlu7D4U4c3S O9bVOKOqRGeQcZGdvIcq865Fsso3cFBwWao/hEu00CRaJ68tmgaCej+EteoU5/N0IhcH pISnLt2DNyPMszEvSulxZJuI3rKiN8zY2fw5XG+0Ouj/y73pFDsmd5ilZ8LYuG0AEzW6 6o40HGJtxhh59swAHcye8osKKccrcuXzTjXu+tNrDjs6yfacTLbMhHOqJSMkoJ7RMXYZ t4SVrZN9s0Ejf0YPhhXvshuYkFb4eapokoZ3nMlIbgDvrCzGcZLrhMErDic5a/DKM/o7 Njsg== X-Gm-Message-State: AOJu0YzwGi9kqyFPAG12RuzU8gG3Zy3laeCmx76LFtgRWhaJYFty6CKC XkMNe4sr79vBJwcN9AeLSYXRaP9WcP4uYVn5xNOLK2DVRUVy4IB512cu2m1l X-Gm-Gg: ASbGncsXZrfSGT9BLEFlmtyB0nyFb2M3EqMR7F345a6oK9XSsPKkdhHgRYqWMlx8Kfd CN9/jj9Tv9h0161MSdJ2nrZtTvNBAPTNClRkHVDyPzr/ROJFyfQGuBj0TvJy9Pw1ADx6ehEEA58 Z9epQmIiWAzlbhXdNzDG07hVxRjYCNyBAEJhrxOWcLswq5BBeV7UdmdYnnwYYkB2QhiLIeDBc5b 7/6atOZC5rFPxEdhwXrVRvN15v0HysoymOs7YpmowjoaS22qCwujBNeg9H7GUhagXFme6QNup13 JI7NaJZj2KhEGEkS+T7JrsrsoG11QkIEztYgLg3DQJOz/NdK X-Google-Smtp-Source: AGHT+IGyQgdd4V8fqkFxgVyrmUg84jNBOYT2nDeE8j4nMoRzihdXweVZHvwOlVLpfOcIIWSgLdXoig== X-Received: by 2002:a17:907:3f14:b0:ac2:d0e6:2b99 with SMTP id a640c23a62f3a-ac3f24c8369mr256665466b.36.1742547212732; Fri, 21 Mar 2025 01:53:32 -0700 (PDT) Received: from localhost ([31.210.181.32]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ac3ef869f32sm111268866b.26.2025.03.21.01.53.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Mar 2025 01:53:31 -0700 (PDT) From: Efraim Flashner Date: Fri, 21 Mar 2025 10:53:04 +0200 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 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/packages/firmware.scm (skiboot-qemu): New variable. Change-Id: Ieb90171de7e74a4617e2c50b62c317b152d3a0c5 --- gnu/packages/firmware.scm | 65 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 88ee0f5777c..35bfa6425ac 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -55,6 +55,7 @@ (define-module (gnu packages firmware) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages bison) + #:use-module (gnu packages bootloaders) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) @@ -830,6 +831,70 @@ (define-public sgabios after an operating system boots.") (license license:asl2.0)))) +(define-public skiboot-qemu + (package + (name "skiboot") + (version "7.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/open-power/skiboot") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1gpgviphai9biw6cmq1bl50i1419b0q6n5c8vjmq7zx3a46mjwqv")))) + (build-system gnu-build-system) + (arguments + (list #:make-flags + #~(list (string-append "SKIBOOT_VERSION=" #$version) + #$@(if (target-little-endian?) + #~("HOSTEND=LITTLE") + #~("HOSTEND=BIG")) + "USE_VALGRIND=0") + #:target #f ; Package produces firmware. + #:parallel-tests? #f + #:phases + #~(modify-phases %standard-phases + (delete 'configure) ; No configure script. + (add-after 'unpack 'patch-files + (lambda _ + (substitute* "external/common/get_arch.sh" + (("/bin/sh") (which "sh"))))) + (add-before 'check 'pre-check + (lambda _ + (delete-file "external/pflash/test/tests/01-info") + (substitute* "libc/test/run-time.c" + (("/usr/include/assert\\.h") + (search-input-file %build-inputs "include/assert.h"))) + (substitute* "external/test/test.sh" + (("/bin/true") (which "true"))) + (substitute* "libstb/secvar/test/Makefile.check" + (("check: secvar-check") "check:\n")))) + (replace 'install + (lambda _ + (install-file "skiboot.lid" + (string-append #$output "/share/qemu"))))))) + (native-inputs + (append + (if (not (string-prefix? "powerpc64" (%current-system))) + (list (cross-gcc "powerpc64-linux-gnu") + (cross-binutils "powerpc64-linux-gnu"))) + (list dtc perl))) + (inputs (list openssl)) + (home-page "https://github.com/open-power/skiboot/") + (synopsis "OPAL boot and runtime firmware for POWER") + (description + "@acronym{OPAL, OpenPower Abstraction Layer} firmware comes in several parts. +The OPAL image is three parts: +@enumerate +@item skiboot (includes OPAL runtime services) +@item skiroot - the bootloader environment, with the kernel and initramfs +(containing the petitboot bootloader) +@end enumerate +They may be all part of one payload or three separate images.") + (license license:asl2.0))) + (define-public slof-qemu (package (name "slof")