diff options
author | Marius Bakke <marius@gnu.org> | 2022-12-20 14:22:40 +0100 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2022-12-20 15:29:11 +0100 |
commit | 040c43d78a3514773925ed3a3bcd70aca8c21cab (patch) | |
tree | a5999fb4c6b96e00bad933df1ad92ffdcb99d87f /gnu | |
parent | e2b8cdde37eec971cd3fa1ca5fc97160de56fbd3 (diff) | |
download | guix-040c43d78a3514773925ed3a3bcd70aca8c21cab.tar.gz |
gnu: Add edk2-tools.
* gnu/packages/firmware.scm (edk2-tools): New variable.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/firmware.scm | 64 |
1 files changed, 64 insertions, 0 deletions
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")) |