From patchwork Wed Dec 21 02:41:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 45482 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 1FF8D27BBED; Wed, 21 Dec 2022 02:42:15 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,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 CD22727BBE9 for ; Wed, 21 Dec 2022 02:42:12 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p7p3U-0001I8-VM; Tue, 20 Dec 2022 21:42:04 -0500 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 1p7p3T-0001Hz-Fu for guix-patches@gnu.org; Tue, 20 Dec 2022 21:42:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7p3T-0005PL-0i for guix-patches@gnu.org; Tue, 20 Dec 2022 21:42:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p7p3S-0008FS-LV for guix-patches@gnu.org; Tue, 20 Dec 2022 21:42:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60231] [PATCH] gnu: Add u-boot-sandbox. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Dec 2022 02:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60231 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60231@debbugs.gnu.org Cc: Maxim Cournoyer X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167159049031690 (code B ref -1); Wed, 21 Dec 2022 02:42:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Dec 2022 02:41:30 +0000 Received: from localhost ([127.0.0.1]:48719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7p2w-0008F4-50 for submit@debbugs.gnu.org; Tue, 20 Dec 2022 21:41:30 -0500 Received: from lists.gnu.org ([209.51.188.17]:55812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p7p2u-0008Ey-JG for submit@debbugs.gnu.org; Tue, 20 Dec 2022 21:41:29 -0500 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 1p7p2u-0001Gi-Cr for guix-patches@gnu.org; Tue, 20 Dec 2022 21:41:28 -0500 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p7p2s-0005Mu-AA for guix-patches@gnu.org; Tue, 20 Dec 2022 21:41:28 -0500 Received: by mail-qt1-x82e.google.com with SMTP id x11so12705478qtv.13 for ; Tue, 20 Dec 2022 18:41:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rj/gBpvyKax8nNHYjB60k8F8gloShvNaMoGkGj+XnD8=; b=LNovQ2kEvAn1XUBygNSEwS8SPHKFRu2McNHLY80a+ssM0x7crioh7QwbTNEuPsHBsq ZPM5rYN/kIz+bUOXzgwXdgV16inWQVxPJ2ErYId5FR4eB2gkoQoCoMthYoaZcl3XW/mG GnLYnOYueN/BVPlpyrMYVvzXjeSl6v3vhg9uhLkP3oAkTjgAoUmiAjjpV2dZBivYkV5q 4HN/bkprDCgxTk1Of8mtpjLchgtDdxkxWb1tB6OkrbkIO40asdvpemdQ8r/FBselZtkR yptJPn65zFlwc/xykRhtXe1Y67J+udeOON11v9LwsSALPIh+ur3Y1YIMatcux1h1z9QF oPfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rj/gBpvyKax8nNHYjB60k8F8gloShvNaMoGkGj+XnD8=; b=nOhCe4qYbi6EAuoG4D19HHsCKK/LutPDlsjYzAJTUrIeW5bf12IKlS3uqlotU3/ATi 0V1oohEzrBhY5RMUCiZ0vbaZP1rfTz8HdNoW3r0qHJQSckP7HGq8C8OnAASfjSm3dojc LWT7qQN/ccQzu0qGe1uD9VyBy6+0d4k0u0nuI96KrsV+S4enQLj2t3U3H2IK5ssneqL2 Jn9CalD9g14ZANib/YYTfWr2ai7skh42mfUnZv3QvchaTiznnvtdb8M+tmdA2X655WhH rmi6GbSWB+nZBl6lmoNPL6KS3QBqhHRFi8tsb5QkWiE5eabQx2854rOEyj1YHqaRFwfs hPjA== X-Gm-Message-State: AFqh2krJg+bMiGPsnXaMsmPjKLURhM1pcih/qg3xZlU7N4BD8wantKrX PBeTfzNSTQRSBbirEZL4QNE3OysmEl60dlVZ X-Google-Smtp-Source: AMrXdXuOtll4nSHYaQqrqZxJMnYFFEUz+VgKic2HXZrBkX3ptDGZAuUphvKpun8B35Vud4162hC0Sg== X-Received: by 2002:ac8:450e:0:b0:3a9:6b73:fb91 with SMTP id q14-20020ac8450e000000b003a96b73fb91mr43453qtn.64.1671590484845; Tue, 20 Dec 2022 18:41:24 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1002]) by smtp.gmail.com with ESMTPSA id fu25-20020a05622a5d9900b003a57eb7f212sm8407735qtb.10.2022.12.20.18.41.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Dec 2022 18:41:24 -0800 (PST) From: Maxim Cournoyer Date: Tue, 20 Dec 2022 21:41:17 -0500 Message-Id: <20221221024117.21718-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::82e; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x82e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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/bootloaders.scm (u-boot-sandbox): New variable. --- gnu/packages/bootloaders.scm | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) base-commit: 2f7fdf6a6832c184368ec7b358e4b7edf213754f diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 74f1647368..a1f99201d6 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -1019,6 +1019,46 @@ (define-public u-boot-qemu-riscv64 (define-public u-boot-qemu-riscv64-smode (make-u-boot-package "qemu-riscv64_smode" "riscv64-linux-gnu")) +(define-public u-boot-sandbox + (let ((base (make-u-boot-package + "sandbox" #f ;build for the native system + ;; Disable CONFIG_TOOLS_LIBCRYPTO, CONFIG_FIT_SIGNATURE and + ;; CONFIG_FIT_CIPHER and their selectors as these features + ;; require OpenSSL, which is incompatible with the GPLv2-only + ;; parts of U-boot. The options below replicate the changes + ;; that disabling the above features in 'make menuconfig' then + ;; refreshing the defconfig with 'make savedefconfig' would do. + #:configs (list "# CONFIG_FIT_RSASSA_PSS is not set" + "# CONFIG_FIT_CIPHER is not set" + "# CONFIG_LEGACY_IMAGE_FORMAT is not set" + "# CONFIG_IMAGE_PRE_LOAD is not set" + "# CONFIG_IMAGE_PRE_LOAD_SIG is not set" + "# CONFIG_CMD_BOOTM_PRE_LOAD is not set" + "CONFIG_RSA=y" + "# CONFIG_EFI_SECURE_BOOT is not set" + "# CONFIG_TOOLS_LIBCRYPTO is not set") + #:append-description + "The sandbox configuration of U-Boot provides a +@command{u-boot} command that runs as a normal user space application. It can +be used to test the functionality of U-Boot interactively without having to +deploy to an actual target device. @xref{Sandbox<6>,,,u-boot, The U-Boot +Documentation} for more information (for example by running @samp{info +\"(u-boot) Sandbox<6>\"})."))) + (package + (inherit base) + (arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (add-after 'install 'symlink-u-boot-command + (lambda* (#:key outputs #:allow-other-keys) + ;; For ease of discovery. + (mkdir (string-append #$output "/bin")) + (symlink (search-input-file outputs "libexec/u-boot") + (string-append #$output "/bin/u-boot")))))))) + (inputs (modify-inputs (package-inputs base) + (append sdl2)))))) + (define-public u-boot-sifive-unleashed (make-u-boot-package "sifive_unleashed" "riscv64-linux-gnu"))