guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: Add u-boot-sandbox.


From: guix-commits
Subject: branch master updated: gnu: Add u-boot-sandbox.
Date: Wed, 18 Jan 2023 21:14:06 -0500

This is an automated email from the git hooks/post-receive script.

apteryx pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 6433d49ab7 gnu: Add u-boot-sandbox.
6433d49ab7 is described below

commit 6433d49ab75a5575d35b258e000b18ad050006df
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Dec 20 14:08:04 2022 -0500

    gnu: Add u-boot-sandbox.
    
    * gnu/packages/bootloaders.scm (u-boot-sandbox): New variable.
---
 gnu/packages/bootloaders.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 4cf6a74022..1dcd64421c 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1108,6 +1108,46 @@ partition."))
 (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"))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]