Skip to contentSkip to conversation

Use TF-A recipe from meta-arm

PATCH Applied Joshua Watt 2 participants 5 messages Jun 12, 2020 – Jun 25, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use TF-A recipe from meta-arm

Converts the build to pull the canonical TF-A recipe from meta-arm instead of duplicating it in this layer.

---
 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
README +4 -0
index a97b89e..e1cfe3e 100644
@@ -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:
conf/layer.conf +1 -1
index 72d5366..4168391 100644
@@ -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"
conf/machine/include/rk3399.inc +2 -3
index 1fd8fd6..4019988 100644
@@ -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"
recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2.3.bb deleted +0 -43

43 lines not on this page · raw message

recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend new file +6 -0
new file mode 100644
index 0000000..ecde25d
@@ -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"
+
recipes-bsp/u-boot/u-boot%.bbappend +3 -3
index 401d649..042507d 100644
@@ -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}"
 
Signature · 1 line
2.26.2
#1 lore raw

recipes-bsp/u-boot/u-boot%.bbappend do_compile_append_rock2-square () { · line 10

Quoted 11 lines · Joshua Watt
recipes-bsp/u-boot/u-boot%.bbappend +1 -2
index 401d649..042507d 100644
@@ -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"

The space you've included at the start of the following string makes me stop and double-check... did you mean to add an "_append" in the following symbol?

Quoted 1 line
recipes-bsp/u-boot/u-boot%.bbappend +1 -0
+ATF_DEPENDS_rk3399 = " virtual/trusted-firmware-a:do_deploy"
#2 lore raw
Quoted 7 lines · Trevor Woerner
Quoted 6 lines · Joshua Watt
recipes-bsp/u-boot/u-boot%.bbappend +0 -0
index 401d649..042507d 100644
@@ -7,8 +7,8 @@ do_compile_append_rock2-square () {
 
Quoted 10 lines

recipes-bsp/u-boot/u-boot%.bbappend do_compile_append_rock2-square () { · line 10

Quoted 5 lines
recipes-bsp/u-boot/u-boot%.bbappend +1 -2
 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"

The space you've included at the start of the following string makes me stop and double-check... did you mean to add an "_append" in the following symbol?

Quoted 1 line
recipes-bsp/u-boot/u-boot%.bbappend +1 -0
+ATF_DEPENDS_rk3399 = " virtual/trusted-firmware-a:do_deploy"

Ah… I should have read the next line before replying. I see you switched from += to .= and hence the space. A bit curious, though?

#3 lore raw
Quoted 16 lines · Trevor Woerner
Quoted 15 lines · Trevor Woerner

recipes-bsp/u-boot/u-boot%.bbappend do_compile_append_rock2-square () { · line 10

Quoted 11 lines · Joshua Watt
recipes-bsp/u-boot/u-boot%.bbappend +1 -2
index 401d649..042507d 100644
@@ -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"

The space you've included at the start of the following string makes me stop and double-check... did you mean to add an "_append" in the following symbol?

Quoted 3 lines
Quoted 1 line

recipes-bsp/u-boot/u-boot%.bbappend do_compile_append_rock2-square () { · line 11

Quoted 1 line
recipes-bsp/u-boot/u-boot%.bbappend +1 -0
+ATF_DEPENDS_rk3399 = " virtual/trusted-firmware-a:do_deploy"

Ah… I should have read the next line before replying. I see you switched from += to .= and hence the space. A bit curious, though?

It prevents the recipe adding in an extra space to the task depends when the machine is not an rk3399, which helps the layer by YP 2.0 compatible

#4 lore raw
Quoted 16 lines · Joshua Watt
Quoted 14 lines · Trevor Woerner
Quoted 13 lines · Trevor Woerner

recipes-bsp/u-boot/u-boot%.bbappend do_compile_append_rock2-square () { · line 8

Quoted 9 lines · Joshua Watt
recipes-bsp/u-boot/u-boot%.bbappend +1 -2
index 401d649..042507d 100644
@@ -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"

The space you've included at the start of the following string makes me stop and double-check... did you mean to add an "_append" in the following symbol?

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

recipes-bsp/u-boot/u-boot%.bbappend do_compile_append_rock2-square () { · line 11

Quoted 1 line
recipes-bsp/u-boot/u-boot%.bbappend +1 -0
+ATF_DEPENDS_rk3399 = " virtual/trusted-firmware-a:do_deploy"

Ah… I should have read the next line before replying. I see you switched from += to .= and hence the space. A bit curious, though?

It prevents the recipe adding in an extra space to the task depends when the machine is not an rk3399, which helps the layer by YP 2.0 compatible

Ah, thanks for the clarification.

Applied to master, thanks!