unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#67119] [PATCH 1/4] gnu: ovmf: Update to 202308.
@ 2023-11-12  2:48 spacecadet
  2023-11-12  3:02 ` [bug#67119] [PATCH 2/4] gnu: ovmf: Add OVMF_CODE and OVMF_VARS files spacecadet
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: spacecadet @ 2023-11-12  2:48 UTC (permalink / raw)
  To: 67119

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




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#67119] [PATCH 2/4] gnu: ovmf: Add OVMF_CODE and OVMF_VARS files.
  2023-11-12  2:48 [bug#67119] [PATCH 1/4] gnu: ovmf: Update to 202308 spacecadet
@ 2023-11-12  3:02 ` spacecadet
  2023-11-12  3:06 ` [bug#67119] [PATCH 3/4] gnu: ovmf: Update ovmf-aarch64 to use GCC5 spacecadet
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: spacecadet @ 2023-11-12  3:02 UTC (permalink / raw)
  To: 67119

Add OVMF_CODE.fd and OVMF_VARS.fs to outputs as ovmf_code_arch.bin and
ovmf_vars_arch.bin, respectively, for both ia32 and x64 architectures.
---
  gnu/packages/firmware.scm | 17 +++++++++++------
  1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index fd8b6bb8f0..53b89e4d90 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -954,12 +954,17 @@ (define-public ovmf
                  (let ((fmw (string-append #$output "/share/firmware"))
                        (toolchain-ver #$toolchain-ver))
                    (mkdir-p fmw)
-                  (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 (string-append 
"Build/OvmfX64/RELEASE_" toolchain-ver "/FV/OVMF.fd")
-                                      (string-append fmw 
"/ovmf_x64.bin")))
-                         '())))))))
+                  (for-each
+                    (lambda (file)
+                      (copy-file (string-append 
"Build/OvmfIa32/RELEASE_" toolchain-ver "/FV/" file ".fd")
+                                 (string-append fmw "/" 
(string-downcase file) "_ia32.bin"))
+                      #$@(if (string=? "x86_64-linux" 
(%current-system))
+                           '((copy-file (string-append 
"Build/OvmfX64/RELEASE_" toolchain-ver "/FV/" file ".fd")
+                                        (string-append fmw "/" 
(string-downcase file) "_x64.bin")))
+                           '()))
+                    (list "OVMF"
+                          "OVMF_CODE"
+                          "OVMF_VARS"))))))))
        (native-inputs
         `(("acpica" ,acpica)
           ("gcc@5" ,gcc-5)
-- 
2.41.0




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#67119] [PATCH 3/4] gnu: ovmf: Update ovmf-aarch64 to use GCC5.
  2023-11-12  2:48 [bug#67119] [PATCH 1/4] gnu: ovmf: Update to 202308 spacecadet
  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 ` spacecadet
  2023-11-12  3:07 ` [bug#67119] [PATCH 4/4] gnu: ovmf: Update ovmf-arm with GCC5 spacecadet
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: spacecadet @ 2023-11-12  3:06 UTC (permalink / raw)
  To: 67119

Updating OVMF to 202308 requires GCC5, packages inheriting from ovmf
also need to be updated.
---
  gnu/packages/firmware.scm | 61 ++++++++++++++++++++-------------------
  1 file changed, 31 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index 53b89e4d90..e713aa9ac6 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -981,36 +981,37 @@ (define-public ovmf
                       license:bsd-2 license:bsd-3 license:bsd-4)))))

  (define-public ovmf-aarch64
-  (package
-    (inherit ovmf)
-    (name "ovmf-aarch64")
-    (native-inputs
-     (append (package-native-inputs ovmf)
-             (if (not (string-prefix? "aarch64" (%current-system)))
-                 `(("cross-gcc" ,(cross-gcc "aarch64-linux-gnu"))
-                   ("cross-binutils" ,(cross-binutils 
"aarch64-linux-gnu")))
-                 '())))
-    (arguments
-     (substitute-keyword-arguments (package-arguments ovmf)
-       ((#:phases phases)
-        #~(modify-phases #$phases
-            #$@(if (string-prefix? "aarch64" (%current-system))
-                   '()
-                   '((add-before 'configure 'set-env
-                       (lambda _
-                         (setenv "GCC49_AARCH64_PREFIX" 
"aarch64-linux-gnu-")))))
-            (replace 'build
-              (lambda _
-                (invoke "build" "-a" "AARCH64" "-t" "GCC49"
-                        "-p" "ArmVirtPkg/ArmVirtQemu.dsc")))
-            (delete 'build-x64)
-            (replace 'install
-              (lambda _
-                (let ((fmw (string-append #$output "/share/firmware")))
-                  (mkdir-p fmw)
-                  (copy-file 
"Build/ArmVirtQemu-AARCH64/RELEASE_GCC49/FV/QEMU_EFI.fd"
-                             (string-append fmw 
"/ovmf_aarch64.bin")))))))))
-    (supported-systems %supported-systems)))
+  (let ((toolchain-ver "GCC5"))
+    (package
+      (inherit ovmf)
+      (name "ovmf-aarch64")
+      (native-inputs
+       (append (package-native-inputs ovmf)
+               (if (not (string-prefix? "aarch64" (%current-system)))
+                   `(("cross-gcc" ,(cross-gcc "aarch64-linux-gnu"))
+                     ("cross-binutils" ,(cross-binutils 
"aarch64-linux-gnu")))
+                   '())))
+      (arguments
+       (substitute-keyword-arguments (package-arguments ovmf)
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              #$@(if (string-prefix? "aarch64" (%current-system))
+                     '()
+                     #~((add-before 'configure 'set-env
+                          (lambda _
+                            (setenv (string-append #$toolchain-ver 
"_AARCH64_PREFIX") "aarch64-linux-gnu-")))))
+              (replace 'build
+                (lambda _
+                  (invoke "build" "-a" "AARCH64" "-t" #$toolchain-ver
+                          "-p" "ArmVirtPkg/ArmVirtQemu.dsc")))
+              (delete 'build-x64)
+              (replace 'install
+                (lambda _
+                  (let ((fmw (string-append #$output 
"/share/firmware")))
+                    (mkdir-p fmw)
+                    (copy-file (string-append 
"Build/ArmVirtQemu-AARCH64/RELEASE_" #$toolchain-ver "/FV/QEMU_EFI.fd")
+                               (string-append fmw 
"/ovmf_aarch64.bin")))))))))
+      (supported-systems %supported-systems))))

  (define-public ovmf-arm
    (package
-- 
2.41.0




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#67119] [PATCH 4/4] gnu: ovmf: Update ovmf-arm with GCC5.
  2023-11-12  2:48 [bug#67119] [PATCH 1/4] gnu: ovmf: Update to 202308 spacecadet
  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 ` 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
  4 siblings, 0 replies; 6+ messages in thread
From: spacecadet @ 2023-11-12  3:07 UTC (permalink / raw)
  To: 67119

Updating OVMF to 202308 requires GCC5, packages inheriting from ovmf
also need to be updated.
---
  gnu/packages/firmware.scm | 61 ++++++++++++++++++++-------------------
  1 file changed, 31 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm
index e713aa9ac6..0ee618cbcb 100644
--- a/gnu/packages/firmware.scm
+++ b/gnu/packages/firmware.scm
@@ -1014,36 +1014,37 @@ (define-public ovmf-aarch64
        (supported-systems %supported-systems))))

  (define-public ovmf-arm
-  (package
-    (inherit ovmf)
-    (name "ovmf-arm")
-    (native-inputs
-     (append (package-native-inputs ovmf)
-             (if (not (string-prefix? "armhf" (%current-system)))
-                 `(("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf"))
-                   ("cross-binutils" ,(cross-binutils 
"arm-linux-gnueabihf")))
-                 '())))
-    (arguments
-     (substitute-keyword-arguments (package-arguments ovmf)
-       ((#:phases phases)
-        #~(modify-phases #$phases
-            #$@(if (string-prefix? "armhf" (%current-system))
-                   '()
-                   '((add-before 'configure 'set-env
-                       (lambda _
-                         (setenv "GCC49_ARM_PREFIX" 
"arm-linux-gnueabihf-")))))
-            (replace 'build
-              (lambda _
-                (invoke "build" "-a" "ARM" "-t" "GCC49"
-                        "-p" "ArmVirtPkg/ArmVirtQemu.dsc")))
-            (delete 'build-x64)
-            (replace 'install
-              (lambda _
-                (let ((fmw (string-append #$output "/share/firmware")))
-                  (mkdir-p fmw)
-                  (copy-file 
"Build/ArmVirtQemu-ARM/RELEASE_GCC49/FV/QEMU_EFI.fd"
-                             (string-append fmw 
"/ovmf_arm.bin")))))))))
-    (supported-systems %supported-systems)))
+  (let ((toolchain-ver "GCC5"))
+    (package
+      (inherit ovmf)
+      (name "ovmf-arm")
+      (native-inputs
+       (append (package-native-inputs ovmf)
+               (if (not (string-prefix? "armhf" (%current-system)))
+                   `(("cross-gcc" ,(cross-gcc "arm-linux-gnueabihf"))
+                     ("cross-binutils" ,(cross-binutils 
"arm-linux-gnueabihf")))
+                   '())))
+      (arguments
+       (substitute-keyword-arguments (package-arguments ovmf)
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              #$@(if (string-prefix? "armhf" (%current-system))
+                     '()
+                     #~((add-before 'configure 'set-env
+                          (lambda _
+                            (setenv (string-append #$toolchain-ver 
"_ARM_PREFIX") "arm-linux-gnueabihf-")))))
+              (replace 'build
+                (lambda _
+                  (invoke "build" "-a" "ARM" "-t" #$toolchain-ver
+                          "-p" "ArmVirtPkg/ArmVirtQemu.dsc")))
+              (delete 'build-x64)
+              (replace 'install
+                (lambda _
+                  (let ((fmw (string-append #$output 
"/share/firmware")))
+                    (mkdir-p fmw)
+                    (copy-file (string-append 
"Build/ArmVirtQemu-ARM/RELEASE_" #$toolchain-ver "/FV/QEMU_EFI.fd")
+                               (string-append fmw 
"/ovmf_arm.bin")))))))))
+      (supported-systems %supported-systems))))

  (define* (make-arm-trusted-firmware platform
                                      #:key (triplet 
"aarch64-linux-gnu"))
-- 
2.41.0




^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#67119] [PATCH 1/4] gnu: ovmf: Update to 202308.
  2023-11-12  2:48 [bug#67119] [PATCH 1/4] gnu: ovmf: Update to 202308 spacecadet
                   ` (2 preceding siblings ...)
  2023-11-12  3:07 ` [bug#67119] [PATCH 4/4] gnu: ovmf: Update ovmf-arm with GCC5 spacecadet
@ 2023-12-11 22:34 ` Ludovic Courtès
  2023-12-19 14:32 ` bug#67119: " Efraim Flashner
  4 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2023-12-11 22:34 UTC (permalink / raw)
  To: spacecadet; +Cc: Vagrant Cascadian, Efraim Flashner, 67119

Hi,

spacecadet@purge.sh skribis:

> Update package to 202308 and add toolchain-ver variable for the GCC
> version being use in the build.

Cc’ing the ‘embedded’ team so they can take a look.

  https://issues.guix.gnu.org/67119

Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#67119: [PATCH 1/4] gnu: ovmf: Update to 202308.
  2023-11-12  2:48 [bug#67119] [PATCH 1/4] gnu: ovmf: Update to 202308 spacecadet
                   ` (3 preceding siblings ...)
  2023-12-11 22:34 ` [bug#67119] [PATCH 1/4] gnu: ovmf: Update to 202308 Ludovic Courtès
@ 2023-12-19 14:32 ` Efraim Flashner
  4 siblings, 0 replies; 6+ messages in thread
From: Efraim Flashner @ 2023-12-19 14:32 UTC (permalink / raw)
  To: spacecadet; +Cc: 67119-done

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

Thanks. Patches pushed!

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-12-19 14:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-12  2:48 [bug#67119] [PATCH 1/4] gnu: ovmf: Update to 202308 spacecadet
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

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).