Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] fwupd-efi: update to 1.4.
@ 2023-11-16  9:55 dataCobra
  2023-11-16  9:59 ` [PR PATCH] [Updated] " dataCobra
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dataCobra @ 2023-11-16  9:55 UTC (permalink / raw)
  To: ml

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

There is a new pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages fwupd-efi
https://github.com/void-linux/void-packages/pull/47264

fwupd-efi: update to 1.4.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - i686



A patch file from https://github.com/void-linux/void-packages/pull/47264.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fwupd-efi-47264.patch --]
[-- Type: text/x-diff, Size: 1531 bytes --]

From e0828faf522ae0ea3a3e0f97c8d41986b7b66d63 Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Thu, 16 Nov 2023 10:44:50 +0100
Subject: [PATCH] fwupd-efi: update to 1.4.

---
 srcpkgs/fwupd-efi/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/fwupd-efi/template b/srcpkgs/fwupd-efi/template
index 78a543fec1dd7..f40dc6e28245c 100644
--- a/srcpkgs/fwupd-efi/template
+++ b/srcpkgs/fwupd-efi/template
@@ -1,21 +1,21 @@
 # Template file for 'fwupd-efi'
 pkgname=fwupd-efi
-version=1.3
+version=1.4
 revision=1
 archs="x86_64* i686* arm* aarch64*"
 build_style=meson
 build_helper="gir"
 configure_args="-Defi-includedir=${XBPS_CROSS_BASE}/usr/include/efi
- -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib -Defi-ld=${XBPS_CROSS_BASE}/bin/ld
+ -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib
  -Defi-libdir=${XBPS_CROSS_BASE}/usr/lib"
 hostmakedepends="efivar"
-makedepends="libefivar-devel gnu-efi-libs"
+makedepends="libefivar-devel gnu-efi-libs python3-pefile"
 short_desc="EFI Application used by uefi-capsule plugin in fwupd"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/fwupd/fwupd-efi"
 distfiles="https://github.com/fwupd/fwupd-efi/archive/refs/tags/${version}.tar.gz"
-checksum=0e76057c178e221f63eaf9142fa1d06780a8eb3df7cf0c11f92660138dec5c83
+checksum=b1f5fe72e16d4e2f4c616da416dc93bd79331057336208465da37bafe8f8f83d
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args+=" -Defi-cc=/usr/bin/${XBPS_CROSS_TRIPLET}-gcc"

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

* Re: [PR PATCH] [Updated] fwupd-efi: update to 1.4.
  2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
@ 2023-11-16  9:59 ` dataCobra
  2023-11-16 10:40 ` dataCobra
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dataCobra @ 2023-11-16  9:59 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages fwupd-efi
https://github.com/void-linux/void-packages/pull/47264

fwupd-efi: update to 1.4.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - i686



A patch file from https://github.com/void-linux/void-packages/pull/47264.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fwupd-efi-47264.patch --]
[-- Type: text/x-diff, Size: 1540 bytes --]

From bc2a057594c9fb7e1acff227894fdf9c885ddd4d Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Thu, 16 Nov 2023 10:59:36 +0100
Subject: [PATCH] fwupd-efi: update to 1.4.

---
 srcpkgs/fwupd-efi/template | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/fwupd-efi/template b/srcpkgs/fwupd-efi/template
index 78a543fec1dd7..a1897e8f450d4 100644
--- a/srcpkgs/fwupd-efi/template
+++ b/srcpkgs/fwupd-efi/template
@@ -1,22 +1,18 @@
 # Template file for 'fwupd-efi'
 pkgname=fwupd-efi
-version=1.3
+version=1.4
 revision=1
 archs="x86_64* i686* arm* aarch64*"
 build_style=meson
 build_helper="gir"
 configure_args="-Defi-includedir=${XBPS_CROSS_BASE}/usr/include/efi
- -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib -Defi-ld=${XBPS_CROSS_BASE}/bin/ld
+ -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib
  -Defi-libdir=${XBPS_CROSS_BASE}/usr/lib"
 hostmakedepends="efivar"
-makedepends="libefivar-devel gnu-efi-libs"
+makedepends="libefivar-devel gnu-efi-libs python3-pefile"
 short_desc="EFI Application used by uefi-capsule plugin in fwupd"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/fwupd/fwupd-efi"
 distfiles="https://github.com/fwupd/fwupd-efi/archive/refs/tags/${version}.tar.gz"
-checksum=0e76057c178e221f63eaf9142fa1d06780a8eb3df7cf0c11f92660138dec5c83
-
-if [ "$CROSS_BUILD" ]; then
-	configure_args+=" -Defi-cc=/usr/bin/${XBPS_CROSS_TRIPLET}-gcc"
-fi
+checksum=b1f5fe72e16d4e2f4c616da416dc93bd79331057336208465da37bafe8f8f83d

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

* Re: [PR PATCH] [Updated] fwupd-efi: update to 1.4.
  2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
  2023-11-16  9:59 ` [PR PATCH] [Updated] " dataCobra
@ 2023-11-16 10:40 ` dataCobra
  2024-01-26  9:57 ` dataCobra
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dataCobra @ 2023-11-16 10:40 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages fwupd-efi
https://github.com/void-linux/void-packages/pull/47264

fwupd-efi: update to 1.4.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - i686



A patch file from https://github.com/void-linux/void-packages/pull/47264.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fwupd-efi-47264.patch --]
[-- Type: text/x-diff, Size: 1614 bytes --]

From e75416f9d3e6f67d9c5f7ad8c0fa53e03230ea27 Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Thu, 16 Nov 2023 11:39:59 +0100
Subject: [PATCH] fwupd-efi: update to 1.4.

---
 srcpkgs/fwupd-efi/template | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/fwupd-efi/template b/srcpkgs/fwupd-efi/template
index 78a543fec1dd7..c9654ffd84d0a 100644
--- a/srcpkgs/fwupd-efi/template
+++ b/srcpkgs/fwupd-efi/template
@@ -1,22 +1,23 @@
 # Template file for 'fwupd-efi'
 pkgname=fwupd-efi
-version=1.3
+version=1.4
 revision=1
 archs="x86_64* i686* arm* aarch64*"
 build_style=meson
 build_helper="gir"
 configure_args="-Defi-includedir=${XBPS_CROSS_BASE}/usr/include/efi
- -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib -Defi-ld=${XBPS_CROSS_BASE}/bin/ld
+ -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib
  -Defi-libdir=${XBPS_CROSS_BASE}/usr/lib"
 hostmakedepends="efivar"
-makedepends="libefivar-devel gnu-efi-libs"
+makedepends="libefivar-devel gnu-efi-libs python3-pefile"
 short_desc="EFI Application used by uefi-capsule plugin in fwupd"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/fwupd/fwupd-efi"
 distfiles="https://github.com/fwupd/fwupd-efi/archive/refs/tags/${version}.tar.gz"
-checksum=0e76057c178e221f63eaf9142fa1d06780a8eb3df7cf0c11f92660138dec5c83
+checksum=b1f5fe72e16d4e2f4c616da416dc93bd79331057336208465da37bafe8f8f83d
 
 if [ "$CROSS_BUILD" ]; then
-	configure_args+=" -Defi-cc=/usr/bin/${XBPS_CROSS_TRIPLET}-gcc"
+	CC="/usr/bin/${XBPS_CROSS_TRIPLET}-gcc"
+	LD="${XBPS_CROSS_BASE}/bin/ld"
 fi

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

* Re: [PR PATCH] [Updated] fwupd-efi: update to 1.4.
  2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
  2023-11-16  9:59 ` [PR PATCH] [Updated] " dataCobra
  2023-11-16 10:40 ` dataCobra
@ 2024-01-26  9:57 ` dataCobra
  2024-01-26 10:00 ` dataCobra
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dataCobra @ 2024-01-26  9:57 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages fwupd-efi
https://github.com/void-linux/void-packages/pull/47264

fwupd-efi: update to 1.4.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - i686



A patch file from https://github.com/void-linux/void-packages/pull/47264.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fwupd-efi-47264.patch --]
[-- Type: text/x-diff, Size: 7450 bytes --]

From a5ffa5d41bb6bf004df48ce977aabf55257cd558 Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Fri, 26 Jan 2024 10:56:47 +0100
Subject: [PATCH] fwupd-efi: update to 1.4.

---
 .../fwupd-efi-1.4-efi_ld_override.patch       |  26 +++++
 .../fwupd-efi-1.4-uefi_210_fixes.patch        | 107 ++++++++++++++++++
 srcpkgs/fwupd-efi/template                    |   6 +-
 3 files changed, 136 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_ld_override.patch
 create mode 100644 srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch

diff --git a/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_ld_override.patch b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_ld_override.patch
new file mode 100644
index 0000000000000..0b703a41d2e60
--- /dev/null
+++ b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_ld_override.patch
@@ -0,0 +1,26 @@
+--- a/efi/meson.build
++++ b/efi/meson.build
+@@ -1,6 +1,7 @@
+ generate_sbat = find_program('generate_sbat.py', native: true)
+ generate_binary = find_program('generate_binary.py', native: true)
+ 
++efi_ld = get_option('efi-ld')
+ efi_ldsdir = get_option('efi-ldsdir')
+ efi_incdir = get_option('efi-includedir')
+ 
+@@ -226,7 +227,7 @@
+ so = custom_target('fwup.so',
+                    input : [o_file1, o_file2, o_file3, o_file4, o_file5],
+                    output : 'fwup.so',
+-                   command : [ld, '-o', '@OUTPUT@'] +
++                   command : [efi_ld, '-o', '@OUTPUT@'] +
+                              efi_ldflags + ['@INPUT@'] +
+                              ['-lefi', '-lgnuefi', libgcc_file_name],
+                    depends: fwupd_so_deps)
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,3 +1,4 @@
++option('efi-ld', type : 'string', value : 'ld', description : 'the linker to use for EFI modules')
+ option('efi-libdir', type : 'string', description : 'path to the EFI lib directory')
+ option('efi-ldsdir', type : 'string', description : 'path to the EFI lds directory')
+ option('efi-includedir', type : 'string', value : '/usr/include/efi', description : 'path to the EFI header directory')
diff --git a/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch
new file mode 100644
index 0000000000000..d4de5f174857e
--- /dev/null
+++ b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch
@@ -0,0 +1,107 @@
+From bd958f2e8f03a85a7e1fe40a3ca7b78e0b24b79f Mon Sep 17 00:00:00 2001
+From: Callum Farmer <gmbr3@opensuse.org>
+Date: Sat, 11 Feb 2023 15:39:06 +0000
+Subject: [PATCH] UEFI 2.10 fixes
+
+Revert "Align sections to 512 bytes"
+
+This is not permitted according to the Microsoft
+guidelines which require section alignment to be
+the same as the page size of the architecture which
+for all supported archs is the default in Binutils
+
+https://techcommunity.microsoft.com/t5/hardware-dev-center/new-uefi-ca-memory-mitigation-requirements-for-signing/ba-p/3608714
+
+This reverts commit c60c0b8dfda71275ab40bdb316a6ca650c7a8948.
+
+Keep .areloc ARM32 section
+
+This is the psuedo .reloc section but renamed only on ARM32 to avoid
+a bad RELSZ value (gnu-efi 3.0.18+)
+
+Only use 4KiB pages on aarch64
+
+Binutils is currently configured by default
+to use 64KiB pages on aarch64, however this
+is not allowed by the UEFI specification
+
+Check if crt0 contains .note.GNU-stack section
+
+We need the .note.GNU-stack section for NX
+compat. If we don't have a new enough
+gnu-efi, error as the gnu-efi libraries
+themselves must have been built as NX
+for this to work
+
+Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
+---
+ efi/crt0/meson.build   |  1 +
+ efi/generate_binary.py |  4 ++--
+ efi/meson.build        | 12 +++++++++++-
+ 3 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/efi/crt0/meson.build b/efi/crt0/meson.build
+index f5f45c5..fbd943e 100644
+--- a/efi/crt0/meson.build
++++ b/efi/crt0/meson.build
+@@ -1,3 +1,4 @@
++arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
+ o_crt0 = custom_target('efi_crt0',
+                        input : arch_crt_source,
+                        output : arch_crt,
+diff --git a/efi/generate_binary.py b/efi/generate_binary.py
+index bd2d959..e27f926 100755
+--- a/efi/generate_binary.py
++++ b/efi/generate_binary.py
+@@ -31,9 +31,9 @@ def _run_objcopy(args):
+         "-j",
+         ".rodata",
+         "-j",
++        ".areloc",
++        "-j",
+         ".rel*",
+-        "--section-alignment",
+-        "512",
+         args.infile,
+         args.outfile,
+     ]
+diff --git a/efi/meson.build b/efi/meson.build
+index 1931855..a476884 100644
+--- a/efi/meson.build
++++ b/efi/meson.build
+@@ -95,6 +95,11 @@ else
+         coff_header_in_crt0 = false
+ endif
+ 
++# For NX compat, we must ensure we have .note.GNU-stack
++if run_command('grep', '-q', '.note.GNU-stack', join_paths(efi_crtdir, arch_crt), check: false).returncode() != 0
++    error('Cannot find NX section in @0@, update to gnu-efi 3.0.15+'.format(join_paths(efi_crtdir, arch_crt)))
++endif
++
+ # older objcopy for Aarch64 and ARM32 are not EFI capable.
+ # Use 'binary' instead, and add required symbols manually.
+ if host_cpu == 'arm' or (host_cpu == 'aarch64' and (objcopy_version.version_compare ('< 2.38') or coff_header_in_crt0))
+@@ -119,7 +124,6 @@ endif
+ # is the system crt0 for arm and aarch64 new enough to know about SBAT?
+ if objcopy_manualsymbols
+   if get_option('efi_sbat_distro_id') != ''
+-    arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
+     cmd = run_command('grep', '-q', 'sbat', join_paths(efi_crtdir, arch_crt))
+     if cmd.returncode() != 0
+       warning('Cannot find SBAT section in @0@, using local copy'.format(join_paths(efi_crtdir, arch_crt)))
+@@ -187,6 +191,12 @@ efi_ldflags = ['-T',
+                '-L', efi_libdir,
+                join_paths(efi_crtdir, arch_crt)]
+ 
++if host_cpu == 'aarch64'
++# Don't use 64KiB pages
++  efi_ldflags += ['-z', 'common-page-size=4096']
++  efi_ldflags += ['-z', 'max-page-size=4096']
++endif
++
+ if objcopy_manualsymbols
+   # older objcopy for Aarch64 and ARM32 are not EFI capable.
+   # Use 'binary' instead, and add required symbols manually.
+-- 
+2.34.1
+
diff --git a/srcpkgs/fwupd-efi/template b/srcpkgs/fwupd-efi/template
index 78a543fec1dd7..206948e8d0a86 100644
--- a/srcpkgs/fwupd-efi/template
+++ b/srcpkgs/fwupd-efi/template
@@ -1,6 +1,6 @@
 # Template file for 'fwupd-efi'
 pkgname=fwupd-efi
-version=1.3
+version=1.4
 revision=1
 archs="x86_64* i686* arm* aarch64*"
 build_style=meson
@@ -9,13 +9,13 @@ configure_args="-Defi-includedir=${XBPS_CROSS_BASE}/usr/include/efi
  -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib -Defi-ld=${XBPS_CROSS_BASE}/bin/ld
  -Defi-libdir=${XBPS_CROSS_BASE}/usr/lib"
 hostmakedepends="efivar"
-makedepends="libefivar-devel gnu-efi-libs"
+makedepends="libefivar-devel gnu-efi-libs python3-pefile"
 short_desc="EFI Application used by uefi-capsule plugin in fwupd"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/fwupd/fwupd-efi"
 distfiles="https://github.com/fwupd/fwupd-efi/archive/refs/tags/${version}.tar.gz"
-checksum=0e76057c178e221f63eaf9142fa1d06780a8eb3df7cf0c11f92660138dec5c83
+checksum=b1f5fe72e16d4e2f4c616da416dc93bd79331057336208465da37bafe8f8f83d
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args+=" -Defi-cc=/usr/bin/${XBPS_CROSS_TRIPLET}-gcc"

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

