guix-commits
[Top][All Lists]
Advanced

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

01/02: gnu: Add edk2-tools.


From: guix-commits
Subject: 01/02: gnu: Add edk2-tools.
Date: Tue, 20 Dec 2022 09:29:50 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit 040c43d78a3514773925ed3a3bcd70aca8c21cab
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Tue Dec 20 14:22:40 2022 +0100

    gnu: Add edk2-tools.
    
    * gnu/packages/firmware.scm (edk2-tools): New variable.
---
 gnu/packages/firmware.scm | 64 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 8c8949a5da..8972b84f51 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -530,6 +530,70 @@ coreboot.")
                    ;; cpl with a linking exception.
                    license:cpl1.0))))
 
+(define-public edk2-tools
+  (package
+    (name "edk2-tools")
+    (version "202211")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/tianocore/edk2";)
+                    (commit (string-append "edk2-stable" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1264542mm0mffjcmw5sw34h94n405swz5z56rw1ragp3j62144iy"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:make-flags
+           #~(list (string-append "BUILD_CC=" #$(cc-for-target)))
+           #:test-target "Tests"
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'change-directory
+                 (lambda _
+                   (chdir "BaseTools")))
+               (add-after 'change-directory 'disable-some-tools
+                 (lambda _
+                   ;; Disable building brotli and xz, since we package them
+                   ;; separately, and it would require fetching submodules.
+                   (substitute* "Source/C/GNUmakefile"
+                     (("^[[:blank:]]+BrotliCompress[[:blank:]]+\\\\")
+                      "\\")
+                     (("^[[:blank:]]+LzmaCompress[[:blank:]]+\\\\")
+                      "\\"))))
+               (replace 'build
+                 (lambda* (#:key (make-flags #~'()) #:allow-other-keys)
+                   ;; The default build target also runs tests.
+                   (apply invoke "make" "-C" "Source/C" make-flags)))
+               (delete 'configure)
+               (replace 'install
+                 (lambda _
+                   (mkdir #$output)
+                   (copy-recursively "Source/C/bin"
+                                     (string-append #$output "/bin")))))))
+    (native-inputs
+     (list python-wrapper))
+    (inputs
+     (list `(,util-linux "lib")))       ;for libuuid
+    (home-page
+     "https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Tools-List";)
+    (synopsis "EFI development tools")
+    (description
+     "This package contains tools for processing UEFI firmware content.
+Executables included are:
+
+@itemize
+@item @code{EfiRom}: Build Option ROM images.
+@item @code{GenFfs}: Generate FFS files.
+@item @code{GenFv}: Generate a PI firmware volume image.
+@item @code{GenFw}: Get image data from PE32 files.
+@item @code{GenSec}: Generate EFI_SECTION type files.
+@item @code{VfrCompile}: Parse preprocessed UEFI and Framework VFR files.
+@item @code{VolInfo}: Display the contents of a firmware volume.
+@end itemize")
+    (license license:bsd-2)))
+
 (define-public ovmf
   (let ((commit "13a50a6fe1dcfa6600c38456ee24e0f9ecf51b5f")
         (revision "1"))



reply via email to

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