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