* Re: fwupd-efi: update to 1.4.
  2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
                   ` (2 preceding siblings ...)
  2024-01-26  9:57 ` dataCobra
@ 2024-01-26 10:00 ` dataCobra
  2024-02-01 13:52 ` [PR PATCH] [Updated] " dataCobra
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dataCobra @ 2024-01-26 10:00 UTC (permalink / raw)
  To: ml

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

New comment by dataCobra on void-packages repository

https://github.com/void-linux/void-packages/pull/47264#issuecomment-1911780425

Comment:
I've got it to build finally with some patches and a gnu-efi-libs update.

PR #48379

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

* Re: [PR PATCH] [Updated] fwupd-efi: update to 1.4.
  2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
                   ` (3 preceding siblings ...)
  2024-01-26 10:00 ` dataCobra
@ 2024-02-01 13:52 ` dataCobra
  2024-02-09  7:13 ` dataCobra
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dataCobra @ 2024-02-01 13:52 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages fwupd-efi
https://github.com/void-linux/void-packages/pull/47264

fwupd-efi: update to 1.4.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - i686



A patch file from https://github.com/void-linux/void-packages/pull/47264.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fwupd-efi-47264.patch --]
[-- Type: text/x-diff, Size: 8692 bytes --]

From a8e11800a82ab54aea4e5b9c8a5e875b87fb1ecf Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Fri, 26 Jan 2024 10:55:58 +0100
Subject: [PATCH 1/2] gnu-efi-libs: update to 3.0.15.

---
 srcpkgs/gnu-efi-libs/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gnu-efi-libs/template b/srcpkgs/gnu-efi-libs/template
index 8e5b09f2cd20c..f1528a81c6c84 100644
--- a/srcpkgs/gnu-efi-libs/template
+++ b/srcpkgs/gnu-efi-libs/template
@@ -1,7 +1,7 @@
 # Template file for 'gnu-efi-libs'
 pkgname=gnu-efi-libs
 reverts="3.0w_1" # Not an actual revert, xbps considers 3.0w higher than 3.0.8
-version=3.0.14
+version=3.0.15
 revision=1
 makedepends="pciutils-devel"
 short_desc="Library for building UEFI Applications using GNU toolchain"
@@ -9,7 +9,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://sourceforge.net/projects/gnu-efi/"
 distfiles="${SOURCEFORGE_SITE}/gnu-efi/gnu-efi-${version}.tar.bz2"
-checksum=b73b643a0d5697d1f396d7431448e886dd805668789578e3e1a28277c9528435
+checksum=931a257b9c5c1ba65ff519f18373c438a26825f2db7866b163e96d1b168f20ea
 nostrip=yes
 
 # If we are cross-building we need to pass the cross-compilation triplet

From 2ab90419968809fadf56175a87df7771cef7146e Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Fri, 26 Jan 2024 10:56:47 +0100
Subject: [PATCH 2/2] fwupd-efi: update to 1.4.

---
 .../fwupd-efi-1.4-efi_ld_override.patch       |  26 +++++
 .../fwupd-efi-1.4-uefi_210_fixes.patch        | 107 ++++++++++++++++++
 srcpkgs/fwupd-efi/template                    |   6 +-
 3 files changed, 136 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_ld_override.patch
 create mode 100644 srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch

diff --git a/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_ld_override.patch b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_ld_override.patch
new file mode 100644
index 0000000000000..0b703a41d2e60
--- /dev/null
+++ b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_ld_override.patch
@@ -0,0 +1,26 @@
+--- a/efi/meson.build
++++ b/efi/meson.build
+@@ -1,6 +1,7 @@
+ generate_sbat = find_program('generate_sbat.py', native: true)
+ generate_binary = find_program('generate_binary.py', native: true)
+ 
++efi_ld = get_option('efi-ld')
+ efi_ldsdir = get_option('efi-ldsdir')
+ efi_incdir = get_option('efi-includedir')
+ 
+@@ -226,7 +227,7 @@
+ so = custom_target('fwup.so',
+                    input : [o_file1, o_file2, o_file3, o_file4, o_file5],
+                    output : 'fwup.so',
+-                   command : [ld, '-o', '@OUTPUT@'] +
++                   command : [efi_ld, '-o', '@OUTPUT@'] +
+                              efi_ldflags + ['@INPUT@'] +
+                              ['-lefi', '-lgnuefi', libgcc_file_name],
+                    depends: fwupd_so_deps)
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,3 +1,4 @@
++option('efi-ld', type : 'string', value : 'ld', description : 'the linker to use for EFI modules')
+ option('efi-libdir', type : 'string', description : 'path to the EFI lib directory')
+ option('efi-ldsdir', type : 'string', description : 'path to the EFI lds directory')
+ option('efi-includedir', type : 'string', value : '/usr/include/efi', description : 'path to the EFI header directory')
diff --git a/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch
new file mode 100644
index 0000000000000..d4de5f174857e
--- /dev/null
+++ b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch
@@ -0,0 +1,107 @@
+From bd958f2e8f03a85a7e1fe40a3ca7b78e0b24b79f Mon Sep 17 00:00:00 2001
+From: Callum Farmer <gmbr3@opensuse.org>
+Date: Sat, 11 Feb 2023 15:39:06 +0000
+Subject: [PATCH] UEFI 2.10 fixes
+
+Revert "Align sections to 512 bytes"
+
+This is not permitted according to the Microsoft
+guidelines which require section alignment to be
+the same as the page size of the architecture which
+for all supported archs is the default in Binutils
+
+https://techcommunity.microsoft.com/t5/hardware-dev-center/new-uefi-ca-memory-mitigation-requirements-for-signing/ba-p/3608714
+
+This reverts commit c60c0b8dfda71275ab40bdb316a6ca650c7a8948.
+
+Keep .areloc ARM32 section
+
+This is the psuedo .reloc section but renamed only on ARM32 to avoid
+a bad RELSZ value (gnu-efi 3.0.18+)
+
+Only use 4KiB pages on aarch64
+
+Binutils is currently configured by default
+to use 64KiB pages on aarch64, however this
+is not allowed by the UEFI specification
+
+Check if crt0 contains .note.GNU-stack section
+
+We need the .note.GNU-stack section for NX
+compat. If we don't have a new enough
+gnu-efi, error as the gnu-efi libraries
+themselves must have been built as NX
+for this to work
+
+Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
+---
+ efi/crt0/meson.build   |  1 +
+ efi/generate_binary.py |  4 ++--
+ efi/meson.build        | 12 +++++++++++-
+ 3 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/efi/crt0/meson.build b/efi/crt0/meson.build
+index f5f45c5..fbd943e 100644
+--- a/efi/crt0/meson.build
++++ b/efi/crt0/meson.build
+@@ -1,3 +1,4 @@
++arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
+ o_crt0 = custom_target('efi_crt0',
+                        input : arch_crt_source,
+                        output : arch_crt,
+diff --git a/efi/generate_binary.py b/efi/generate_binary.py
+index bd2d959..e27f926 100755
+--- a/efi/generate_binary.py
++++ b/efi/generate_binary.py
+@@ -31,9 +31,9 @@ def _run_objcopy(args):
+         "-j",
+         ".rodata",
+         "-j",
++        ".areloc",
++        "-j",
+         ".rel*",
+-        "--section-alignment",
+-        "512",
+         args.infile,
+         args.outfile,
+     ]
+diff --git a/efi/meson.build b/efi/meson.build
+index 1931855..a476884 100644
+--- a/efi/meson.build
++++ b/efi/meson.build
+@@ -95,6 +95,11 @@ else
+         coff_header_in_crt0 = false
+ endif
+ 
++# For NX compat, we must ensure we have .note.GNU-stack
++if run_command('grep', '-q', '.note.GNU-stack', join_paths(efi_crtdir, arch_crt), check: false).returncode() != 0
++    error('Cannot find NX section in @0@, update to gnu-efi 3.0.15+'.format(join_paths(efi_crtdir, arch_crt)))
++endif
++
+ # older objcopy for Aarch64 and ARM32 are not EFI capable.
+ # Use 'binary' instead, and add required symbols manually.
+ if host_cpu == 'arm' or (host_cpu == 'aarch64' and (objcopy_version.version_compare ('< 2.38') or coff_header_in_crt0))
+@@ -119,7 +124,6 @@ endif
+ # is the system crt0 for arm and aarch64 new enough to know about SBAT?
+ if objcopy_manualsymbols
+   if get_option('efi_sbat_distro_id') != ''
+-    arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
+     cmd = run_command('grep', '-q', 'sbat', join_paths(efi_crtdir, arch_crt))
+     if cmd.returncode() != 0
+       warning('Cannot find SBAT section in @0@, using local copy'.format(join_paths(efi_crtdir, arch_crt)))
+@@ -187,6 +191,12 @@ efi_ldflags = ['-T',
+                '-L', efi_libdir,
+                join_paths(efi_crtdir, arch_crt)]
+ 
++if host_cpu == 'aarch64'
++# Don't use 64KiB pages
++  efi_ldflags += ['-z', 'common-page-size=4096']
++  efi_ldflags += ['-z', 'max-page-size=4096']
++endif
++
+ if objcopy_manualsymbols
+   # older objcopy for Aarch64 and ARM32 are not EFI capable.
+   # Use 'binary' instead, and add required symbols manually.
+-- 
+2.34.1
+
diff --git a/srcpkgs/fwupd-efi/template b/srcpkgs/fwupd-efi/template
index 78a543fec1dd7..206948e8d0a86 100644
--- a/srcpkgs/fwupd-efi/template
+++ b/srcpkgs/fwupd-efi/template
@@ -1,6 +1,6 @@
 # Template file for 'fwupd-efi'
 pkgname=fwupd-efi
-version=1.3
+version=1.4
 revision=1
 archs="x86_64* i686* arm* aarch64*"
 build_style=meson
@@ -9,13 +9,13 @@ configure_args="-Defi-includedir=${XBPS_CROSS_BASE}/usr/include/efi
  -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib -Defi-ld=${XBPS_CROSS_BASE}/bin/ld
  -Defi-libdir=${XBPS_CROSS_BASE}/usr/lib"
 hostmakedepends="efivar"
-makedepends="libefivar-devel gnu-efi-libs"
+makedepends="libefivar-devel gnu-efi-libs python3-pefile"
 short_desc="EFI Application used by uefi-capsule plugin in fwupd"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/fwupd/fwupd-efi"
 distfiles="https://github.com/fwupd/fwupd-efi/archive/refs/tags/${version}.tar.gz"
-checksum=0e76057c178e221f63eaf9142fa1d06780a8eb3df7cf0c11f92660138dec5c83
+checksum=b1f5fe72e16d4e2f4c616da416dc93bd79331057336208465da37bafe8f8f83d
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args+=" -Defi-cc=/usr/bin/${XBPS_CROSS_TRIPLET}-gcc"

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

* Re: [PR PATCH] [Updated] fwupd-efi: update to 1.4.
  2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
                   ` (4 preceding siblings ...)
  2024-02-01 13:52 ` [PR PATCH] [Updated] " dataCobra
@ 2024-02-09  7:13 ` dataCobra
  2024-02-15 13:11 ` leahneukirchen
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dataCobra @ 2024-02-09  7:13 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages fwupd-efi
https://github.com/void-linux/void-packages/pull/47264

fwupd-efi: update to 1.4.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - i686



A patch file from https://github.com/void-linux/void-packages/pull/47264.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fwupd-efi-47264.patch --]
[-- Type: text/x-diff, Size: 12637 bytes --]

From 6eee7033ef409f25e2badd0f56ae981f8374494c Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Fri, 26 Jan 2024 10:55:58 +0100
Subject: [PATCH 1/2] gnu-efi-libs: update to 3.0.15.

---
 srcpkgs/gnu-efi-libs/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/gnu-efi-libs/template b/srcpkgs/gnu-efi-libs/template
index 8e5b09f2cd20c..f1528a81c6c84 100644
--- a/srcpkgs/gnu-efi-libs/template
+++ b/srcpkgs/gnu-efi-libs/template
@@ -1,7 +1,7 @@
 # Template file for 'gnu-efi-libs'
 pkgname=gnu-efi-libs
 reverts="3.0w_1" # Not an actual revert, xbps considers 3.0w higher than 3.0.8
-version=3.0.14
+version=3.0.15
 revision=1
 makedepends="pciutils-devel"
 short_desc="Library for building UEFI Applications using GNU toolchain"
@@ -9,7 +9,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://sourceforge.net/projects/gnu-efi/"
 distfiles="${SOURCEFORGE_SITE}/gnu-efi/gnu-efi-${version}.tar.bz2"
-checksum=b73b643a0d5697d1f396d7431448e886dd805668789578e3e1a28277c9528435
+checksum=931a257b9c5c1ba65ff519f18373c438a26825f2db7866b163e96d1b168f20ea
 nostrip=yes
 
 # If we are cross-building we need to pass the cross-compilation triplet

From 954ebad81ac39d2902643d1933394741deb1fcbe Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Fri, 9 Feb 2024 08:13:27 +0100
Subject: [PATCH 2/2] fwupd-efi: update to 1.4.

---
 .../fwupd-efi-1.4-efi_cc_ld_override.patch    | 111 ++++++++++++++++++
 .../fwupd-efi-1.4-uefi_210_fixes.patch        | 107 +++++++++++++++++
 srcpkgs/fwupd-efi/template                    |   6 +-
 3 files changed, 221 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_cc_ld_override.patch
 create mode 100644 srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch

