[oe-commits] [openembedded-core] 05/15: systemd-boot: Add option to specify cross objcopy and use it

git at git.openembedded.org git at git.openembedded.org
Wed Aug 7 15:10:36 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 5096f535561d2fd608d622abec5bc2ddb79d49b7
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Mon Aug 5 23:45:47 2019 -0700

    systemd-boot: Add option to specify cross objcopy and use it
    
    This is needed when build host != x86 box
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-core/systemd/systemd-boot_242.bb      |  2 +
 ...dd-Defi-objcopy-option-to-specify-objcopy.patch | 48 ++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd-boot_242.bb b/meta/recipes-core/systemd/systemd-boot_242.bb
index 56e68a3..56a25c3 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"
 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
@@ -22,6 +23,7 @@ EXTRA_OEMESON += "-Defi=true \
                   -Dman=false \
                   -Defi-cc='${EFI_CC}' \
                   -Defi-ld='${LD}' \
+                  -Defi-objcopy='${OBJCOPY}' \
                   "
 
 # 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 0000000..7d764b4
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
@@ -0,0 +1,48 @@
+From 3f37ad5e083dcad51c21c1050b2829b70d240b52 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at 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 at 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_ at 0@_efi.lds'.format(gnu_efi_path_arch)
+-- 
+2.17.1
+

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list