From patchwork Tue Aug 6 06:45:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 170635 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp5276188ile; Mon, 5 Aug 2019 23:46:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEpo1/xcagnzsPAvC2BbMRHqf8t6Jh7Wu8tsw/6NbkIMZMAiFW/J3QPbttztVlFMJ8/qO+ X-Received: by 2002:a17:90a:338b:: with SMTP id n11mr1575294pjb.21.1565073979295; Mon, 05 Aug 2019 23:46:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565073979; cv=none; d=google.com; s=arc-20160816; b=XbX5Ijio1TU75xwVrX8JMvIp8Ymx0MB6kLjmbL5NPJ9DVxBl9PLCmPDPUwoEXWLhm7 AmcOv2etI4+MeNn4E/xiXJfCrRm+jTXasCvYq56JkOt3Epb4b6PXk+iQZPWsD0tDlZAX ve90CHZErXkLLFda7T3+pjtYicEjE1PL+G4VAWkuGcME3PxC7QjJLqXkrdcYHX60KXel FsyA5djmlF1g0E5TnDTfXTOvPHKYYIFtxpZQZ1RAMRAMHsWsysKDHscoYf5OefCts0Js 8v/eJPPHcE/kRwjXSHn7DCfn1ulj3xqWbwgXtZ4Rq5sVbE31ly+z54dfJiRsdZ4Zsr5W E23A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=xqleO5KvcH75QsgC6NcyDsKyC8ls9jkYUWvmUgYjhag=; b=KHaSuaTyPOlPRPZeadA4LaoCgVU47XA8ikRnSLUncNw5DdDc078+rnmZy9laGUZNie /lBy1o3x5l53A7UN4P6DrN0PlVmQ/7VU5fKTOHr1n8/ct0zeHQQjHbty0h1iK7gKCVwS XWPB6KJWPQHMLAWtM+x2rOF5m5bQBtaht2HEwZvANuJPGEHO3Um1cPLE1FLdO3xSpENN MpBZRN33A2Gk+Wmo4XxSKeyo5CqIydTMZ/plZi6DqCngH2IKFXH4iC2y9t64mipmSZ8x nYvnODKMym0wpyoTfFhd0jg+3fpySi+EFow0HMht4urtnUx98MkCeeIFunE0KS6cCKYY 1o7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=LvAX6s0q; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id v27si47118044pgn.14.2019.08.05.23.46.19; Mon, 05 Aug 2019 23:46:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=LvAX6s0q; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 036F37F366; Tue, 6 Aug 2019 06:46:13 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mail.openembedded.org (Postfix) with ESMTP id C23BE7F349 for ; Tue, 6 Aug 2019 06:46:02 +0000 (UTC) Received: by mail-pf1-f181.google.com with SMTP id r1so40940065pfq.12 for ; Mon, 05 Aug 2019 23:46:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QAD13wft68CdLW8qltHSw57qWrwX2MwvVJyqgTTWTls=; b=LvAX6s0qyaZfFJ9m489NHUVz12iENu0Ixj5NCzHHF1VrbDTKZBmaPvnW0VZ9LvZ2w6 CdlJecjJZHZpKrit06UfP8g2cHOD5fCnIMObTzR5b39PV9tYHLVk8kvxaVGaCEM8FaAL TsoXkEPaodkPA/X4n6cLLRF0OdwO5qJldLjLqpMhnTjXgRjbVuKYkKfK/NLJle13t+/g pIl5ZKz1SmBaLqEv4jeu0ovsdUo0yKMP8jKadG2YcGBVPLAtLLb0t0FtOYPbmWuFL8PB UnKYQ2UlzIjViSfAl84VzAne+WtPXiwa0AfHGNXKeTYuwLHPq5oLG99hrnfIPsHWft5V B2fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QAD13wft68CdLW8qltHSw57qWrwX2MwvVJyqgTTWTls=; b=c3ycZPgelmTz5P4tndb7/LHmmP7UnHTkYhB7TueffqQTikmhoerAcZZGr47fQZieRu /CdMUtUCicIB5NBfZTCshNI+o0tad/41PeNV+2UteuPd4R8Li+xWnbsea76oI2sY7L0E kT/LPQxdvYf0LNn86f/5HPgJLOTHOw2C0ZkCx3awk7uj1mPbNyhzTXQciMKGZUgV4cu/ OFBb9iHH12h4H0AzM6SBYbC03Q3gtMjHBhneNSxHNehzmMltH1ayzjRq2FM2/bghauBn Eihp9j4Slr32RWjmWNuf//uKOpP0ObFaZ+hRaa777bWtm+gC9/uxLeE8QyY7VdiDZp1y Qdxg== X-Gm-Message-State: APjAAAXDUX3XVyoDKWgneZm4cx7cFuB2kQYcj78s+CqwpUEEmrIvPPf4 jIW3NOrFw83BfgNkyKmpTQ2TbZ2+GfU= X-Received: by 2002:a63:c203:: with SMTP id b3mr1660905pgd.450.1565073963317; Mon, 05 Aug 2019 23:46:03 -0700 (PDT) Received: from apollo.hsd1.ca.comcast.net (c-73-71-176-3.hsd1.ca.comcast.net. [73.71.176.3]) by smtp.gmail.com with ESMTPSA id x1sm17957104pjo.4.2019.08.05.23.46.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 05 Aug 2019 23:46:02 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Mon, 5 Aug 2019 23:45:47 -0700 Message-Id: <20190806064547.32044-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190806064547.32044-1-raj.khem@gmail.com> References: <20190806064547.32044-1-raj.khem@gmail.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 3/3] systemd-boot: Add option to specify cross objcopy and use it X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This is needed when build host != x86 box Signed-off-by: Khem Raj --- meta/recipes-core/systemd/systemd-boot_242.bb | 2 + ...fi-objcopy-option-to-specify-objcopy.patch | 48 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch -- 2.22.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core 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" 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 0000000000..7d764b4115 --- /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 +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 +--- + 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 +