diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/systemd/systemd-boot_242.bb | 2 | ||||
-rw-r--r-- | meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch | 48 |
2 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd-boot_242.bb b/meta/recipes-core/systemd/systemd-boot_242.bb index 56e68a3d49..56a25c35ba 100644 --- a/meta/recipes-core/systemd/systemd-boot_242.bb +++ b/meta/recipes-core/systemd/systemd-boot_242.bb | |||
@@ -8,6 +8,7 @@ DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native" | |||
8 | SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \ | 8 | SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \ |
9 | file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \ | 9 | file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \ |
10 | file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \ | 10 | file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \ |
11 | file://0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch \ | ||
11 | " | 12 | " |
12 | 13 | ||
13 | inherit meson pkgconfig gettext | 14 | inherit meson pkgconfig gettext |
@@ -22,6 +23,7 @@ EXTRA_OEMESON += "-Defi=true \ | |||
22 | -Dman=false \ | 23 | -Dman=false \ |
23 | -Defi-cc='${EFI_CC}' \ | 24 | -Defi-cc='${EFI_CC}' \ |
24 | -Defi-ld='${LD}' \ | 25 | -Defi-ld='${LD}' \ |
26 | -Defi-objcopy='${OBJCOPY}' \ | ||
25 | " | 27 | " |
26 | 28 | ||
27 | # install to the image as boot*.efi if its the EFI_PROVIDER, | 29 | # install to the image as boot*.efi if its the EFI_PROVIDER, |
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 new file mode 100644 index 0000000000..7d764b4115 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch | |||
@@ -0,0 +1,48 @@ | |||
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 | |||