summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-bsp/fwupd/fwupd-efi/0001-efi-generate_binary.py-Use-env-to-detect-python3.patch23
-rw-r--r--meta-oe/recipes-bsp/fwupd/fwupd-efi/cc.patch53
-rw-r--r--meta-oe/recipes-bsp/fwupd/fwupd-efi_1.6.bb (renamed from meta-oe/recipes-bsp/fwupd/fwupd-efi_1.3.bb)18
3 files changed, 35 insertions, 59 deletions
diff --git a/meta-oe/recipes-bsp/fwupd/fwupd-efi/0001-efi-generate_binary.py-Use-env-to-detect-python3.patch b/meta-oe/recipes-bsp/fwupd/fwupd-efi/0001-efi-generate_binary.py-Use-env-to-detect-python3.patch
new file mode 100644
index 0000000000..c362681421
--- /dev/null
+++ b/meta-oe/recipes-bsp/fwupd/fwupd-efi/0001-efi-generate_binary.py-Use-env-to-detect-python3.patch
@@ -0,0 +1,23 @@
1From 4c8f95fedecbc590eb7cd98aaf97912fa36b8f2e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 7 Jun 2024 23:58:36 -0700
4Subject: [PATCH] efi/generate_binary.py: Use env to detect python3
5
6This enables python3 from native sysroot correctly
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 efi/generate_binary.py | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/efi/generate_binary.py b/efi/generate_binary.py
15index 443472a..a4611bb 100755
16--- a/efi/generate_binary.py
17+++ b/efi/generate_binary.py
18@@ -1,4 +1,4 @@
19-#!/usr/bin/python3
20+#!/usr/bin/env python3
21 #
22 # Copyright (C) 2021 Javier Martinez Canillas <javierm@redhat.com>
23 # Copyright (C) 2021 Richard Hughes <richard@hughsie.com>
diff --git a/meta-oe/recipes-bsp/fwupd/fwupd-efi/cc.patch b/meta-oe/recipes-bsp/fwupd/fwupd-efi/cc.patch
deleted file mode 100644
index 6fd2eca941..0000000000
--- a/meta-oe/recipes-bsp/fwupd/fwupd-efi/cc.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1Change the efi-cc argument to take an array, so that we can pass compiler flags
2such as --sysroot.
3
4In the long term changing the fwupd-efi build to use the standard Meson
5CC/LD/etc would be the preferred fix.
6
7Upstream-Status: Inappropriate [better fix in progress]
8Signed-off-by: Ross Burton <ross.burton@arm.com>
9
10diff --git a/efi/generate_sbat.py b/efi/generate_sbat.py
11index e42b365..4831a48 100755
12--- a/efi/generate_sbat.py
13+++ b/efi/generate_sbat.py
14@@ -7,6 +7,7 @@
15 #
16 # pylint: disable=missing-docstring, invalid-name
17
18+import shlex
19 import subprocess
20 import sys
21 import argparse
22@@ -19,7 +20,7 @@ def _generate_sbat(args):
23 FWUPD_URL = "https://github.com/fwupd/fwupd-efi"
24
25 subprocess.run(
26- [args.cc, "-x", "c", "-c", "-o", args.outfile, "/dev/null"], check=True
27+ shlex.split(args.cc) + ["-x", "c", "-c", "-o", args.outfile, "/dev/null"], check=True
28 )
29
30 # not specified
31diff --git a/efi/meson.build b/efi/meson.build
32index 68ea4aa..dcf0d43 100644
33--- a/efi/meson.build
34+++ b/efi/meson.build
35@@ -187,7 +187,7 @@ o_file5 = custom_target('fwup-sbat.o',
36 command : [
37 generate_sbat,
38 '@OUTPUT@',
39- '--cc', efi_cc,
40+ '--cc', ' '.join(efi_cc),
41 '--objcopy', objcopy,
42 '--project-name', meson.project_name(),
43 '--project-version', meson.project_version(),
44diff --git a/meson_options.txt b/meson_options.txt
45index d869cd2..17ef7fb 100644
46--- a/meson_options.txt
47+++ b/meson_options.txt
48@@ -1,4 +1,4 @@
49-option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules')
50+option('efi-cc', type : 'array', value : ['gcc'], description : 'the compiler to use for EFI modules')
51 option('efi-ld', type : 'string', value : 'ld', description : 'the linker to use for EFI modules')
52 option('efi-libdir', type : 'string', description : 'path to the EFI lib directory')
53 option('efi-ldsdir', type : 'string', description : 'path to the EFI lds directory')
diff --git a/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.3.bb b/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.6.bb
index b53cabeaeb..d72f2d9c53 100644
--- a/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.3.bb
+++ b/meta-oe/recipes-bsp/fwupd/fwupd-efi_1.6.bb
@@ -3,23 +3,23 @@ LICENSE = "LGPL-2.1-or-later"
3LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" 3LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
4 4
5SRC_URI = "git://github.com/fwupd/fwupd-efi;protocol=https;branch=main \ 5SRC_URI = "git://github.com/fwupd/fwupd-efi;protocol=https;branch=main \
6 file://cc.patch" 6 file://0001-efi-generate_binary.py-Use-env-to-detect-python3.patch"
7SRCREV = "36ce593f58e391cca43fd388824496ff98d83480" 7
8SRCREV = "58a2928f778278ab1f7f8fcddbab81ba587a8962"
8S = "${WORKDIR}/git" 9S = "${WORKDIR}/git"
9 10
10DEPENDS = "gnu-efi" 11DEPENDS = "gnu-efi python3-pefile-native"
11 12
12COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux" 13COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*)-linux"
13 14
14inherit meson 15inherit meson pkgconfig python3native
15 16
16# These should be configured as needed 17# These should be configured as needed
17SBAT_DISTRO_ID ?= "${DISTRO}" 18SBAT_DISTRO_ID ?= "${DISTRO}"
18SBAT_DISTRO_SUMMARY ?= "${DISTRO_NAME}" 19SBAT_DISTRO_SUMMARY ?= "${DISTRO_NAME}"
19SBAT_DISTRO_URL ?= "" 20SBAT_DISTRO_URL ?= ""
20 21
21EXTRA_OEMESON += "-Defi-cc="${@meson_array('CC', d)}" \ 22EXTRA_OEMESON += "\
22 -Defi-ld='${HOST_PREFIX}ld' \
23 -Defi-includedir=${STAGING_INCDIR}/efi \ 23 -Defi-includedir=${STAGING_INCDIR}/efi \
24 -Defi-libdir=${STAGING_LIBDIR} \ 24 -Defi-libdir=${STAGING_LIBDIR} \
25 -Defi_sbat_distro_id='${SBAT_DISTRO_ID}' \ 25 -Defi_sbat_distro_id='${SBAT_DISTRO_ID}' \
@@ -31,3 +31,9 @@ EXTRA_OEMESON += "-Defi-cc="${@meson_array('CC', d)}" \
31 31
32# The compile assumes GCC at present 32# The compile assumes GCC at present
33TOOLCHAIN = "gcc" 33TOOLCHAIN = "gcc"
34
35# Multiple errors like below with gcc14
36#| ../git/efi/fwupdate.c:611:20: error: passing argument 5 of 'fwup_log' from incompatible pointer type [-Wincompatible-pointer-types]
37#| 611 | fwup_debug(L"n_updates: %d", n_updates);
38#| | ^~~~~~~~~~~~~~~~
39TOOLCHAIN_OPTIONS += "-Wno-error=incompatible-pointer-types"