All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Burton <ross.burton@arm.com>
To: meta-arm@lists.yoctoproject.org
Subject: [PATCH 7/8] arm/hafnium: use our gn/ninja/dtc
Date: Mon,  4 Oct 2021 20:56:11 +0100	[thread overview]
Message-ID: <20211004195612.188487-7-ross.burton@arm.com> (raw)
In-Reply-To: <20211004195612.188487-1-ross.burton@arm.com>

Instead of relying on the prebuilt GN/Ninja/dtc binaries that come with
Hafnium via the hafnium-prebuilts repository, use the recipes that we
build.

We still need to use the prebuilt compilers, but that is being worked
on upstream.

Change-Id: Ife4172d74f7877eaee3c4c414d7afda61332f220
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../recipes-bsp/hafnium/hafnium/native-dtc.patch   | 14 ++++++++++++++
 meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb        | 10 +++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)
 create mode 100644 meta-arm/recipes-bsp/hafnium/hafnium/native-dtc.patch

diff --git a/meta-arm/recipes-bsp/hafnium/hafnium/native-dtc.patch b/meta-arm/recipes-bsp/hafnium/hafnium/native-dtc.patch
new file mode 100644
index 00000000..8cdb0601
--- /dev/null
+++ b/meta-arm/recipes-bsp/hafnium/hafnium/native-dtc.patch
@@ -0,0 +1,14 @@
+diff --git a/build/image/dtc.py b/build/image/dtc.py
+index d0778186..a5d831be 100755
+--- a/build/image/dtc.py
++++ b/build/image/dtc.py
+@@ -18,6 +18,9 @@ DTC_ROOT = os.path.join(HF_ROOT, "prebuilts", "linux-x64", "dtc")
+ DTC = os.path.join(DTC_ROOT, "dtc")
+ FDTOVERLAY = os.path.join(DTC_ROOT, "fdtoverlay")
+ 
++DTC =  "dtc"
++FDTOVERLAY = "fdtoverlay"
++
+ def cmd_compile(args):
+     exec_args = [
+             DTC,
diff --git a/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb b/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb
index 39aa14f9..dc248e48 100644
--- a/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb
+++ b/meta-arm/recipes-bsp/hafnium/hafnium_2.5.bb
@@ -1,5 +1,7 @@
 SUMMARY = "Hafnium"
 DESCRIPTION = "A reference Secure Partition Manager (SPM) for systems that implement the Armv8.4-A Secure-EL2 extension"
+DEPENDS = "gn-native ninja-native bison-native bc-native dtc-native openssl-native"
+
 LICENSE = "BSD-3-Clause & GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=782b40c14bad5294672c500501edc103"
 
@@ -9,7 +11,8 @@ inherit deploy python3native pkgconfig
 
 SRC_URI = "gitsm://git.trustedfirmware.org/hafnium/hafnium.git;protocol=https \
            file://hashbang.patch \
-           file://pkg-config-native.patch"
+           file://pkg-config-native.patch \
+           file://native-dtc.patch"
 SRCREV = "3a149eb219467c0d9336467ea1fb9d3fb65da94b"
 S = "${WORKDIR}/git"
 B = "${WORKDIR}/build"
@@ -26,13 +29,14 @@ HAFNIUM_PLATFORM ?= "invalid"
 # default to hafnium
 HAFNIUM_INSTALL_TARGET ?= "hafnium"
 
-DEPENDS = "bison-native bc-native openssl-native"
-
 # set project to build
 EXTRA_OEMAKE += "PROJECT=${HAFNIUM_PROJECT}"
 
 EXTRA_OEMAKE += "OUT_DIR=${B}"
 
+# Don't use prebuilt binaries for gn and ninja
+EXTRA_OEMAKE += "GN=${STAGING_BINDIR_NATIVE}/gn NINJA=${STAGING_BINDIR_NATIVE}/ninja"
+
 do_configure[cleandirs] += "${B}"
 
 do_compile() {
-- 
2.25.1



  parent reply	other threads:[~2021-10-04 19:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 19:56 [PATCH 1/8] arm/hafnium: add missing pkg-config dependency Ross Burton
2021-10-04 19:56 ` [PATCH 2/8] arm/hafnium: remove python symlink workaround Ross Burton
2021-10-04 19:56 ` [PATCH 3/8] arm/hafnium: do out-of-tree builds Ross Burton
2021-10-04 19:56 ` [PATCH 4/8] arm/hafnium: clean up install Ross Burton
2021-10-04 19:56 ` [PATCH 5/8] arm/hafnium: package the ELF in hafnium-dbg Ross Burton
2021-10-04 19:56 ` [PATCH 6/8] arm: add recipe for gn Ross Burton
2021-10-04 19:56 ` Ross Burton [this message]
2021-10-04 19:56 ` [PATCH 8/8] CI: build a proper TC0 image on x86-64 Ross Burton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211004195612.188487-7-ross.burton@arm.com \
    --to=ross.burton@arm.com \
    --cc=meta-arm@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.