diff --git a/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_cc_ld_override.patch b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_cc_ld_override.patch
new file mode 100644
index 0000000000000..786812aad900f
--- /dev/null
+++ b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-efi_cc_ld_override.patch
@@ -0,0 +1,111 @@
+--- a/efi/meson.build
++++ b/efi/meson.build
+@@ -1,6 +1,8 @@
+ generate_sbat = find_program('generate_sbat.py', native: true)
+ generate_binary = find_program('generate_binary.py', native: true)
+ 
++efi_cc = get_option('efi-cc')
++efi_ld = get_option('efi-ld')
+ efi_ldsdir = get_option('efi-ldsdir')
+ efi_incdir = get_option('efi-includedir')
+ 
+@@ -18,8 +20,11 @@ endif
+ 
+ efi_libdir = get_option('efi-libdir')
+ if efi_libdir == ''
+-  multi = run_command(cc.cmd_array(), '-print-multi-os-directory').stdout().strip()
+-  efi_libdir = join_paths('/usr/lib/', multi)
++  cmd = 'cd /usr/lib/$(@0@ -print-multi-os-directory) && pwd'.format(efi_cc)
++  ret = run_command('sh', '-c', cmd)
++  if ret.returncode() == 0
++    efi_libdir = ret.stdout().strip()
++  endif
+ endif
+ 
+ have_gnu_efi = gnu_efi_path_arch != '' and efi_libdir != ''
+@@ -182,28 +187,28 @@ else
+   efi_format = ['--target=efi-app-@0@'.format(gnu_efi_arch)]
+ endif
+ 
+-libgcc_file_name = run_command(cc.cmd_array(), '-print-libgcc-file-name').stdout().strip()
++libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
+ efi_name = 'fwupd@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
+ 
+ o_file1 = custom_target('fwupdate.o',
+                         input : 'fwupdate.c',
+                         output : 'fwupdate.o',
+-                        command : [cc.cmd_array(), '-c', '@INPUT@', '-o', '@OUTPUT@']
++                        command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
+                                   + compile_args)
+ o_file2 = custom_target('fwup-debug.o',
+                         input : 'fwup-debug.c',
+                         output : 'fwup-debug.o',
+-                        command : [cc.cmd_array(), '-c', '@INPUT@', '-o', '@OUTPUT@']
++                        command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
+                                   + compile_args)
+ o_file3 = custom_target('fwup-efi.o',
+                         input : 'fwup-efi.c',
+                         output : 'fwup-efi.o',
+-                        command : [cc.cmd_array(), '-c', '@INPUT@', '-o', '@OUTPUT@']
++                        command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
+                                   + compile_args)
+ o_file4 = custom_target('fwup-common.o',
+                         input : 'fwup-common.c',
+                         output : 'fwup-common.o',
+-                        command : [cc.cmd_array(), '-c', '@INPUT@', '-o', '@OUTPUT@']
++                        command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
+                                   + compile_args)
+ 
+ o_file5 = custom_target('fwup-sbat.o',
+@@ -211,8 +216,7 @@ o_file5 = custom_target('fwup-sbat.o',
+                         command : [
+                           generate_sbat,
+                           '@OUTPUT@',
+-                          '--cc', ' '.join(cc.cmd_array()),
+-                          '--cflags', ' '.join(compile_args),
++                          '--cc', efi_cc,
+                           '--objcopy', objcopy,
+                           '--project-name', meson.project_name(),
+                           '--project-version', meson.project_version(),
+@@ -236,7 +240,7 @@ endif
+ so = custom_target('fwup.so',
+                    input : [o_file1, o_file2, o_file3, o_file4, o_file5],
+                    output : 'fwup.so',
+-                   command : [ld, '-o', '@OUTPUT@'] +
++                   command : [efi_ld, '-o', '@OUTPUT@'] +
+                              efi_ldflags + ['@INPUT@'] +
+                              ['-lefi', '-lgnuefi', libgcc_file_name],
+                    depends: fwupd_so_deps)
+--- a/efi/generate_sbat.py
++++ b/efi/generate_sbat.py
+@@ -18,12 +18,9 @@ def _generate_sbat(args):
+     FWUPD_SUMMARY = "Firmware update daemon"
+     FWUPD_URL = "https://github.com/fwupd/fwupd-efi"
+ 
+-    cmd = (
+-        args.cc.split()
+-        + ["-x", "c", "-c", "-o", args.outfile, "/dev/null"]
+-        + args.cflags.split(" ")
++    subprocess.run(
++        [args.cc, "-x", "c", "-c", "-o", args.outfile, "/dev/null"], check=True
+     )
+-    subprocess.run(cmd, check=True)
+ 
+     # not specified
+     if not args.sbat_distro_id:
+@@ -86,7 +83,6 @@ if __name__ == "__main__":
+     parser.add_argument(
+         "--cc", default="gcc", help="Compiler to use for generating sbat object"
+     )
+-    parser.add_argument("--cflags", help="C compiler flags to be used by CC")
+     parser.add_argument(
+         "--objcopy", default="objcopy", help="Binary file to use for objcopy"
+     )
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,3 +1,5 @@
++option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules')
++option('efi-ld', type : 'string', value : 'ld', description : 'the linker to use for EFI modules')
+ option('efi-libdir', type : 'string', description : 'path to the EFI lib directory')
+ option('efi-ldsdir', type : 'string', description : 'path to the EFI lds directory')
+ option('efi-includedir', type : 'string', value : '/usr/include/efi', description : 'path to the EFI header directory')
diff --git a/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch
new file mode 100644
index 0000000000000..d4de5f174857e
--- /dev/null
+++ b/srcpkgs/fwupd-efi/patches/fwupd-efi-1.4-uefi_210_fixes.patch
@@ -0,0 +1,107 @@
+From bd958f2e8f03a85a7e1fe40a3ca7b78e0b24b79f Mon Sep 17 00:00:00 2001
+From: Callum Farmer <gmbr3@opensuse.org>
+Date: Sat, 11 Feb 2023 15:39:06 +0000
+Subject: [PATCH] UEFI 2.10 fixes
+
+Revert "Align sections to 512 bytes"
+
+This is not permitted according to the Microsoft
+guidelines which require section alignment to be
+the same as the page size of the architecture which
+for all supported archs is the default in Binutils
+
+https://techcommunity.microsoft.com/t5/hardware-dev-center/new-uefi-ca-memory-mitigation-requirements-for-signing/ba-p/3608714
+
+This reverts commit c60c0b8dfda71275ab40bdb316a6ca650c7a8948.
+
+Keep .areloc ARM32 section
+
+This is the psuedo .reloc section but renamed only on ARM32 to avoid
+a bad RELSZ value (gnu-efi 3.0.18+)
+
+Only use 4KiB pages on aarch64
+
+Binutils is currently configured by default
+to use 64KiB pages on aarch64, however this
+is not allowed by the UEFI specification
+
+Check if crt0 contains .note.GNU-stack section
+
+We need the .note.GNU-stack section for NX
+compat. If we don't have a new enough
+gnu-efi, error as the gnu-efi libraries
+themselves must have been built as NX
+for this to work
+
+Signed-off-by: Callum Farmer <gmbr3@opensuse.org>
+---
+ efi/crt0/meson.build   |  1 +
+ efi/generate_binary.py |  4 ++--
+ efi/meson.build        | 12 +++++++++++-
+ 3 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/efi/crt0/meson.build b/efi/crt0/meson.build
+index f5f45c5..fbd943e 100644
+--- a/efi/crt0/meson.build
++++ b/efi/crt0/meson.build
+@@ -1,3 +1,4 @@
++arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
+ o_crt0 = custom_target('efi_crt0',
+                        input : arch_crt_source,
+                        output : arch_crt,
+diff --git a/efi/generate_binary.py b/efi/generate_binary.py
+index bd2d959..e27f926 100755
+--- a/efi/generate_binary.py
++++ b/efi/generate_binary.py
+@@ -31,9 +31,9 @@ def _run_objcopy(args):
+         "-j",
+         ".rodata",
+         "-j",
++        ".areloc",
++        "-j",
+         ".rel*",
+-        "--section-alignment",
+-        "512",
+         args.infile,
+         args.outfile,
+     ]
+diff --git a/efi/meson.build b/efi/meson.build
+index 1931855..a476884 100644
+--- a/efi/meson.build
++++ b/efi/meson.build
+@@ -95,6 +95,11 @@ else
+         coff_header_in_crt0 = false
+ endif
+ 
++# For NX compat, we must ensure we have .note.GNU-stack
++if run_command('grep', '-q', '.note.GNU-stack', join_paths(efi_crtdir, arch_crt), check: false).returncode() != 0
++    error('Cannot find NX section in @0@, update to gnu-efi 3.0.15+'.format(join_paths(efi_crtdir, arch_crt)))
++endif
++
+ # older objcopy for Aarch64 and ARM32 are not EFI capable.
+ # Use 'binary' instead, and add required symbols manually.
+ if host_cpu == 'arm' or (host_cpu == 'aarch64' and (objcopy_version.version_compare ('< 2.38') or coff_header_in_crt0))
+@@ -119,7 +124,6 @@ endif
+ # is the system crt0 for arm and aarch64 new enough to know about SBAT?
+ if objcopy_manualsymbols
+   if get_option('efi_sbat_distro_id') != ''
+-    arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
+     cmd = run_command('grep', '-q', 'sbat', join_paths(efi_crtdir, arch_crt))
+     if cmd.returncode() != 0
+       warning('Cannot find SBAT section in @0@, using local copy'.format(join_paths(efi_crtdir, arch_crt)))
+@@ -187,6 +191,12 @@ efi_ldflags = ['-T',
+                '-L', efi_libdir,
+                join_paths(efi_crtdir, arch_crt)]
+ 
++if host_cpu == 'aarch64'
++# Don't use 64KiB pages
++  efi_ldflags += ['-z', 'common-page-size=4096']
++  efi_ldflags += ['-z', 'max-page-size=4096']
++endif
++
+ if objcopy_manualsymbols
+   # older objcopy for Aarch64 and ARM32 are not EFI capable.
+   # Use 'binary' instead, and add required symbols manually.
+-- 
+2.34.1
+
diff --git a/srcpkgs/fwupd-efi/template b/srcpkgs/fwupd-efi/template
index 78a543fec1dd7..206948e8d0a86 100644
--- a/srcpkgs/fwupd-efi/template
+++ b/srcpkgs/fwupd-efi/template
@@ -1,6 +1,6 @@
 # Template file for 'fwupd-efi'
 pkgname=fwupd-efi
-version=1.3
+version=1.4
 revision=1
 archs="x86_64* i686* arm* aarch64*"
 build_style=meson
@@ -9,13 +9,13 @@ configure_args="-Defi-includedir=${XBPS_CROSS_BASE}/usr/include/efi
  -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib -Defi-ld=${XBPS_CROSS_BASE}/bin/ld
  -Defi-libdir=${XBPS_CROSS_BASE}/usr/lib"
 hostmakedepends="efivar"
-makedepends="libefivar-devel gnu-efi-libs"
+makedepends="libefivar-devel gnu-efi-libs python3-pefile"
 short_desc="EFI Application used by uefi-capsule plugin in fwupd"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/fwupd/fwupd-efi"
 distfiles="https://github.com/fwupd/fwupd-efi/archive/refs/tags/${version}.tar.gz"
-checksum=0e76057c178e221f63eaf9142fa1d06780a8eb3df7cf0c11f92660138dec5c83
+checksum=b1f5fe72e16d4e2f4c616da416dc93bd79331057336208465da37bafe8f8f83d
 
 if [ "$CROSS_BUILD" ]; then
 	configure_args+=" -Defi-cc=/usr/bin/${XBPS_CROSS_TRIPLET}-gcc"

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

* Re: fwupd-efi: update to 1.4.
  2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
                   ` (5 preceding siblings ...)
  2024-02-09  7:13 ` dataCobra
@ 2024-02-15 13:11 ` leahneukirchen
  2024-02-15 14:21 ` [PR PATCH] [Updated] " dataCobra
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: leahneukirchen @ 2024-02-15 13:11 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/47264#issuecomment-1946070337

Comment:
gnu-efi-libs 3.0.17 exist.

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

* Re: [PR PATCH] [Updated] fwupd-efi: update to 1.4.
  2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
                   ` (6 preceding siblings ...)
  2024-02-15 13:11 ` leahneukirchen
@ 2024-02-15 14:21 ` dataCobra
  2024-02-15 14:23 ` dataCobra
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dataCobra @ 2024-02-15 14:21 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages fwupd-efi
https://github.com/void-linux/void-packages/pull/47264

fwupd-efi: update to 1.4.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - i686



A patch file from https://github.com/void-linux/void-packages/pull/47264.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fwupd-efi-47264.patch --]
[-- Type: text/x-diff, Size: 7791 bytes --]

From bb25ae1a3e573867628cae9c97fa7b4dad4ef3cf Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Thu, 15 Feb 2024 15:16:13 +0100
Subject: [PATCH 1/2] gnu-efi-libs: update to 3.0.17.

---
 srcpkgs/gnu-efi-libs/patches/no-werror.patch | 18 +++++++-----------
 srcpkgs/gnu-efi-libs/template                |  7 +++++--
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/srcpkgs/gnu-efi-libs/patches/no-werror.patch b/srcpkgs/gnu-efi-libs/patches/no-werror.patch
index f6cc95bdccffa..8d91760ded5bb 100644
--- a/srcpkgs/gnu-efi-libs/patches/no-werror.patch
+++ b/srcpkgs/gnu-efi-libs/patches/no-werror.patch
@@ -1,20 +1,16 @@
-Source: Alpine Linux (adapted)
-Upstream: No
-Reason: Fixes compilation on i686
-
 --- a/Make.defaults
 +++ b/Make.defaults
-@@ -156,11 +156,11 @@ ifneq (mingw32,$(findstring mingw32, $(GCCMACHINE)))
+@@ -183,11 +183,11 @@ ifneq (mingw32,$(findstring mingw32, $(GCCMACHINE)))
  endif
  
  ifeq (FreeBSD, $(findstring FreeBSD, $(OS)))
 -CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
 +CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra \
-            -fshort-wchar -fno-strict-aliasing \
+            -funsigned-char -fshort-wchar -fno-strict-aliasing \
             -ffreestanding -fno-stack-protector
  else
--CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
-+CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra \
-            -fshort-wchar -fno-strict-aliasing \
-            -fno-merge-all-constants -ffreestanding -fno-stack-protector \
-            -fno-stack-check
+-CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign -Werror \
++CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign \
+            -funsigned-char -fshort-wchar -fno-strict-aliasing \
+ 	   -ffreestanding -fno-stack-protector -fno-stack-check \
+            -fno-stack-check \
diff --git a/srcpkgs/gnu-efi-libs/template b/srcpkgs/gnu-efi-libs/template
index 8e5b09f2cd20c..2f088744633b6 100644
--- a/srcpkgs/gnu-efi-libs/template
+++ b/srcpkgs/gnu-efi-libs/template
@@ -1,7 +1,7 @@
 # Template file for 'gnu-efi-libs'
 pkgname=gnu-efi-libs
 reverts="3.0w_1" # Not an actual revert, xbps considers 3.0w higher than 3.0.8
-version=3.0.14
+version=3.0.17
 revision=1
 makedepends="pciutils-devel"
 short_desc="Library for building UEFI Applications using GNU toolchain"
@@ -9,7 +9,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://sourceforge.net/projects/gnu-efi/"
 distfiles="${SOURCEFORGE_SITE}/gnu-efi/gnu-efi-${version}.tar.bz2"
-checksum=b73b643a0d5697d1f396d7431448e886dd805668789578e3e1a28277c9528435
+checksum=7807e903349343a7a142ebb934703a2872235e89688cf586c032b0a1087bcaf4
 nostrip=yes
 
 # If we are cross-building we need to pass the cross-compilation triplet
@@ -41,6 +41,9 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 
 do_build() {
+	# upstream provides LDFLAGS directly to ld: https://sourceforge.net/p/gnu-efi/bugs/33/
+	LDFLAGS="${LDFLAGS//-Wl/}"
+	LDFLAGS="${LDFLAGS//,/ }"
 	make ARCH=${TARGET_ARCH} HOSTARCH=${HOST_ARCH}
 }
 

From e483d370c9e6ffa522157db2e2006ecb86c68e5f Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Thu, 15 Feb 2024 15:21:14 +0100
Subject: [PATCH 2/2] fwupd-efi: update to 1.4.

---
 srcpkgs/fwupd-efi/patches/cc-as-ld.patch | 78 ++++++++++++++++++++++++
 srcpkgs/fwupd-efi/template               | 12 ++--
 2 files changed, 82 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/fwupd-efi/patches/cc-as-ld.patch

diff --git a/srcpkgs/fwupd-efi/patches/cc-as-ld.patch b/srcpkgs/fwupd-efi/patches/cc-as-ld.patch
new file mode 100644
index 0000000000000..67092dd0fb679
--- /dev/null
+++ b/srcpkgs/fwupd-efi/patches/cc-as-ld.patch
@@ -0,0 +1,78 @@
+--- a/meson.build
++++ b/meson.build
+@@ -9,7 +9,6 @@
+ conf.set_quoted('PACKAGE_VERSION', meson.project_version())
+ 
+ cc = meson.get_compiler('c')
+-ld = cc.get_linker_id()
+ objcopy = find_program('objcopy')
+ objcopy_version = run_command(objcopy, '--version').stdout().split('\n')[0].split(' ')[-1]
+ 
+--- a/efi/generate_binary.py
++++ b/efi/generate_binary.py
+@@ -29,9 +29,9 @@
+         "-j",
+         ".rodata",
+         "-j",
++        ".areloc",
++        "-j",
+         ".rel*",
+-        "--section-alignment",
+-        "512",
+         args.infile,
+         args.outfile,
+     ]
+--- a/efi/meson.build
++++ b/efi/meson.build
+@@ -72,6 +72,11 @@
+         coff_header_in_crt0 = false
+ endif
+ 
++# For NX compat, we must ensure we have .note.GNU-stack
++if run_command('grep', '-q', '.note.GNU-stack', join_paths(efi_crtdir, arch_crt), check: false).returncode() != 0
++    error('Cannot find NX section in @0@, update to gnu-efi 3.0.15+'.format(join_paths(efi_crtdir, arch_crt)))
++endif
++
+ # older objcopy for Aarch64 and ARM32 are not EFI capable.
+ # Use 'binary' instead, and add required symbols manually.
+ if host_cpu == 'arm' or (host_cpu == 'aarch64' and (objcopy_version.version_compare ('< 2.38') or coff_header_in_crt0))
+@@ -95,7 +100,6 @@
+ # is the system crt0 for arm and aarch64 new enough to know about SBAT?
+ if objcopy_manualsymbols
+   if get_option('efi_sbat_distro_id') != ''
+-    arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
+     cmd = run_command('grep', '-q', 'sbat', join_paths(efi_crtdir, arch_crt))
+     if cmd.returncode() != 0
+       warning('Cannot find SBAT section in @0@, using local copy'.format(join_paths(efi_crtdir, arch_crt)))
+@@ -163,6 +167,12 @@
+                '-L', efi_libdir,
+                join_paths(efi_crtdir, arch_crt)]
+ 
++if host_cpu == 'aarch64'
++# Don't use 64KiB pages
++  efi_ldflags += ['-z', 'common-page-size=4096']
++  efi_ldflags += ['-z', 'max-page-size=4096']
++endif
++
+ if objcopy_manualsymbols
+   # older objcopy for Aarch64 and ARM32 are not EFI capable.
+   # Use 'binary' instead, and add required symbols manually.
+@@ -223,11 +233,16 @@
+   fwupd_so_deps += [o_crt0]
+ endif
+ 
++efi_cc_ldflags = []
++foreach flag : efi_ldflags
++  efi_cc_ldflags += ['-Wl,' + flag]
++endforeach
++
+ so = custom_target('fwup.so',
+                    input : [o_file1, o_file2, o_file3, o_file4, o_file5],
+                    output : 'fwup.so',
+-                   command : [ld, '-o', '@OUTPUT@'] +
+-                             efi_ldflags + ['@INPUT@'] +
++                   command : [cc.cmd_array(), '-nostdlib', '-o', '@OUTPUT@'] +
++                             efi_cc_ldflags + ['@INPUT@'] +
+                              ['-lefi', '-lgnuefi', libgcc_file_name],
+                    depends: fwupd_so_deps)
+ 
diff --git a/srcpkgs/fwupd-efi/template b/srcpkgs/fwupd-efi/template
index 78a543fec1dd7..a1897e8f450d4 100644
--- a/srcpkgs/fwupd-efi/template
+++ b/srcpkgs/fwupd-efi/template
@@ -1,22 +1,18 @@
 # Template file for 'fwupd-efi'
 pkgname=fwupd-efi
-version=1.3
+version=1.4
 revision=1
 archs="x86_64* i686* arm* aarch64*"
 build_style=meson
 build_helper="gir"
 configure_args="-Defi-includedir=${XBPS_CROSS_BASE}/usr/include/efi
- -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib -Defi-ld=${XBPS_CROSS_BASE}/bin/ld
+ -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib
  -Defi-libdir=${XBPS_CROSS_BASE}/usr/lib"
 hostmakedepends="efivar"
-makedepends="libefivar-devel gnu-efi-libs"
+makedepends="libefivar-devel gnu-efi-libs python3-pefile"
 short_desc="EFI Application used by uefi-capsule plugin in fwupd"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/fwupd/fwupd-efi"
 distfiles="https://github.com/fwupd/fwupd-efi/archive/refs/tags/${version}.tar.gz"
-checksum=0e76057c178e221f63eaf9142fa1d06780a8eb3df7cf0c11f92660138dec5c83
-
-if [ "$CROSS_BUILD" ]; then
-	configure_args+=" -Defi-cc=/usr/bin/${XBPS_CROSS_TRIPLET}-gcc"
-fi
+checksum=b1f5fe72e16d4e2f4c616da416dc93bd79331057336208465da37bafe8f8f83d

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

* Re: [PR PATCH] [Updated] fwupd-efi: update to 1.4.
  2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
                   ` (7 preceding siblings ...)
  2024-02-15 14:21 ` [PR PATCH] [Updated] " dataCobra
@ 2024-02-15 14:23 ` dataCobra
  2024-02-16  7:45 ` dataCobra
  2024-02-16 13:15 ` [PR PATCH] [Merged]: " leahneukirchen
  10 siblings, 0 replies; 12+ messages in thread
From: dataCobra @ 2024-02-15 14:23 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by dataCobra against master on the void-packages repository

https://github.com/dataCobra/void-packages fwupd-efi
https://github.com/void-linux/void-packages/pull/47264

fwupd-efi: update to 1.4.
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - i686



A patch file from https://github.com/void-linux/void-packages/pull/47264.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-fwupd-efi-47264.patch --]
[-- Type: text/x-diff, Size: 7781 bytes --]

From bb25ae1a3e573867628cae9c97fa7b4dad4ef3cf Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Thu, 15 Feb 2024 15:16:13 +0100
Subject: [PATCH 1/2] gnu-efi-libs: update to 3.0.17.

---
 srcpkgs/gnu-efi-libs/patches/no-werror.patch | 18 +++++++-----------
 srcpkgs/gnu-efi-libs/template                |  7 +++++--
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/srcpkgs/gnu-efi-libs/patches/no-werror.patch b/srcpkgs/gnu-efi-libs/patches/no-werror.patch
index f6cc95bdccffa4..8d91760ded5bb2 100644
--- a/srcpkgs/gnu-efi-libs/patches/no-werror.patch
+++ b/srcpkgs/gnu-efi-libs/patches/no-werror.patch
@@ -1,20 +1,16 @@
-Source: Alpine Linux (adapted)
-Upstream: No
-Reason: Fixes compilation on i686
-
 --- a/Make.defaults
 +++ b/Make.defaults
-@@ -156,11 +156,11 @@ ifneq (mingw32,$(findstring mingw32, $(GCCMACHINE)))
+@@ -183,11 +183,11 @@ ifneq (mingw32,$(findstring mingw32, $(GCCMACHINE)))
  endif
  
  ifeq (FreeBSD, $(findstring FreeBSD, $(OS)))
 -CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
 +CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra \
-            -fshort-wchar -fno-strict-aliasing \
+            -funsigned-char -fshort-wchar -fno-strict-aliasing \
             -ffreestanding -fno-stack-protector
  else
--CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
-+CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra \
-            -fshort-wchar -fno-strict-aliasing \
-            -fno-merge-all-constants -ffreestanding -fno-stack-protector \
-            -fno-stack-check
+-CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign -Werror \
++CFLAGS  += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign \
+            -funsigned-char -fshort-wchar -fno-strict-aliasing \
+ 	   -ffreestanding -fno-stack-protector -fno-stack-check \
+            -fno-stack-check \
diff --git a/srcpkgs/gnu-efi-libs/template b/srcpkgs/gnu-efi-libs/template
index 8e5b09f2cd20cb..2f088744633b68 100644
--- a/srcpkgs/gnu-efi-libs/template
+++ b/srcpkgs/gnu-efi-libs/template
@@ -1,7 +1,7 @@
 # Template file for 'gnu-efi-libs'
 pkgname=gnu-efi-libs
 reverts="3.0w_1" # Not an actual revert, xbps considers 3.0w higher than 3.0.8
-version=3.0.14
+version=3.0.17
 revision=1
 makedepends="pciutils-devel"
 short_desc="Library for building UEFI Applications using GNU toolchain"
@@ -9,7 +9,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="https://sourceforge.net/projects/gnu-efi/"
 distfiles="${SOURCEFORGE_SITE}/gnu-efi/gnu-efi-${version}.tar.bz2"
-checksum=b73b643a0d5697d1f396d7431448e886dd805668789578e3e1a28277c9528435
+checksum=7807e903349343a7a142ebb934703a2872235e89688cf586c032b0a1087bcaf4
 nostrip=yes
 
 # If we are cross-building we need to pass the cross-compilation triplet
@@ -41,6 +41,9 @@ case "$XBPS_TARGET_MACHINE" in
 esac
 
 do_build() {
+	# upstream provides LDFLAGS directly to ld: https://sourceforge.net/p/gnu-efi/bugs/33/
+	LDFLAGS="${LDFLAGS//-Wl/}"
+	LDFLAGS="${LDFLAGS//,/ }"
 	make ARCH=${TARGET_ARCH} HOSTARCH=${HOST_ARCH}
 }
 

From 7bc468faa0f4f71a66bc4889e27eed1034388e64 Mon Sep 17 00:00:00 2001
From: dataCobra <datacobra@thinkbot.de>
Date: Thu, 15 Feb 2024 15:23:41 +0100
Subject: [PATCH 2/2] fwupd-efi: update to 1.4.

---
 srcpkgs/fwupd-efi/patches/cc-as-ld.patch | 78 ++++++++++++++++++++++++
 srcpkgs/fwupd-efi/template               | 12 ++--
 2 files changed, 82 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/fwupd-efi/patches/cc-as-ld.patch

diff --git a/srcpkgs/fwupd-efi/patches/cc-as-ld.patch b/srcpkgs/fwupd-efi/patches/cc-as-ld.patch
new file mode 100644
index 00000000000000..67092dd0fb6792
--- /dev/null
+++ b/srcpkgs/fwupd-efi/patches/cc-as-ld.patch
@@ -0,0 +1,78 @@
+--- a/meson.build
++++ b/meson.build
+@@ -9,7 +9,6 @@
+ conf.set_quoted('PACKAGE_VERSION', meson.project_version())
+ 
+ cc = meson.get_compiler('c')
+-ld = cc.get_linker_id()
+ objcopy = find_program('objcopy')
+ objcopy_version = run_command(objcopy, '--version').stdout().split('\n')[0].split(' ')[-1]
+ 
+--- a/efi/generate_binary.py
++++ b/efi/generate_binary.py
+@@ -29,9 +29,9 @@
+         "-j",
+         ".rodata",
+         "-j",
++        ".areloc",
++        "-j",
+         ".rel*",
+-        "--section-alignment",
+-        "512",
+         args.infile,
+         args.outfile,
+     ]
+--- a/efi/meson.build
++++ b/efi/meson.build
+@@ -72,6 +72,11 @@
+         coff_header_in_crt0 = false
+ endif
+ 
++# For NX compat, we must ensure we have .note.GNU-stack
++if run_command('grep', '-q', '.note.GNU-stack', join_paths(efi_crtdir, arch_crt), check: false).returncode() != 0
++    error('Cannot find NX section in @0@, update to gnu-efi 3.0.15+'.format(join_paths(efi_crtdir, arch_crt)))
++endif
++
+ # older objcopy for Aarch64 and ARM32 are not EFI capable.
+ # Use 'binary' instead, and add required symbols manually.
+ if host_cpu == 'arm' or (host_cpu == 'aarch64' and (objcopy_version.version_compare ('< 2.38') or coff_header_in_crt0))
+@@ -95,7 +100,6 @@
+ # is the system crt0 for arm and aarch64 new enough to know about SBAT?
+ if objcopy_manualsymbols
+   if get_option('efi_sbat_distro_id') != ''
+-    arch_crt_source = 'crt0-efi-@0@.S'.format(gnu_efi_path_arch)
+     cmd = run_command('grep', '-q', 'sbat', join_paths(efi_crtdir, arch_crt))
+     if cmd.returncode() != 0
+       warning('Cannot find SBAT section in @0@, using local copy'.format(join_paths(efi_crtdir, arch_crt)))
+@@ -163,6 +167,12 @@
+                '-L', efi_libdir,
+                join_paths(efi_crtdir, arch_crt)]
+ 
++if host_cpu == 'aarch64'
++# Don't use 64KiB pages
++  efi_ldflags += ['-z', 'common-page-size=4096']
++  efi_ldflags += ['-z', 'max-page-size=4096']
++endif
++
+ if objcopy_manualsymbols
+   # older objcopy for Aarch64 and ARM32 are not EFI capable.
+   # Use 'binary' instead, and add required symbols manually.
+@@ -223,11 +233,16 @@
+   fwupd_so_deps += [o_crt0]
+ endif
+ 
++efi_cc_ldflags = []
++foreach flag : efi_ldflags
++  efi_cc_ldflags += ['-Wl,' + flag]
++endforeach
++
+ so = custom_target('fwup.so',
+                    input : [o_file1, o_file2, o_file3, o_file4, o_file5],
+                    output : 'fwup.so',
+-                   command : [ld, '-o', '@OUTPUT@'] +
+-                             efi_ldflags + ['@INPUT@'] +
++                   command : [cc.cmd_array(), '-nostdlib', '-o', '@OUTPUT@'] +
++                             efi_cc_ldflags + ['@INPUT@'] +
+                              ['-lefi', '-lgnuefi', libgcc_file_name],
+                    depends: fwupd_so_deps)
+ 
diff --git a/srcpkgs/fwupd-efi/template b/srcpkgs/fwupd-efi/template
index 78a543fec1dd7d..2d811f6165f51f 100644
--- a/srcpkgs/fwupd-efi/template
+++ b/srcpkgs/fwupd-efi/template
@@ -1,22 +1,18 @@
 # Template file for 'fwupd-efi'
 pkgname=fwupd-efi
-version=1.3
+version=1.4
 revision=1
 archs="x86_64* i686* arm* aarch64*"
 build_style=meson
 build_helper="gir"
 configure_args="-Defi-includedir=${XBPS_CROSS_BASE}/usr/include/efi
- -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib -Defi-ld=${XBPS_CROSS_BASE}/bin/ld
+ -Defi-ldsdir=${XBPS_CROSS_BASE}/usr/lib
  -Defi-libdir=${XBPS_CROSS_BASE}/usr/lib"
-hostmakedepends="efivar"
+hostmakedepends="efivar python3-pefile"
 makedepends="libefivar-devel gnu-efi-libs"
 short_desc="EFI Application used by uefi-capsule plugin in fwupd"
 maintainer="dkwo <nicolopiazzalunga@gmail.com>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/fwupd/fwupd-efi"
 distfiles="https://github.com/fwupd/fwupd-efi/archive/refs/tags/${version}.tar.gz"
-checksum=0e76057c178e221f63eaf9142fa1d06780a8eb3df7cf0c11f92660138dec5c83
-
-if [ "$CROSS_BUILD" ]; then
-	configure_args+=" -Defi-cc=/usr/bin/${XBPS_CROSS_TRIPLET}-gcc"
-fi
+checksum=b1f5fe72e16d4e2f4c616da416dc93bd79331057336208465da37bafe8f8f83d

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

* Re: fwupd-efi: update to 1.4.
  2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
                   ` (8 preceding siblings ...)
  2024-02-15 14:23 ` dataCobra
@ 2024-02-16  7:45 ` dataCobra
  2024-02-16 13:15 ` [PR PATCH] [Merged]: " leahneukirchen
  10 siblings, 0 replies; 12+ messages in thread
From: dataCobra @ 2024-02-16  7:45 UTC (permalink / raw)
  To: ml

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

New comment by dataCobra on void-packages repository

https://github.com/void-linux/void-packages/pull/47264#issuecomment-1947898615

Comment:
I was finally able to test that this update works as expected.

Also upstream merged the patch.

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

* Re: [PR PATCH] [Merged]: fwupd-efi: update to 1.4.
  2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
                   ` (9 preceding siblings ...)
  2024-02-16  7:45 ` dataCobra
@ 2024-02-16 13:15 ` leahneukirchen
  10 siblings, 0 replies; 12+ messages in thread
From: leahneukirchen @ 2024-02-16 13:15 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

fwupd-efi: update to 1.4.
https://github.com/void-linux/void-packages/pull/47264

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - i686



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

end of thread, other threads:[~2024-02-16 13:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-16  9:55 [PR PATCH] fwupd-efi: update to 1.4 dataCobra
2023-11-16  9:59 ` [PR PATCH] [Updated] " dataCobra
2023-11-16 10:40 ` dataCobra
2024-01-26  9:57 ` dataCobra
2024-01-26 10:00 ` dataCobra
2024-02-01 13:52 ` [PR PATCH] [Updated] " dataCobra
2024-02-09  7:13 ` dataCobra
2024-02-15 13:11 ` leahneukirchen
2024-02-15 14:21 ` [PR PATCH] [Updated] " dataCobra
2024-02-15 14:23 ` dataCobra
2024-02-16  7:45 ` dataCobra
2024-02-16 13:15 ` [PR PATCH] [Merged]: " leahneukirchen

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 NNTP newsgroup(s).