From: spacecadet@purge.sh
To: 67119@debbugs.gnu.org
Subject: [bug#67119] [PATCH 1/4] gnu: ovmf: Update to 202308.
Date: Sun, 12 Nov 2023 02:48:05 +0000 [thread overview]
Message-ID: <a2d97e6834a178809e79e50b463fd29c@purge.sh> (raw)
Update package to 202308 and add toolchain-ver variable for the GCC
version being use in the build.
---
gnu/packages/firmware.scm | 39 +++++++++++++++++++++++++++------------
1 file changed, 27 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 294bbea184..fd8b6bb8f0 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -872,21 +872,21 @@ (define-public edk2-tools
(license license:bsd-2)))
(define-public ovmf
- (let ((commit "13a50a6fe1dcfa6600c38456ee24e0f9ecf51b5f")
- (revision "1"))
+ (let ((toolchain-ver "GCC5"))
(package
(name "ovmf")
- (version (git-version "20170116" revision commit))
+ (version "202308")
(source (origin
(method git-fetch)
(uri (git-reference
;; OVMF is part of the edk2 source tree.
(url "https://github.com/tianocore/edk2")
- (commit commit)))
+ (recursive? #t) ;edk2 now uses a lot of
submodules
+ (commit (string-append "edk2-stable" version))))
(file-name (git-file-name name version))
(sha256
(base32
-
"1gy2332kdqk8bjzpcsripx10896rbvgl0ic7r344kmpiwdgm948b"))))
+
"04rnfnaqr2c7ayplj7ib730zp1snw157zx5rmykz5hz1zz2vb20j"))))
(build-system gnu-build-system)
(arguments
(list
@@ -916,41 +916,56 @@ (define-public ovmf
(bin (string-append tools
"/BinWrappers/PosixLike")))
(setenv "WORKSPACE" cwd)
(setenv "EDK_TOOLS_PATH" tools)
+ (setenv "PYTHON3_ENABLE" "TRUE")
+ (setenv "PYTHON_COMMAND" "python3")
(setenv "PATH" (string-append (getenv "PATH") ":"
bin))
(invoke "bash" "edksetup.sh")
+ (substitute* "Conf/tools_def.txt"
+ ;; Guix gcc is compiled without pie
+ ;; The -no-pie flag causes the Ia32 build to fail
+ (("-no-pie") ""))
(substitute* "Conf/target.txt"
(("^TARGET[ ]*=.*$") "TARGET = RELEASE\n")
+ (("^TOOL_CHAIN_TAG[ ]*=.*$") (string-append
"TOOL_CHAIN_TAG = " #$toolchain-ver "\n"))
+ (("^TARGET_ARCH[ ]*=.*$")
+ (string-append "TARGET_ARCH = IA32"
+ #$@(if (string=? "x86_64-linux"
(%current-system))
+ '(", X64")
+ '())
+ "\n"))
(("^MAX_CONCURRENT_THREAD_NUMBER[ ]*=.*$")
(format #f "MAX_CONCURRENT_THREAD_NUMBER = ~a~%"
(number->string (parallel-job-count)))))
;; Build build support.
- (setenv "BUILD_CC" "gcc")
+ (setenv "CC" "gcc")
(invoke "make" "-C" tools))))
(replace 'build
(lambda _
- (invoke "build" "-a" "IA32" "-t" "GCC49"
+ (invoke "build" "-a" "IA32" "-t" #$toolchain-ver
"-p" "OvmfPkg/OvmfPkgIa32.dsc")))
#$@(if (string=? "x86_64-linux" (%current-system))
#~((add-after 'build 'build-x64
(lambda _
- (invoke "build" "-a" "X64" "-t" "GCC49"
+ (invoke "build" "-a" "X64" "-t"
#$toolchain-ver
"-p" "OvmfPkg/OvmfPkgX64.dsc"))))
#~())
(replace 'install
(lambda _
- (let ((fmw (string-append #$output "/share/firmware")))
+ (let ((fmw (string-append #$output "/share/firmware"))
+ (toolchain-ver #$toolchain-ver))
(mkdir-p fmw)
- (copy-file "Build/OvmfIa32/RELEASE_GCC49/FV/OVMF.fd"
+ (copy-file (string-append "Build/OvmfIa32/RELEASE_"
toolchain-ver "/FV/OVMF.fd")
(string-append fmw "/ovmf_ia32.bin"))
#$@(if (string=? "x86_64-linux" (%current-system))
- '((copy-file
"Build/OvmfX64/RELEASE_GCC49/FV/OVMF.fd"
+ '((copy-file (string-append
"Build/OvmfX64/RELEASE_" toolchain-ver "/FV/OVMF.fd")
(string-append fmw
"/ovmf_x64.bin")))
'())))))))
(native-inputs
`(("acpica" ,acpica)
("gcc@5" ,gcc-5)
("nasm" ,nasm)
- ("python-2" ,python-2)
+ ("perl" ,perl)
+ ("python-3" ,python-3)
("util-linux" ,util-linux "lib")))
(supported-systems '("x86_64-linux" "i686-linux"))
(home-page "https://www.tianocore.org")
base-commit: af6105afc67a15a491a0a4fd18a28c9f801a0b94
--
2.41.0
next reply other threads:[~2023-11-12 2:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-12 2:48 spacecadet [this message]
2023-11-12 3:02 ` [bug#67119] [PATCH 2/4] gnu: ovmf: Add OVMF_CODE and OVMF_VARS files spacecadet
2023-11-12 3:06 ` [bug#67119] [PATCH 3/4] gnu: ovmf: Update ovmf-aarch64 to use GCC5 spacecadet
2023-11-12 3:07 ` [bug#67119] [PATCH 4/4] gnu: ovmf: Update ovmf-arm with GCC5 spacecadet
2023-12-11 22:34 ` [bug#67119] [PATCH 1/4] gnu: ovmf: Update to 202308 Ludovic Courtès
2023-12-19 14:32 ` bug#67119: " Efraim Flashner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a2d97e6834a178809e79e50b463fd29c@purge.sh \
--to=spacecadet@purge.sh \
--cc=67119@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).