summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/systemd/systemd-boot_244.3.bb (renamed from meta/recipes-core/systemd/systemd-boot_244.1.bb)26
-rw-r--r--meta/recipes-core/systemd/systemd-conf_244.3.bb (renamed from meta/recipes-core/systemd/systemd-conf_244.1.bb)0
-rw-r--r--meta/recipes-core/systemd/systemd.inc2
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch62
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch33
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch77
-rw-r--r--meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch48
-rw-r--r--meta/recipes-core/systemd/systemd_244.3.bb (renamed from meta/recipes-core/systemd/systemd_244.1.bb)0
8 files changed, 14 insertions, 234 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_244.1.bb b/meta/recipes-core/systemd/systemd-boot_244.3.bb
index 515abc289b..f92c639810 100644
--- a/meta/recipes-core/systemd/systemd-boot_244.1.bb
+++ b/meta/recipes-core/systemd/systemd-boot_244.3.bb
@@ -5,27 +5,27 @@ require conf/image-uefi.conf
DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
-# NOTE: These three patches are in theory not needed, but we haven't
-# figured out how to correctly pass efi-cc parameter if it's an array.
-SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \
- file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \
- file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
- file://0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch \
- "
-
inherit meson pkgconfig gettext
inherit deploy
-EFI_CC ?= "${CC}"
+LDFLAGS_prepend = "${@ " ".join(d.getVar('LD').split()[1:])} "
+
+do_write_config[vardeps] += "CC OBJCOPY"
+do_write_config_append() {
+ cat >${WORKDIR}/meson-${PN}.cross <<EOF
+[binaries]
+efi_cc = ${@meson_array('CC', d)}
+objcopy = ${@meson_array('OBJCOPY', d)}
+EOF
+}
+
EXTRA_OEMESON += "-Defi=true \
-Dgnu-efi=true \
-Defi-includedir=${STAGING_INCDIR}/efi \
- -Defi-ldsdir=${STAGING_LIBDIR} \
-Defi-libdir=${STAGING_LIBDIR} \
+ -Defi-ld=${@ d.getVar('LD').split()[0]} \
-Dman=false \
- -Defi-cc='${EFI_CC}' \
- -Defi-ld='${LD}' \
- -Defi-objcopy='${OBJCOPY}' \
+ --cross-file ${WORKDIR}/meson-${PN}.cross \
"
# install to the image as boot*.efi if its the EFI_PROVIDER,
diff --git a/meta/recipes-core/systemd/systemd-conf_244.1.bb b/meta/recipes-core/systemd/systemd-conf_244.3.bb
index d9ec023bfd..d9ec023bfd 100644
--- a/meta/recipes-core/systemd/systemd-conf_244.1.bb
+++ b/meta/recipes-core/systemd/systemd-conf_244.3.bb
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc
index 8c05a96ecc..e73b397b5d 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1"
LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
-SRCREV = "639dc9f4bfd2c09535bee079ae9bc7006b520a66"
+SRCREV = "b7ed902b2394f94e7f1fbe6c3194b5cd9a9429e6"
SRCBRANCH = "v244-stable"
SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
diff --git a/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch b/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
deleted file mode 100644
index e2e19ba068..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 527413ec243564a89ffaad6368d446de44415970 Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Tue, 27 Feb 2018 21:42:23 -0800
-Subject: [PATCH] Fix to run efi_cc and efi_ld correctly when cross-compiling
-
-When cross-compiling, efi_cc and efi_ld may take the form of
-'xxx-gcc --sysroot=xxx', and this would cause run_command and
-the alike fail.
-
-Fix to split them to make commands run correctly.
-
-Upstream-Status: Pending
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/boot/efi/meson.build | 16 +++++++++++++---
- 1 file changed, 13 insertions(+), 3 deletions(-)
-
-diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
-index 992a3ba4c..9f9ec4911 100644
---- a/src/boot/efi/meson.build
-+++ b/src/boot/efi/meson.build
-@@ -157,7 +157,7 @@ if have_gnu_efi
- o_file = custom_target(file + '.o',
- input : file,
- output : file + '.o',
-- command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
-+ command : efi_cc.split() + ['-c', '@INPUT@', '-o', '@OUTPUT@']
- + compile_args,
- depend_files : efi_headers)
- if (common_sources + systemd_boot_sources).contains(file)
-@@ -168,7 +168,17 @@ if have_gnu_efi
- endif
- endforeach
-
-- libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
-+ find_libgcc_cmd_all = efi_cc + ' -print-libgcc-file-name'
-+ find_libgcc_cmd = find_libgcc_cmd_all.split()[0]
-+ find_libgcc_args = []
-+ cmd_args_all = find_libgcc_cmd_all.split()
-+ foreach arg : cmd_args_all
-+ if arg != find_libgcc_cmd
-+ find_libgcc_args += arg
-+ endif
-+ endforeach
-+
-+ libgcc_file_name = run_command(find_libgcc_cmd, find_libgcc_args).stdout().strip()
- systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
- stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
- no_undefined_symbols = find_program('no-undefined-symbols.sh')
-@@ -179,7 +189,7 @@ if have_gnu_efi
- tuple[0],
- input : tuple[2],
- output : tuple[0],
-- command : [efi_ld, '-o', '@OUTPUT@'] +
-+ command : efi_ld.split() + ['-o', '@OUTPUT@'] +
- efi_ldflags + tuple[2] +
- ['-lefi', '-lgnuefi', libgcc_file_name])
-
---
-2.13.0
-
diff --git a/meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch b/meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
deleted file mode 100644
index ed14e25bce..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 0bf530aac152630500939db31f98d933158fdabd Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Tue, 26 Feb 2019 14:27:49 +0800
-Subject: [PATCH] Revert "meson: print EFI CC configuration nicely"
-
-This reverts commit c512dfb9ac948ddb1ced0dab07b9dac88b198293.
-
-This patch is here because we haven't figured out how to pass
-parameter to efi-cc if it's an array in systemd-boot recipe.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- meson.build | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/meson.build b/meson.build
-index 70fb218..30df834 100644
---- a/meson.build
-+++ b/meson.build
-@@ -3138,7 +3138,7 @@ if conf.get('ENABLE_EFI') == 1
- if have_gnu_efi
- status += [
- 'EFI machine type: @0@'.format(EFI_MACHINE_TYPE_NAME),
-- 'EFI CC @0@'.format(' '.join(efi_cc)),
-+ 'EFI CC @0@'.format(efi_cc),
- 'EFI lib directory: @0@'.format(efi_libdir),
- 'EFI lds directory: @0@'.format(efi_ldsdir),
- 'EFI include directory: @0@'.format(efi_incdir)]
---
-2.7.4
-
diff --git a/meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch b/meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
deleted file mode 100644
index 0d2ebf62bd..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 0030dcbac1a9177ef7a28af209ac67149b899f5f Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Tue, 26 Feb 2019 14:17:25 +0800
-Subject: [PATCH] Revert "meson: use an array option for efi-cc"
-
-This reverts commit 595343fb4c99c2679d347ef7c19debfbfed6342e.
-
-This patch is here because we haven't figured out how to pass
-parameter to efi-cc if it's an array in systemd-boot recipe.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- meson_options.txt | 2 +-
- src/boot/efi/meson.build | 11 ++++++-----
- 2 files changed, 7 insertions(+), 6 deletions(-)
-
-diff --git a/meson_options.txt b/meson_options.txt
-index 044bb79..3d28bfd 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -292,7 +292,7 @@ option('dbus', type : 'combo', choices : ['auto', 'true', 'false'],
-
- option('gnu-efi', type : 'combo', choices : ['auto', 'true', 'false'],
- description : 'gnu-efi support for sd-boot')
--option('efi-cc', type : 'array',
-+option('efi-cc', type : 'string',
- description : 'the compiler to use for EFI modules')
- option('efi-ld', type : 'string',
- description : 'the linker to use for EFI modules')
-diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
-index 2140151..d8db3a1 100644
---- a/src/boot/efi/meson.build
-+++ b/src/boot/efi/meson.build
-@@ -34,8 +34,8 @@ stub_sources = '''
-
- if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false'
- efi_cc = get_option('efi-cc')
-- if efi_cc.length() == 0
-- efi_cc = cc.cmd_array()
-+ if efi_cc == ''
-+ efi_cc = ' '.join(cc.cmd_array())
- endif
- efi_ld = get_option('efi-ld')
- if efi_ld == ''
-@@ -57,7 +57,8 @@ if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false'
-
- efi_libdir = get_option('efi-libdir')
- if efi_libdir == ''
-- ret = run_command(efi_cc + ['-print-multi-os-directory'])
-+ cmd = 'cd /usr/lib/$(@0@ -print-multi-os-directory) && pwd'.format(efi_cc)
-+ ret = run_command('sh', '-c', cmd)
- if ret.returncode() == 0
- path = join_paths('/usr/lib', ret.stdout().strip())
- ret = run_command('realpath', '-e', path)
-@@ -152,7 +153,7 @@ if have_gnu_efi
- o_file = custom_target(file + '.o',
- input : file,
- output : file + '.o',
-- command : efi_cc + ['-c', '@INPUT@', '-o', '@OUTPUT@']
-+ command : [efi_cc, '-c', '@INPUT@', '-o', '@OUTPUT@']
- + compile_args,
- depend_files : efi_headers)
- if (common_sources + systemd_boot_sources).contains(file)
-@@ -163,7 +164,7 @@ if have_gnu_efi
- endif
- endforeach
-
-- libgcc_file_name = run_command(efi_cc + ['-print-libgcc-file-name']).stdout().strip()
-+ libgcc_file_name = run_command(efi_cc, '-print-libgcc-file-name').stdout().strip()
- systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME)
- stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME)
- no_undefined_symbols = find_program('no-undefined-symbols.sh')
---
-2.7.4
-
diff --git a/meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch b/meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
deleted file mode 100644
index 7d764b4115..0000000000
--- a/meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 3f37ad5e083dcad51c21c1050b2829b70d240b52 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 6 Aug 2019 03:10:20 +0000
-Subject: [PATCH] meson: Add -Defi-objcopy option to specify objcopy
-
-This helps in cross compiling for x86 target on a aarch64 host e.g.
-Fixes
-TOPDIR/build/tmp/hosttools/objcopy:src/boot/efi/systemd_boot.so: Invalid bfd target
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- meson_options.txt | 2 ++
- src/boot/efi/meson.build | 5 ++++-
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/meson_options.txt b/meson_options.txt
-index d4ec37dda2..dc1c96e112 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -296,6 +296,8 @@ option('efi-cc', type : 'array',
- description : 'the compiler to use for EFI modules')
- option('efi-ld', type : 'string',
- description : 'the linker to use for EFI modules')
-+option('efi-objcopy', type : 'string',
-+ description : 'the objcopy to use for EFI')
- option('efi-libdir', type : 'string',
- description : 'path to the EFI lib directory')
- option('efi-ldsdir', type : 'string',
-diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
-index 0ae3191635..5a7137bc84 100644
---- a/src/boot/efi/meson.build
-+++ b/src/boot/efi/meson.build
-@@ -88,7 +88,10 @@ if have_gnu_efi
- output : 'efi_config.h',
- configuration : efi_conf)
-
-- objcopy = find_program('objcopy')
-+ objcopy = get_option('efi-objcopy')
-+ if objcopy == ''
-+ objcopy = find_program('objcopy', required: true)
-+ endif
-
- efi_ldsdir = get_option('efi-ldsdir')
- arch_lds = 'elf_@0@_efi.lds'.format(gnu_efi_path_arch)
---
-2.17.1
-
diff --git a/meta/recipes-core/systemd/systemd_244.1.bb b/meta/recipes-core/systemd/systemd_244.3.bb
index b686519482..b686519482 100644
--- a/meta/recipes-core/systemd/systemd_244.1.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb