From: "Joshua Watt" <JPEWhacker@gmail.com>
To: yocto@lists.yoctoproject.org
Cc: twoerner@gmail.com, Joshua Watt <JPEWhacker@gmail.com>
Subject: [meta-rockchip][PATCH] Use TF-A recipe from meta-arm
Date: Fri, 12 Jun 2020 12:38:23 -0500 [thread overview]
Message-ID: <20200612173823.7749-1-JPEWhacker@gmail.com> (raw)
Converts the build to pull the canonical TF-A recipe from meta-arm
instead of duplicating it in this layer.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
README | 4 ++
conf/layer.conf | 2 +-
conf/machine/include/rk3399.inc | 5 +--
.../arm-trusted-firmware_2.3.bb | 43 -------------------
.../trusted-firmware-a_%.bbappend | 6 +++
recipes-bsp/u-boot/u-boot%.bbappend | 6 +--
6 files changed, 16 insertions(+), 50 deletions(-)
delete mode 100644 recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.3.bb
create mode 100644 recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend
diff --git a/README b/README
index a97b89e..e1cfe3e 100644
--- a/README
+++ b/README
@@ -11,6 +11,10 @@ Dependencies:
layers: meta
branch: matched branches (e.g. master, sumo, ...)
+ URI: git://git.yoctoproject.org/meta-arm
+ layers: meta-arm
+ branch: matched branches (e.g. master, sumo, ...)
+
Status of supported boards:
--------------------------
builds and boots wic image:
diff --git a/conf/layer.conf b/conf/layer.conf
index 72d5366..4168391 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -15,4 +15,4 @@ BBFILE_PRIORITY_rockchip = "1"
# cause compatibility issues with other layers
LAYERVERSION_rockchip = "1"
LAYERSERIES_COMPAT_rockchip = "dunfell"
-LAYERDEPENDS_rockchip = "core"
+LAYERDEPENDS_rockchip = "core meta-arm"
diff --git a/conf/machine/include/rk3399.inc b/conf/machine/include/rk3399.inc
index 1fd8fd6..4019988 100644
--- a/conf/machine/include/rk3399.inc
+++ b/conf/machine/include/rk3399.inc
@@ -13,9 +13,8 @@ KBUILD_DEFCONFIG ?= "defconfig"
KERNEL_CLASSES = "kernel-fitimage"
KERNEL_IMAGETYPE = "fitImage"
-ATF_PLATFORM ?= "rk3399"
-ATF_TARGET ?= "bl31"
-ATF_SUFFIX ?= "elf"
+TFA_PLATFORM = "rk3399"
+TFA_BUILD_TARGET = "bl31"
UBOOT_SUFFIX ?= "itb"
UBOOT_ENTRYPOINT ?= "0x06000000"
diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.3.bb b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.3.bb
deleted file mode 100644
index 8d36d66..0000000
--- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.3.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright (C) 2019 Garmin Ltd. or its subsidaries
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-SUMMARY = "Arm Trusted Firmware"
-HOMEPAGE = "https://developer.trustedfirmware.org/"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://docs/license.rst;md5=189505435dbcdcc8caa63c46fe93fa89"
-
-# Rockchip RK3399 compiles some M0 firmware which requires an arm-none-eabi GCC
-# toolchain
-DEPENDS_rk3399 = "virtual/arm-none-eabi-gcc"
-
-PROVIDES = "virtual/atf"
-
-BRANCH = "master"
-SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;protocol=http;branch=${BRANCH} \
- "
-SRCREV = "8ff55a9e14a23d7c7f89f52465bcc6307850aa33"
-
-S = "${WORKDIR}/git"
-B = "${WORKDIR}/build"
-
-inherit deploy
-
-ATF_SUFFIX ??= "bin"
-
-do_compile() {
- unset LDFLAGS
- unset CFLAGS
- unset CPPFLAGS
-
- oe_runmake -C ${S} BUILD_BASE=${B} DEBUG=0 CROSS_COMPILE=${TARGET_PREFIX} \
- PLAT=${ATF_PLATFORM} ${ATF_TARGET}
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-
-do_deploy() {
- install -m 644 ${B}/${ATF_PLATFORM}/release/${ATF_TARGET}/${ATF_TARGET}.${ATF_SUFFIX} \
- ${DEPLOYDIR}/${ATF_TARGET}.${ATF_SUFFIX}
-}
-addtask deploy after do_compile
-
diff --git a/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend
new file mode 100644
index 0000000..ecde25d
--- /dev/null
+++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend
@@ -0,0 +1,6 @@
+# Rockchip RK3399 compiles some M0 firmware which requires an arm-none-eabi GCC
+# toolchain
+DEPENDS_append_rk3399 = " virtual/arm-none-eabi-gcc"
+
+COMPATIBLE_MACHINE_append_rk3399 = "|rk3399"
+
diff --git a/recipes-bsp/u-boot/u-boot%.bbappend b/recipes-bsp/u-boot/u-boot%.bbappend
index 401d649..042507d 100644
--- a/recipes-bsp/u-boot/u-boot%.bbappend
+++ b/recipes-bsp/u-boot/u-boot%.bbappend
@@ -7,8 +7,8 @@ do_compile_append_rock2-square () {
ATF_DEPENDS ??= ""
-EXTRA_OEMAKE_append_rk3399 = " BL31=${DEPLOY_DIR_IMAGE}/bl31.elf"
-ATF_DEPENDS_rk3399 = "virtual/atf:do_deploy"
+EXTRA_OEMAKE_append_rk3399 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3399.elf"
+ATF_DEPENDS_rk3399 = " virtual/trusted-firmware-a:do_deploy"
-do_compile[depends] += "${ATF_DEPENDS}"
+do_compile[depends] .= "${ATF_DEPENDS}"
--
2.26.2
next reply other threads:[~2020-06-12 17:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-12 17:38 Joshua Watt [this message]
2020-06-25 3:30 ` [meta-rockchip][PATCH] Use TF-A recipe from meta-arm Trevor Woerner
2020-06-25 3:44 ` Trevor Woerner
2020-06-25 16:03 ` Joshua Watt
2020-06-25 20:41 ` Trevor Woerner
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=20200612173823.7749-1-JPEWhacker@gmail.com \
--to=jpewhacker@gmail.com \
--cc=twoerner@gmail.com \
--cc=yocto@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox