All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno
@ 2020-04-21  7:33 Diego Sueiro
  2020-04-21  7:33 ` [PATCH 1/5] meta-arm-bsp:trusted-firmware-a: Remove custom do_clean task Diego Sueiro
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Diego Sueiro @ 2020-04-21  7:33 UTC (permalink / raw)
  To: meta-arm; +Cc: nd, Diego Sueiro

This patch series includes:
    Removal of misbehaving do_clean task from tf-a recipe
    Change tf-a recipe to deliver compiled binaries to sysroot as well
    Introduction of scp-firmware-juno and firmware-image-juno recipes


Diego Sueiro (5):
  meta-arm-bsp:trusted-firmware-a: Remove custom do_clean task
  trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware
  meta-arm-bsp: Introduce the scp-firmware-juno recipe
  meta-arm-bsp: Introduce firmware-image-juno recipe
  arm-autonomy: Append firmware-image-juno recipe to collect Xen
    binaries

 .../images/firmware-image-juno.bbappend            | 14 ++++
 .../firmware-image-juno}/images-r0.txt             |  2 +-
 .../firmware-image-juno}/images-r1.txt             |  2 +-
 .../firmware-image-juno}/images-r2.txt             |  2 +-
 .../juno => images/firmware-image-juno}/uEnv.txt   |  0
 .../trusted-firmware-a_2.%.bbappend                | 13 ----
 meta-arm-bsp/conf/machine/juno.conf                |  2 +-
 meta-arm-bsp/documentation/juno.md                 |  7 +-
 .../firmware/scp-firmware-juno_19.06.bb            | 38 ++++++++++
 .../recipes-bsp/images/firmware-image-juno.bb      | 64 +++++++++++++++++
 .../firmware-image-juno}/images-r0.txt             |  0
 .../firmware-image-juno}/images-r1.txt             |  0
 .../firmware-image-juno}/images-r2.txt             |  0
 .../juno => images/firmware-image-juno}/uEnv.txt   |  0
 .../trusted-firmware-a/trusted-firmware-a-fvp.inc  |  7 +-
 .../trusted-firmware-a/trusted-firmware-a-juno.inc | 82 +++-------------------
 .../trusted-firmware-a/trusted-firmware-a.inc      | 36 +++++-----
 17 files changed, 152 insertions(+), 117 deletions(-)
 create mode 100644 meta-arm-autonomy/recipes-bsp/images/firmware-image-juno.bbappend
 rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r0.txt (98%)
 rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r1.txt (98%)
 rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r2.txt (98%)
 rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/uEnv.txt (100%)
 delete mode 100644 meta-arm-autonomy/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend
 create mode 100644 meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb
 create mode 100644 meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb
 rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r0.txt (100%)
 rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r1.txt (100%)
 rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r2.txt (100%)
 rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/uEnv.txt (100%)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/5] meta-arm-bsp:trusted-firmware-a: Remove custom do_clean task
  2020-04-21  7:33 [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno Diego Sueiro
@ 2020-04-21  7:33 ` Diego Sueiro
  2020-04-21  7:33 ` [PATCH 2/5] trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware Diego Sueiro
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Diego Sueiro @ 2020-04-21  7:33 UTC (permalink / raw)
  To: meta-arm; +Cc: nd, Diego Sueiro

The custom do_clean task is not necessary and is misbehaving by not
removing the output files from other tasks.

Change-Id: I5ff837dece88030f24a0dd20c75a738b7b277d61
Issue-Id: SCM-888
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
 meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
index 43113a9..d7c4fbf 100644
--- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
+++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
@@ -82,11 +82,6 @@ DEPENDS += " ${@bb.utils.contains('TFA_UBOOT', '1', 'u-boot', '', d)}"
 do_compile[depends] += " ${@bb.utils.contains('TFA_UBOOT', '1', 'u-boot:do_deploy', '', d)}"
 EXTRA_OEMAKE += "${@bb.utils.contains('TFA_UBOOT', '1', ' BL33=${DEPLOY_DIR_IMAGE}/u-boot.bin', '',d)}"
 
-do_clean() {
-    if [ -f ${S}/Makefile ]; then
-        oe_runmake -C ${S} distclean
-    fi
-}
 
 do_compile() {
     oe_runmake ${TFA_BUILD_TARGET}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/5] trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware
  2020-04-21  7:33 [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno Diego Sueiro
  2020-04-21  7:33 ` [PATCH 1/5] meta-arm-bsp:trusted-firmware-a: Remove custom do_clean task Diego Sueiro
@ 2020-04-21  7:33 ` Diego Sueiro
  2020-05-19  4:05   ` [meta-arm] " Denys Dmytriyenko
  2020-04-21  7:33 ` [PATCH 3/5] meta-arm-bsp: Introduce the scp-firmware-juno recipe Diego Sueiro
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Diego Sueiro @ 2020-04-21  7:33 UTC (permalink / raw)
  To: meta-arm; +Cc: nd, Diego Sueiro

Make usage of the do_install task to deliver binaries artefacts to
the `sysroot/firmware` path, making it easier for other recipes that
depends on it to make usage of those binaries instead of copying them
from the DEPLOY_DIR_IMAGE.

This recipe still deploys its artefacts to DEPLOY_DIR_IMAGE.

Change-Id: I97b97f90b23746557e981f8de10159c5f475becd
Issue-Id: SCM-888
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
 .../trusted-firmware-a/trusted-firmware-a-fvp.inc  |  7 +++--
 .../trusted-firmware-a/trusted-firmware-a.inc      | 31 +++++++++++++---------
 2 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc
index 6e7eba3..3e58ecf 100644
--- a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc
+++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc
@@ -12,9 +12,9 @@ TFA_MBEDTLS = "1"
 TFA_UBOOT = "1"
 TFA_BUILD_TARGET = "bl1 bl2 bl31 dtbs fiptool"
 
-do_deploy[depends] += "virtual/kernel:do_deploy"
+do_install[depends] += "virtual/kernel:do_deploy"
 
-do_deploy_append() {
+do_install_append() {
     ./tools/fiptool/fiptool create \
         --tb-fw ${S}/${TFA_BUILD_DIR}/bl2.bin \
         --soc-fw ${S}/${TFA_BUILD_DIR}/bl31.bin \
@@ -26,6 +26,5 @@ do_deploy_append() {
 
     ./tools/fiptool/fiptool info fip.bin
 
-    install -m 0644 ${S}/fip.bin ${DEPLOYDIR}/fip-fvp.bin
+    install -m 0644 ${S}/fip.bin ${D}/firmware/fip-fvp.bin
 }
-
diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
index d7c4fbf..93ca199 100644
--- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
+++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
@@ -5,7 +5,7 @@ PROVIDES = "virtual/trusted-firmware-a"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-inherit deploy
+inherit deploy nopackages
 
 COMPATIBLE_MACHINE ?= "invalid"
 
@@ -42,12 +42,12 @@ SRCREV_FORMAT_append = "${@bb.utils.contains('TFA_MBEDTLS', '1', '_mbedtls', '',
 TFA_UBOOT ?= "0"
 
 # What to build
-# By default we only build bl1, do_deploy will install
+# By default we only build bl1, do_deploy will copy
 # everything listed in this variable (by default bl1.bin)
 TFA_BUILD_TARGET ?= "bl1"
 
 # What to install
-# do_deploy will install everything listed in this
+# do_install and do_deploy will install everything listed in this
 # variable. It is set by default to TFA_BUILD_TARGET
 TFA_INSTALL_TARGET ?= "${TFA_BUILD_TARGET}"
 
@@ -60,9 +60,8 @@ LDFLAGS[unexport] = "1"
 AS[unexport] = "1"
 LD[unexport] = "1"
 
-# No configure or install
+# No configure
 do_configure[noexec] = "1"
-do_install[noexec] = "1"
 
 # We need dtc for dtbs compilation
 # We need openssl for fiptool
@@ -87,27 +86,27 @@ do_compile() {
     oe_runmake ${TFA_BUILD_TARGET}
 }
 
-do_deploy() {
-    install -d -m 755 ${DEPLOYDIR}
+do_install() {
+    install -d -m 755 ${D}/firmware
     for atfbin in ${TFA_INSTALL_TARGET}; do
         if [ "$atfbin" = "all" ]; then
             # Target all is not handled by default
-            bberror "all as TFA_INSTALL_TARGET is not handled by do_deploy"
+            bberror "all as TFA_INSTALL_TARGET is not handled by do_install"
             bberror "Please specify valid targets in TFA_INSTALL_TARGET or"
-            bberror "rewrite or turn off do_deploy"
+            bberror "rewrite or turn off do_install"
             exit 1
         elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin.bin ]; then
             echo "Install $atfbin.bin"
             install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin.bin \
-                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}.bin
+                ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
         elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin.elf ]; then
             echo "Install $atfbin.elf"
             install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin.elf \
-                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}.elf
+                ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
         elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin ]; then
             echo "Install $atfbin"
             install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin \
-                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}
+                ${D}/firmware/$atfbin-${TFA_PLATFORM}
         elif [ "$atfbin" = "dtbs" ]; then
             echo "dtbs install, skipped"
         elif [ -f ${S}/tools/$atfbin/$atfbin ]; then
@@ -118,4 +117,10 @@ do_deploy() {
         fi
     done
 }
-addtask deploy before do_build after do_compile
+
+SYSROOT_DIRS += "/firmware"
+
+do_deploy() {
+    cp -rf ${D}/firmware/* ${DEPLOYDIR}/
+}
+addtask deploy after do_install
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/5] meta-arm-bsp: Introduce the scp-firmware-juno recipe
  2020-04-21  7:33 [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno Diego Sueiro
  2020-04-21  7:33 ` [PATCH 1/5] meta-arm-bsp:trusted-firmware-a: Remove custom do_clean task Diego Sueiro
  2020-04-21  7:33 ` [PATCH 2/5] trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware Diego Sueiro
@ 2020-04-21  7:33 ` Diego Sueiro
  2020-04-21  7:33 ` [PATCH 4/5] meta-arm-bsp: Introduce firmware-image-juno recipe Diego Sueiro
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Diego Sueiro @ 2020-04-21  7:33 UTC (permalink / raw)
  To: meta-arm; +Cc: nd, Diego Sueiro

The scp-firmware-juno recipe is used to fetch the System Control
Processor (SCP) firmware in binary form for Juno.

Also update the trusted-firmware-a for juno to make usage of
the the SCP firmware binary from scp-firmware-juno recipe.

Change-Id: I2a7e517e06c3bbac6b0ffa3f28e0848d8f30589f
Issue-Id: SCM-754 SCM-888
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
 .../firmware/scp-firmware-juno_19.06.bb            | 38 ++++++++++++++++++++++
 .../trusted-firmware-a/trusted-firmware-a-juno.inc |  4 ++-
 2 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb

diff --git a/meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb b/meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb
new file mode 100644
index 0000000..a6ac9ca
--- /dev/null
+++ b/meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb
@@ -0,0 +1,38 @@
+DESCRIPTION = "System Control Processor (SCP) firmware for Juno"
+HOMEPAGE = "https://github.com/ARM-software/SCP-firmware"
+LICENSE = "BSD-3-Clause"
+SECTION = "firmware"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+COMPATIBLE_MACHINE = "juno"
+
+PROVIDES += "virtual/scp-firmware"
+
+# For now, for juno we retrieve the SCP firmware in binary format
+# from Linaro Releases.
+SRC_URI = "http://releases.linaro.org/members/arm/platforms/${PV}/juno-latest-oe-uboot.zip;subdir=${UNPACK_DIR}"
+
+SRC_URI[md5sum] = "01b662b81fa409d55ff298238ad24003"
+SRC_URI[sha256sum] = "b8a3909bb3bc4350a8771b863193a3e33b358e2a727624a77c9ecf13516cec82"
+
+UNPACK_DIR = "juno-firmware"
+
+S = "${WORKDIR}/${UNPACK_DIR}"
+
+SCP_FIRMWARE_BINARIES = "scp_bl1.bin scp_bl2.bin"
+
+inherit nopackages
+
+do_configure[noexec] = "1"
+do_configure[compile] = "1"
+
+do_install() {
+    install -d ${D}/firmware
+    for file in ${SCP_FIRMWARE_BINARIES}; do
+        install -m 644 ${S}/SOFTWARE/${file} ${D}/firmware
+    done
+}
+
+SYSROOT_DIRS += "/firmware"
diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc
index c62197d..4a034c8 100644
--- a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc
+++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc
@@ -23,8 +23,10 @@ SRC_URI_append_juno = " \
 	file://images-r2.txt \
 	file://uEnv.txt \
 	"
+# Juno needs the System Control Processor Firmware
+DEPENDS += "virtual/scp-firmware"
 
-EXTRA_OEMAKE_append_juno = " SCP_BL2=${WORKDIR}/juno-oe-uboot/SOFTWARE/scp_bl2.bin"
+EXTRA_OEMAKE_append = " SCP_BL2=${RECIPE_SYSROOT}/firmware/scp_bl2.bin"
 
 # Build dependencies only for Juno and add them
 # doing it with do_deploy_juno[depends] does not work
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/5] meta-arm-bsp: Introduce firmware-image-juno recipe
  2020-04-21  7:33 [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno Diego Sueiro
                   ` (2 preceding siblings ...)
  2020-04-21  7:33 ` [PATCH 3/5] meta-arm-bsp: Introduce the scp-firmware-juno recipe Diego Sueiro
@ 2020-04-21  7:33 ` Diego Sueiro
  2020-04-21  7:33 ` [PATCH 5/5] arm-autonomy: Append firmware-image-juno recipe to collect Xen binaries Diego Sueiro
  2020-04-21  8:10 ` [meta-arm] [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno Bertrand Marquis
  5 siblings, 0 replies; 12+ messages in thread
From: Diego Sueiro @ 2020-04-21  7:33 UTC (permalink / raw)
  To: meta-arm; +Cc: nd, Diego Sueiro

Add the firmware-image-juno recipe to produce the Firmware Image for
Juno to be copied to the Configuration microSD card instead of the
trusted-firmware-a recipe.

Include the firmware-image-juno recipe in the EXTRA_IMAGEDEPENDS
only for juno MACHINE.

Change-Id: I316c70f22d57a3d85cc40386f1961ecd23edc865
Issue-Id: SCM-754 SCM-888
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
 meta-arm-bsp/conf/machine/juno.conf                |  2 +-
 meta-arm-bsp/documentation/juno.md                 |  7 +-
 .../recipes-bsp/images/firmware-image-juno.bb      | 64 ++++++++++++++++++
 .../firmware-image-juno}/images-r0.txt             |  0
 .../firmware-image-juno}/images-r1.txt             |  0
 .../firmware-image-juno}/images-r2.txt             |  0
 .../juno => images/firmware-image-juno}/uEnv.txt   |  0
 .../trusted-firmware-a/trusted-firmware-a-juno.inc | 78 ++--------------------
 8 files changed, 73 insertions(+), 78 deletions(-)
 create mode 100644 meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb
 rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r0.txt (100%)
 rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r1.txt (100%)
 rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r2.txt (100%)
 rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/uEnv.txt (100%)

diff --git a/meta-arm-bsp/conf/machine/juno.conf b/meta-arm-bsp/conf/machine/juno.conf
index 02ef226..878b6b1 100644
--- a/meta-arm-bsp/conf/machine/juno.conf
+++ b/meta-arm-bsp/conf/machine/juno.conf
@@ -21,7 +21,7 @@ SERIAL_CONSOLES = "115200;ttyAMA0"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-linaro-arm"
 PREFERRED_VERSION_linux-linaro-arm ?= "4.19%"
 
-EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot"
+EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-a u-boot firmware-image-juno"
 
 # Juno u-boot configuration
 UBOOT_MACHINE = "vexpress_aemv8a_juno_defconfig"
diff --git a/meta-arm-bsp/documentation/juno.md b/meta-arm-bsp/documentation/juno.md
index 8d343de..cc5a272 100644
--- a/meta-arm-bsp/documentation/juno.md
+++ b/meta-arm-bsp/documentation/juno.md
@@ -16,20 +16,17 @@ the case in poky distribution).
 ### Update Juno SD card:
 
 The SD card content is generated during the build here:
-tmp/deploy/images/juno/juno-oe-uboot.tar.gz
+tmp/deploy/images/juno/firmware-image-juno.tar.gz
 
 Its content must be written on the Juno firmware SD card.
 To do this:
-- extract the content of the tar file:
-```bash$ tar -xzf tmp/deploy/images/juno/juno-oe-uboot.tar.gz```
-
 - insert the sdcard of the Juno in an SD card reader and mount it:
 ```bash$ sudo mount /dev/sdx1 /mnt```
 (replace sdx by the device of the SD card)
 
 - erase its content and put the new one:
 ```bash$ sudo rm -rf /mnt/*```
-```bash$ sudo cp -rf juno-oe-uboot/* /mnt/.```
+```bash$ sudo tar --no-same-owner -xzf tmp/deploy/images/juno/firmware-image-juno.tar.gz -C /mnt/```
 ```bash$ sudo umount /mnt```
 
 - reinsert the SD card in the Juno board
diff --git a/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb b/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb
new file mode 100644
index 0000000..9be4005
--- /dev/null
+++ b/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb
@@ -0,0 +1,64 @@
+DESCRIPTION = "Firmware Image for Juno to be copied to the Configuration \
+microSD card"
+
+LICENSE = "BSD-3-Clause"
+SECTION = "firmware"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9"
+
+DEPENDS = "virtual/trusted-firmware-a virtual/kernel"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+COMPATIBLE_MACHINE = "juno"
+
+LINARO_RELEASE = "19.06"
+
+SRC_URI = "http://releases.linaro.org/members/arm/platforms/${LINARO_RELEASE}/juno-latest-oe-uboot.zip;subdir=${UNPACK_DIR} \
+    file://images-r0.txt \
+    file://images-r1.txt \
+    file://images-r2.txt \
+    file://uEnv.txt \
+"
+SRC_URI[md5sum] = "01b662b81fa409d55ff298238ad24003"
+SRC_URI[sha256sum] = "b8a3909bb3bc4350a8771b863193a3e33b358e2a727624a77c9ecf13516cec82"
+
+UNPACK_DIR = "juno-firmware-${LINARO_RELEASE}"
+
+inherit deploy nopackages
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+    cp -a ${WORKDIR}/${UNPACK_DIR} ${D}
+    cp -f ${RECIPE_SYSROOT}/firmware/bl1-juno.bin \
+        ${D}/${UNPACK_DIR}/SOFTWARE/bl1.bin
+
+    cp -f ${RECIPE_SYSROOT}/firmware/fip-juno.bin \
+        ${D}/${UNPACK_DIR}/SOFTWARE/fip.bin
+
+    for f in ${KERNEL_DEVICETREE}; do
+        install -m 755 -c ${DEPLOY_DIR_IMAGE}/$(basename $f) \
+            ${D}/${UNPACK_DIR}/SOFTWARE/.
+    done
+
+    cp -L -f ${DEPLOY_DIR_IMAGE}/Image ${D}/${UNPACK_DIR}/SOFTWARE/
+
+    # u-boot environment file
+    cp -f ${WORKDIR}/uEnv.txt ${D}/${UNPACK_DIR}/SOFTWARE/
+
+    # Juno images list file
+    cp -f ${WORKDIR}/images-r0.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262B/images.txt
+    cp -f ${WORKDIR}/images-r1.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262C/images.txt
+    cp -f ${WORKDIR}/images-r2.txt ${D}/${UNPACK_DIR}/SITE1/HBI0262D/images.txt
+}
+do_install[depends] += "virtual/kernel:do_deploy"
+
+do_deploy() {
+    # Compress the files
+    tar -C ${D}/${UNPACK_DIR} -zcvf ${WORKDIR}/${PN}.tar.gz ./
+
+    # Deploy the compressed archive to the deploy folder
+    install -D -p -m0644 ${WORKDIR}/${PN}.tar.gz ${DEPLOYDIR}/${PN}.tar.gz
+}
+addtask deploy after do_install
diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/juno/images-r0.txt b/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r0.txt
similarity index 100%
rename from meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/juno/images-r0.txt
rename to meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r0.txt
diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/juno/images-r1.txt b/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r1.txt
similarity index 100%
rename from meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/juno/images-r1.txt
rename to meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r1.txt
diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/juno/images-r2.txt b/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r2.txt
similarity index 100%
rename from meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/juno/images-r2.txt
rename to meta-arm-bsp/recipes-bsp/images/firmware-image-juno/images-r2.txt
diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/juno/uEnv.txt b/meta-arm-bsp/recipes-bsp/images/firmware-image-juno/uEnv.txt
similarity index 100%
rename from meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/juno/uEnv.txt
rename to meta-arm-bsp/recipes-bsp/images/firmware-image-juno/uEnv.txt
diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc
index 4a034c8..2f1559c 100644
--- a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc
+++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-juno.inc
@@ -1,79 +1,13 @@
 # Juno specific TFA support
 
-COMPATIBLE_MACHINE_juno = "juno"
-TFA_PLATFORM_juno = "juno"
-TFA_DEBUG_juno = "1"
-TFA_MBEDTLS_juno = "1"
-TFA_UBOOT_juno = "1"
-TFA_BUILD_TARGET_juno = "bl1 fip"
+COMPATIBLE_MACHINE = "juno"
+TFA_PLATFORM = "juno"
+TFA_DEBUG = "1"
+TFA_MBEDTLS = "1"
+TFA_UBOOT = "1"
+TFA_BUILD_TARGET = "bl1 fip"
 
-# Firmware image from Linaro
-SRC_URI_append_juno = " http://releases.linaro.org/members/arm/platforms/19.06/juno-latest-oe-uboot.zip;name=junofip;subdir=juno-oe-uboot"
-
-SRC_URI[junofip.md5sum] = "01b662b81fa409d55ff298238ad24003"
-SRC_URI[junofip.sha256sum] = "b8a3909bb3bc4350a8771b863193a3e33b358e2a727624a77c9ecf13516cec82"
-
-# Add our how images.txt
-
-FILESEXTRAPATHS_prepend := "${THISDIR}/files/juno:"
-
-SRC_URI_append_juno = " \
-	file://images-r0.txt \
-	file://images-r1.txt \
-	file://images-r2.txt \
-	file://uEnv.txt \
-	"
 # Juno needs the System Control Processor Firmware
 DEPENDS += "virtual/scp-firmware"
 
 EXTRA_OEMAKE_append = " SCP_BL2=${RECIPE_SYSROOT}/firmware/scp_bl2.bin"
-
-# Build dependencies only for Juno and add them
-# doing it with do_deploy_juno[depends] does not work
-JUNO_EXTRA_DEPS ?= ""
-JUNO_EXTRA_DEPS_juno = ""
-JUNO_EXTRA_DEPS_juno += "virtual/kernel:do_deploy"
-
-do_deploy[depends] += "${JUNO_EXTRA_DEPS}"
-
-#
-# do_deploy_juno_append or do_deploy_append_juno are not working
-# so this file must not be included for other machines then the juno
-#
-do_deploy_append() {
-	cp -a ${S}/${TFA_BUILD_DIR}/bl1.bin \
-		${WORKDIR}/juno-oe-uboot/SOFTWARE/bl1.bin
-
-	cp -a ${S}/${TFA_BUILD_DIR}/fip.bin \
-		${WORKDIR}/juno-oe-uboot/SOFTWARE/fip.bin
-
-	for f in ${KERNEL_DEVICETREE}; do
-		install -m 755 -c ${DEPLOY_DIR_IMAGE}/$(basename $f) \
-			${WORKDIR}/juno-oe-uboot/SOFTWARE/.
-	done
-
-	cp -aL --remove-destination \
-		${DEPLOY_DIR_IMAGE}/Image \
-		${WORKDIR}/juno-oe-uboot/SOFTWARE/Image
-
-    # u-boot environment file
-    cp -a ${WORKDIR}/uEnv.txt \
-        ${WORKDIR}/juno-oe-uboot/SOFTWARE/
-
-    # Juno images list file
-    cp -a --remove-destination ${WORKDIR}/images-r0.txt \
-        ${WORKDIR}/juno-oe-uboot/SITE1/HBI0262B/images.txt
-    cp -a --remove-destination ${WORKDIR}/images-r1.txt \
-        ${WORKDIR}/juno-oe-uboot/SITE1/HBI0262C/images.txt
-    cp -a --remove-destination ${WORKDIR}/images-r2.txt \
-        ${WORKDIR}/juno-oe-uboot/SITE1/HBI0262D/images.txt
-
-    # Zip the files
-    cd ${WORKDIR}/
-    tar -zcvf juno-oe-uboot.tar.gz juno-oe-uboot/
-
-    # Deploy the compressed archive to the deploy folder
-    install -D -p -m0644 ${WORKDIR}/juno-oe-uboot.tar.gz ${DEPLOYDIR}/juno-oe-uboot.tar.gz
-
-}
-
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/5] arm-autonomy: Append firmware-image-juno recipe to collect Xen binaries
  2020-04-21  7:33 [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno Diego Sueiro
                   ` (3 preceding siblings ...)
  2020-04-21  7:33 ` [PATCH 4/5] meta-arm-bsp: Introduce firmware-image-juno recipe Diego Sueiro
@ 2020-04-21  7:33 ` Diego Sueiro
  2020-04-21  8:10 ` [meta-arm] [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno Bertrand Marquis
  5 siblings, 0 replies; 12+ messages in thread
From: Diego Sueiro @ 2020-04-21  7:33 UTC (permalink / raw)
  To: meta-arm; +Cc: nd, Diego Sueiro

For juno, the Xen binary and dtb are now collected by the
firmware-image-juno recipe instead of the trusted-firmware-a.

Change-Id: Iaf4e4821e80c09910771c57ba3dbd481626187d5
Issue-Id: SCM-754
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
 .../recipes-bsp/images/firmware-image-juno.bbappend        | 14 ++++++++++++++
 .../juno => images/firmware-image-juno}/images-r0.txt      |  2 +-
 .../juno => images/firmware-image-juno}/images-r1.txt      |  2 +-
 .../juno => images/firmware-image-juno}/images-r2.txt      |  2 +-
 .../files/juno => images/firmware-image-juno}/uEnv.txt     |  0
 .../trusted-firmware-a/trusted-firmware-a_2.%.bbappend     | 13 -------------
 6 files changed, 17 insertions(+), 16 deletions(-)
 create mode 100644 meta-arm-autonomy/recipes-bsp/images/firmware-image-juno.bbappend
 rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r0.txt (98%)
 rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r1.txt (98%)
 rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r2.txt (98%)
 rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/uEnv.txt (100%)
 delete mode 100644 meta-arm-autonomy/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend

diff --git a/meta-arm-autonomy/recipes-bsp/images/firmware-image-juno.bbappend b/meta-arm-autonomy/recipes-bsp/images/firmware-image-juno.bbappend
new file mode 100644
index 0000000..55b83d3
--- /dev/null
+++ b/meta-arm-autonomy/recipes-bsp/images/firmware-image-juno.bbappend
@@ -0,0 +1,14 @@
+FILESEXTRAPATHS_prepend_juno := "${@bb.utils.contains('DISTRO_FEATURES', 'xen', '${THISDIR}/${PN}:', '', d)}"
+
+INSTALL_EXTRA_DEPS_juno = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen:do_deploy', '', d)}"
+
+do_install[depends] += "${INSTALL_EXTRA_DEPS}"
+
+do_install_append_juno() {
+    if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'yes', 'no', d)}" = "yes" ]; then
+        cp  ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \
+            ${D}/${UNPACK_DIR}/SOFTWARE/xen
+        cp ${DEPLOY_DIR_IMAGE}/*xen.dtb \
+            ${D}/${UNPACK_DIR}/SOFTWARE/
+    fi
+}
diff --git a/meta-arm-autonomy/recipes-bsp/trusted-firmware-a/files/juno/images-r0.txt b/meta-arm-autonomy/recipes-bsp/images/firmware-image-juno/images-r0.txt
similarity index 98%
rename from meta-arm-autonomy/recipes-bsp/trusted-firmware-a/files/juno/images-r0.txt
rename to meta-arm-autonomy/recipes-bsp/images/firmware-image-juno/images-r0.txt
index 177cf09..ec32ca2 100644
--- a/meta-arm-autonomy/recipes-bsp/trusted-firmware-a/files/juno/images-r0.txt
+++ b/meta-arm-autonomy/recipes-bsp/images/firmware-image-juno/images-r0.txt
@@ -24,7 +24,7 @@ NOR2ENTRY: 00000000              ;Image Entry Point
 
 NOR3UPDATE: AUTO                 ;Image Update:NONE/AUTO/FORCE
 NOR3ADDRESS: 0x02700000          ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno.dtb     ;Image File Name
+NOR3FILE: \SOFTWARE\juno-xen.dtb ;Image File Name
 NOR3NAME: board.dtb              ;Specify target filename to preserve file extension
 NOR3LOAD: 00000000               ;Image Load Address
 NOR3ENTRY: 00000000              ;Image Entry Point
diff --git a/meta-arm-autonomy/recipes-bsp/trusted-firmware-a/files/juno/images-r1.txt b/meta-arm-autonomy/recipes-bsp/images/firmware-image-juno/images-r1.txt
similarity index 98%
rename from meta-arm-autonomy/recipes-bsp/trusted-firmware-a/files/juno/images-r1.txt
rename to meta-arm-autonomy/recipes-bsp/images/firmware-image-juno/images-r1.txt
index ac40bf0..1372bc3 100644
--- a/meta-arm-autonomy/recipes-bsp/trusted-firmware-a/files/juno/images-r1.txt
+++ b/meta-arm-autonomy/recipes-bsp/images/firmware-image-juno/images-r1.txt
@@ -24,7 +24,7 @@ NOR2ENTRY: 00000000              ;Image Entry Point
 
 NOR3UPDATE: AUTO                 ;Image Update:NONE/AUTO/FORCE
 NOR3ADDRESS: 0x02700000          ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno-r1.dtb  ;Image File Name
+NOR3FILE: \SOFTWARE\juno-r1-xen.dtb  ;Image File Name
 NOR3NAME: board.dtb              ;Specify target filename to preserve file extension
 NOR3LOAD: 00000000               ;Image Load Address
 NOR3ENTRY: 00000000              ;Image Entry Point
diff --git a/meta-arm-autonomy/recipes-bsp/trusted-firmware-a/files/juno/images-r2.txt b/meta-arm-autonomy/recipes-bsp/images/firmware-image-juno/images-r2.txt
similarity index 98%
rename from meta-arm-autonomy/recipes-bsp/trusted-firmware-a/files/juno/images-r2.txt
rename to meta-arm-autonomy/recipes-bsp/images/firmware-image-juno/images-r2.txt
index 423a574..def465e 100644
--- a/meta-arm-autonomy/recipes-bsp/trusted-firmware-a/files/juno/images-r2.txt
+++ b/meta-arm-autonomy/recipes-bsp/images/firmware-image-juno/images-r2.txt
@@ -24,7 +24,7 @@ NOR2ENTRY: 00000000              ;Image Entry Point
 
 NOR3UPDATE: AUTO                 ;Image Update:NONE/AUTO/FORCE
 NOR3ADDRESS: 0x02700000          ;Image Flash Address
-NOR3FILE: \SOFTWARE\juno-r2.dtb  ;Image File Name
+NOR3FILE: \SOFTWARE\juno-r2-xen.dtb  ;Image File Name
 NOR3NAME: board.dtb              ;Specify target filename to preserve file extension
 NOR3LOAD: 00000000               ;Image Load Address
 NOR3ENTRY: 00000000              ;Image Entry Point
diff --git a/meta-arm-autonomy/recipes-bsp/trusted-firmware-a/files/juno/uEnv.txt b/meta-arm-autonomy/recipes-bsp/images/firmware-image-juno/uEnv.txt
similarity index 100%
rename from meta-arm-autonomy/recipes-bsp/trusted-firmware-a/files/juno/uEnv.txt
rename to meta-arm-autonomy/recipes-bsp/images/firmware-image-juno/uEnv.txt
diff --git a/meta-arm-autonomy/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend b/meta-arm-autonomy/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend
deleted file mode 100644
index 49a8228..0000000
--- a/meta-arm-autonomy/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend
+++ /dev/null
@@ -1,13 +0,0 @@
-FILESEXTRAPATHS_prepend_juno := "${@bb.utils.contains('DISTRO_FEATURES', 'xen', '${THISDIR}/files/juno:', '', d)}"
-
-JUNO_EXTRA_DEPS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' xen:do_deploy', '', d)}"
-
-do_deploy_append_juno() {
-
-    if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'yes', 'no', d)}" = "yes" ]; then
-        cp -a \
-            ${DEPLOY_DIR_IMAGE}/xen-${COMPATIBLE_MACHINE}.efi \
-            ${WORKDIR}/juno-oe-uboot/SOFTWARE/xen
-    fi
-
-}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno
  2020-04-21  7:33 [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno Diego Sueiro
                   ` (4 preceding siblings ...)
  2020-04-21  7:33 ` [PATCH 5/5] arm-autonomy: Append firmware-image-juno recipe to collect Xen binaries Diego Sueiro
@ 2020-04-21  8:10 ` Bertrand Marquis
  2020-04-23 18:35   ` Jon Mason
  5 siblings, 1 reply; 12+ messages in thread
From: Bertrand Marquis @ 2020-04-21  8:10 UTC (permalink / raw)
  To: meta-arm; +Cc: nd, Diego Sueiro



> On 21 Apr 2020, at 08:33, Diego Sueiro via lists.yoctoproject.org <diego.sueiro=arm.com@lists.yoctoproject.org> wrote:
> 
> This patch series includes:
>    Removal of misbehaving do_clean task from tf-a recipe
>    Change tf-a recipe to deliver compiled binaries to sysroot as well
>    Introduction of scp-firmware-juno and firmware-image-juno recipes
> 


Reviewed-By: Bertrand Marquis <bertrand.marquis@arm.com>

> 
> Diego Sueiro (5):
>  meta-arm-bsp:trusted-firmware-a: Remove custom do_clean task
>  trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware
>  meta-arm-bsp: Introduce the scp-firmware-juno recipe
>  meta-arm-bsp: Introduce firmware-image-juno recipe
>  arm-autonomy: Append firmware-image-juno recipe to collect Xen
>    binaries
> 
> .../images/firmware-image-juno.bbappend            | 14 ++++
> .../firmware-image-juno}/images-r0.txt             |  2 +-
> .../firmware-image-juno}/images-r1.txt             |  2 +-
> .../firmware-image-juno}/images-r2.txt             |  2 +-
> .../juno => images/firmware-image-juno}/uEnv.txt   |  0
> .../trusted-firmware-a_2.%.bbappend                | 13 ----
> meta-arm-bsp/conf/machine/juno.conf                |  2 +-
> meta-arm-bsp/documentation/juno.md                 |  7 +-
> .../firmware/scp-firmware-juno_19.06.bb            | 38 ++++++++++
> .../recipes-bsp/images/firmware-image-juno.bb      | 64 +++++++++++++++++
> .../firmware-image-juno}/images-r0.txt             |  0
> .../firmware-image-juno}/images-r1.txt             |  0
> .../firmware-image-juno}/images-r2.txt             |  0
> .../juno => images/firmware-image-juno}/uEnv.txt   |  0
> .../trusted-firmware-a/trusted-firmware-a-fvp.inc  |  7 +-
> .../trusted-firmware-a/trusted-firmware-a-juno.inc | 82 +++-------------------
> .../trusted-firmware-a/trusted-firmware-a.inc      | 36 +++++-----
> 17 files changed, 152 insertions(+), 117 deletions(-)
> create mode 100644 meta-arm-autonomy/recipes-bsp/images/firmware-image-juno.bbappend
> rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r0.txt (98%)
> rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r1.txt (98%)
> rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r2.txt (98%)
> rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/uEnv.txt (100%)
> delete mode 100644 meta-arm-autonomy/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend
> create mode 100644 meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb
> create mode 100644 meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb
> rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r0.txt (100%)
> rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r1.txt (100%)
> rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r2.txt (100%)
> rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/uEnv.txt (100%)
> 
> -- 
> 2.7.4
> 
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno
  2020-04-21  8:10 ` [meta-arm] [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno Bertrand Marquis
@ 2020-04-23 18:35   ` Jon Mason
  0 siblings, 0 replies; 12+ messages in thread
From: Jon Mason @ 2020-04-23 18:35 UTC (permalink / raw)
  To: meta-arm; +Cc: Diego Sueiro

On Tue, Apr 21, 2020 at 08:10:21AM +0000, Bertrand Marquis wrote:
> 
> 
> > On 21 Apr 2020, at 08:33, Diego Sueiro via lists.yoctoproject.org <diego.sueiro=arm.com@lists.yoctoproject.org> wrote:
> > 
> > This patch series includes:
> >    Removal of misbehaving do_clean task from tf-a recipe
> >    Change tf-a recipe to deliver compiled binaries to sysroot as well
> >    Introduction of scp-firmware-juno and firmware-image-juno recipes
> > 
> 
> 
> Reviewed-By: Bertrand Marquis <bertrand.marquis@arm.com>

Pulled into the master branch.

Thanks,
Jon

> 
> > 
> > Diego Sueiro (5):
> >  meta-arm-bsp:trusted-firmware-a: Remove custom do_clean task
> >  trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware
> >  meta-arm-bsp: Introduce the scp-firmware-juno recipe
> >  meta-arm-bsp: Introduce firmware-image-juno recipe
> >  arm-autonomy: Append firmware-image-juno recipe to collect Xen
> >    binaries
> > 
> > .../images/firmware-image-juno.bbappend            | 14 ++++
> > .../firmware-image-juno}/images-r0.txt             |  2 +-
> > .../firmware-image-juno}/images-r1.txt             |  2 +-
> > .../firmware-image-juno}/images-r2.txt             |  2 +-
> > .../juno => images/firmware-image-juno}/uEnv.txt   |  0
> > .../trusted-firmware-a_2.%.bbappend                | 13 ----
> > meta-arm-bsp/conf/machine/juno.conf                |  2 +-
> > meta-arm-bsp/documentation/juno.md                 |  7 +-
> > .../firmware/scp-firmware-juno_19.06.bb            | 38 ++++++++++
> > .../recipes-bsp/images/firmware-image-juno.bb      | 64 +++++++++++++++++
> > .../firmware-image-juno}/images-r0.txt             |  0
> > .../firmware-image-juno}/images-r1.txt             |  0
> > .../firmware-image-juno}/images-r2.txt             |  0
> > .../juno => images/firmware-image-juno}/uEnv.txt   |  0
> > .../trusted-firmware-a/trusted-firmware-a-fvp.inc  |  7 +-
> > .../trusted-firmware-a/trusted-firmware-a-juno.inc | 82 +++-------------------
> > .../trusted-firmware-a/trusted-firmware-a.inc      | 36 +++++-----
> > 17 files changed, 152 insertions(+), 117 deletions(-)
> > create mode 100644 meta-arm-autonomy/recipes-bsp/images/firmware-image-juno.bbappend
> > rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r0.txt (98%)
> > rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r1.txt (98%)
> > rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r2.txt (98%)
> > rename meta-arm-autonomy/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/uEnv.txt (100%)
> > delete mode 100644 meta-arm-autonomy/recipes-bsp/trusted-firmware-a/trusted-firmware-a_2.%.bbappend
> > create mode 100644 meta-arm-bsp/recipes-bsp/firmware/scp-firmware-juno_19.06.bb
> > create mode 100644 meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb
> > rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r0.txt (100%)
> > rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r1.txt (100%)
> > rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/images-r2.txt (100%)
> > rename meta-arm-bsp/recipes-bsp/{trusted-firmware-a/files/juno => images/firmware-image-juno}/uEnv.txt (100%)
> > 
> > -- 
> > 2.7.4
> > 
> > 
> 

> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 2/5] trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware
  2020-04-21  7:33 ` [PATCH 2/5] trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware Diego Sueiro
@ 2020-05-19  4:05   ` Denys Dmytriyenko
  2020-05-19  6:10     ` Diego Sueiro
  0 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-05-19  4:05 UTC (permalink / raw)
  To: meta-arm; +Cc: nd, Diego Sueiro

On Tue, Apr 21, 2020 at 08:33:52AM +0100, Diego Sueiro wrote:
> Make usage of the do_install task to deliver binaries artefacts to
> the `sysroot/firmware` path, making it easier for other recipes that
> depends on it to make usage of those binaries instead of copying them
> from the DEPLOY_DIR_IMAGE.
> 
> This recipe still deploys its artefacts to DEPLOY_DIR_IMAGE.
> 
> Change-Id: I97b97f90b23746557e981f8de10159c5f475becd
> Issue-Id: SCM-888
> Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> ---
>  .../trusted-firmware-a/trusted-firmware-a-fvp.inc  |  7 +++--
>  .../trusted-firmware-a/trusted-firmware-a.inc      | 31 +++++++++++++---------
>  2 files changed, 21 insertions(+), 17 deletions(-)
> 
> diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc
> index 6e7eba3..3e58ecf 100644
> --- a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc
> +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc
> @@ -12,9 +12,9 @@ TFA_MBEDTLS = "1"
>  TFA_UBOOT = "1"
>  TFA_BUILD_TARGET = "bl1 bl2 bl31 dtbs fiptool"
>  
> -do_deploy[depends] += "virtual/kernel:do_deploy"
> +do_install[depends] += "virtual/kernel:do_deploy"
>  
> -do_deploy_append() {
> +do_install_append() {
>      ./tools/fiptool/fiptool create \
>          --tb-fw ${S}/${TFA_BUILD_DIR}/bl2.bin \
>          --soc-fw ${S}/${TFA_BUILD_DIR}/bl31.bin \
> @@ -26,6 +26,5 @@ do_deploy_append() {
>  
>      ./tools/fiptool/fiptool info fip.bin
>  
> -    install -m 0644 ${S}/fip.bin ${DEPLOYDIR}/fip-fvp.bin
> +    install -m 0644 ${S}/fip.bin ${D}/firmware/fip-fvp.bin
>  }
> -
> diff --git a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> index d7c4fbf..93ca199 100644
> --- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> +++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> @@ -5,7 +5,7 @@ PROVIDES = "virtual/trusted-firmware-a"
>  
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>  
> -inherit deploy
> +inherit deploy nopackages

I totally missed this ^^^ - may I ask why nopackages was added here?


>  COMPATIBLE_MACHINE ?= "invalid"
>  
> @@ -42,12 +42,12 @@ SRCREV_FORMAT_append = "${@bb.utils.contains('TFA_MBEDTLS', '1', '_mbedtls', '',
>  TFA_UBOOT ?= "0"
>  
>  # What to build
> -# By default we only build bl1, do_deploy will install
> +# By default we only build bl1, do_deploy will copy
>  # everything listed in this variable (by default bl1.bin)
>  TFA_BUILD_TARGET ?= "bl1"
>  
>  # What to install
> -# do_deploy will install everything listed in this
> +# do_install and do_deploy will install everything listed in this
>  # variable. It is set by default to TFA_BUILD_TARGET
>  TFA_INSTALL_TARGET ?= "${TFA_BUILD_TARGET}"
>  
> @@ -60,9 +60,8 @@ LDFLAGS[unexport] = "1"
>  AS[unexport] = "1"
>  LD[unexport] = "1"
>  
> -# No configure or install
> +# No configure
>  do_configure[noexec] = "1"
> -do_install[noexec] = "1"
>  
>  # We need dtc for dtbs compilation
>  # We need openssl for fiptool
> @@ -87,27 +86,27 @@ do_compile() {
>      oe_runmake ${TFA_BUILD_TARGET}
>  }
>  
> -do_deploy() {
> -    install -d -m 755 ${DEPLOYDIR}
> +do_install() {
> +    install -d -m 755 ${D}/firmware
>      for atfbin in ${TFA_INSTALL_TARGET}; do
>          if [ "$atfbin" = "all" ]; then
>              # Target all is not handled by default
> -            bberror "all as TFA_INSTALL_TARGET is not handled by do_deploy"
> +            bberror "all as TFA_INSTALL_TARGET is not handled by do_install"
>              bberror "Please specify valid targets in TFA_INSTALL_TARGET or"
> -            bberror "rewrite or turn off do_deploy"
> +            bberror "rewrite or turn off do_install"
>              exit 1
>          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin.bin ]; then
>              echo "Install $atfbin.bin"
>              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin.bin \
> -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}.bin
> +                ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
>          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin.elf ]; then
>              echo "Install $atfbin.elf"
>              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin.elf \
> -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}.elf
> +                ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
>          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin ]; then
>              echo "Install $atfbin"
>              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin \
> -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}
> +                ${D}/firmware/$atfbin-${TFA_PLATFORM}
>          elif [ "$atfbin" = "dtbs" ]; then
>              echo "dtbs install, skipped"
>          elif [ -f ${S}/tools/$atfbin/$atfbin ]; then
> @@ -118,4 +117,10 @@ do_deploy() {
>          fi
>      done
>  }
> -addtask deploy before do_build after do_compile
> +
> +SYSROOT_DIRS += "/firmware"
> +
> +do_deploy() {
> +    cp -rf ${D}/firmware/* ${DEPLOYDIR}/
> +}
> +addtask deploy after do_install
> -- 
> 2.7.4
> 

> 


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 2/5] trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware
  2020-05-19  4:05   ` [meta-arm] " Denys Dmytriyenko
@ 2020-05-19  6:10     ` Diego Sueiro
  2020-05-19  6:40       ` Denys Dmytriyenko
  0 siblings, 1 reply; 12+ messages in thread
From: Diego Sueiro @ 2020-05-19  6:10 UTC (permalink / raw)
  To: denis, meta-arm; +Cc: nd

> -----Original Message-----
> From: meta-arm@lists.yoctoproject.org <meta-arm@lists.yoctoproject.org>
> On Behalf Of Denys Dmytriyenko via lists.yoctoproject.org
> Sent: 19 May 2020 05:06
> To: meta-arm@lists.yoctoproject.org
> Cc: nd <nd@arm.com>; Diego Sueiro <Diego.Sueiro@arm.com>
> Subject: Re: [meta-arm] [PATCH 2/5] trusted-firmware-a: Deliver binaries
> artefacts to sysroot/firmware
> 
> On Tue, Apr 21, 2020 at 08:33:52AM +0100, Diego Sueiro wrote:
> > Make usage of the do_install task to deliver binaries artefacts to the
> > `sysroot/firmware` path, making it easier for other recipes that
> > depends on it to make usage of those binaries instead of copying them
> > from the DEPLOY_DIR_IMAGE.
> >
> > This recipe still deploys its artefacts to DEPLOY_DIR_IMAGE.
> >
> > Change-Id: I97b97f90b23746557e981f8de10159c5f475becd
> > Issue-Id: SCM-888
> > Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> > ---
> >  .../trusted-firmware-a/trusted-firmware-a-fvp.inc  |  7 +++--
> >  .../trusted-firmware-a/trusted-firmware-a.inc      | 31 +++++++++++++-------
> --
> >  2 files changed, 21 insertions(+), 17 deletions(-)
> >
> > diff --git
> > a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.i
> > nc
> > b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.i
> > nc
> > index 6e7eba3..3e58ecf 100644
> > ---
> > a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.i
> > nc
> > +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-f
> > +++ vp.inc
> > @@ -12,9 +12,9 @@ TFA_MBEDTLS = "1"
> >  TFA_UBOOT = "1"
> >  TFA_BUILD_TARGET = "bl1 bl2 bl31 dtbs fiptool"
> >
> > -do_deploy[depends] += "virtual/kernel:do_deploy"
> > +do_install[depends] += "virtual/kernel:do_deploy"
> >
> > -do_deploy_append() {
> > +do_install_append() {
> >      ./tools/fiptool/fiptool create \
> >          --tb-fw ${S}/${TFA_BUILD_DIR}/bl2.bin \
> >          --soc-fw ${S}/${TFA_BUILD_DIR}/bl31.bin \ @@ -26,6 +26,5 @@
> > do_deploy_append() {
> >
> >      ./tools/fiptool/fiptool info fip.bin
> >
> > -    install -m 0644 ${S}/fip.bin ${DEPLOYDIR}/fip-fvp.bin
> > +    install -m 0644 ${S}/fip.bin ${D}/firmware/fip-fvp.bin
> >  }
> > -
> > diff --git
> > a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> > b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> > index d7c4fbf..93ca199 100644
> > --- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> > +++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> > @@ -5,7 +5,7 @@ PROVIDES = "virtual/trusted-firmware-a"
> >
> >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> >
> > -inherit deploy
> > +inherit deploy nopackages
> 
> I totally missed this ^^^ - may I ask why nopackages was added here?

Because this recipe is not generating packages to be installed in the rootfs.

> 
> 
> >  COMPATIBLE_MACHINE ?= "invalid"
> >
> > @@ -42,12 +42,12 @@ SRCREV_FORMAT_append =
> > "${@bb.utils.contains('TFA_MBEDTLS', '1', '_mbedtls', '',  TFA_UBOOT ?=
> "0"
> >
> >  # What to build
> > -# By default we only build bl1, do_deploy will install
> > +# By default we only build bl1, do_deploy will copy
> >  # everything listed in this variable (by default bl1.bin)
> > TFA_BUILD_TARGET ?= "bl1"
> >
> >  # What to install
> > -# do_deploy will install everything listed in this
> > +# do_install and do_deploy will install everything listed in this
> >  # variable. It is set by default to TFA_BUILD_TARGET
> > TFA_INSTALL_TARGET ?= "${TFA_BUILD_TARGET}"
> >
> > @@ -60,9 +60,8 @@ LDFLAGS[unexport] = "1"
> >  AS[unexport] = "1"
> >  LD[unexport] = "1"
> >
> > -# No configure or install
> > +# No configure
> >  do_configure[noexec] = "1"
> > -do_install[noexec] = "1"
> >
> >  # We need dtc for dtbs compilation
> >  # We need openssl for fiptool
> > @@ -87,27 +86,27 @@ do_compile() {
> >      oe_runmake ${TFA_BUILD_TARGET}
> >  }
> >
> > -do_deploy() {
> > -    install -d -m 755 ${DEPLOYDIR}
> > +do_install() {
> > +    install -d -m 755 ${D}/firmware
> >      for atfbin in ${TFA_INSTALL_TARGET}; do
> >          if [ "$atfbin" = "all" ]; then
> >              # Target all is not handled by default
> > -            bberror "all as TFA_INSTALL_TARGET is not handled by do_deploy"
> > +            bberror "all as TFA_INSTALL_TARGET is not handled by do_install"
> >              bberror "Please specify valid targets in TFA_INSTALL_TARGET or"
> > -            bberror "rewrite or turn off do_deploy"
> > +            bberror "rewrite or turn off do_install"
> >              exit 1
> >          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin.bin ]; then
> >              echo "Install $atfbin.bin"
> >              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin.bin \
> > -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}.bin
> > +                ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
> >          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin.elf ]; then
> >              echo "Install $atfbin.elf"
> >              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin.elf \
> > -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}.elf
> > +                ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
> >          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin ]; then
> >              echo "Install $atfbin"
> >              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin \
> > -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}
> > +                ${D}/firmware/$atfbin-${TFA_PLATFORM}
> >          elif [ "$atfbin" = "dtbs" ]; then
> >              echo "dtbs install, skipped"
> >          elif [ -f ${S}/tools/$atfbin/$atfbin ]; then @@ -118,4
> > +117,10 @@ do_deploy() {
> >          fi
> >      done
> >  }
> > -addtask deploy before do_build after do_compile
> > +
> > +SYSROOT_DIRS += "/firmware"
> > +
> > +do_deploy() {
> > +    cp -rf ${D}/firmware/* ${DEPLOYDIR}/ } addtask deploy after
> > +do_install
> > --
> > 2.7.4
> >
> 
> >


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 2/5] trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware
  2020-05-19  6:10     ` Diego Sueiro
@ 2020-05-19  6:40       ` Denys Dmytriyenko
  2020-05-19  9:11         ` Diego Sueiro
  0 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-05-19  6:40 UTC (permalink / raw)
  To: Diego Sueiro; +Cc: meta-arm, nd

On Tue, May 19, 2020 at 06:10:46AM +0000, Diego Sueiro wrote:
> > -----Original Message-----
> > From: meta-arm@lists.yoctoproject.org <meta-arm@lists.yoctoproject.org>
> > On Behalf Of Denys Dmytriyenko via lists.yoctoproject.org
> > Sent: 19 May 2020 05:06
> > To: meta-arm@lists.yoctoproject.org
> > Cc: nd <nd@arm.com>; Diego Sueiro <Diego.Sueiro@arm.com>
> > Subject: Re: [meta-arm] [PATCH 2/5] trusted-firmware-a: Deliver binaries
> > artefacts to sysroot/firmware
> > 
> > On Tue, Apr 21, 2020 at 08:33:52AM +0100, Diego Sueiro wrote:
> > > Make usage of the do_install task to deliver binaries artefacts to the
> > > `sysroot/firmware` path, making it easier for other recipes that
> > > depends on it to make usage of those binaries instead of copying them
> > > from the DEPLOY_DIR_IMAGE.
> > >
> > > This recipe still deploys its artefacts to DEPLOY_DIR_IMAGE.
> > >
> > > Change-Id: I97b97f90b23746557e981f8de10159c5f475becd
> > > Issue-Id: SCM-888
> > > Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> > > ---
> > >  .../trusted-firmware-a/trusted-firmware-a-fvp.inc  |  7 +++--
> > >  .../trusted-firmware-a/trusted-firmware-a.inc      | 31 +++++++++++++-------
> > --
> > >  2 files changed, 21 insertions(+), 17 deletions(-)
> > >
> > > diff --git
> > > a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.i
> > > nc
> > > b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.i
> > > nc
> > > index 6e7eba3..3e58ecf 100644
> > > ---
> > > a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.i
> > > nc
> > > +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-f
> > > +++ vp.inc
> > > @@ -12,9 +12,9 @@ TFA_MBEDTLS = "1"
> > >  TFA_UBOOT = "1"
> > >  TFA_BUILD_TARGET = "bl1 bl2 bl31 dtbs fiptool"
> > >
> > > -do_deploy[depends] += "virtual/kernel:do_deploy"
> > > +do_install[depends] += "virtual/kernel:do_deploy"
> > >
> > > -do_deploy_append() {
> > > +do_install_append() {
> > >      ./tools/fiptool/fiptool create \
> > >          --tb-fw ${S}/${TFA_BUILD_DIR}/bl2.bin \
> > >          --soc-fw ${S}/${TFA_BUILD_DIR}/bl31.bin \ @@ -26,6 +26,5 @@
> > > do_deploy_append() {
> > >
> > >      ./tools/fiptool/fiptool info fip.bin
> > >
> > > -    install -m 0644 ${S}/fip.bin ${DEPLOYDIR}/fip-fvp.bin
> > > +    install -m 0644 ${S}/fip.bin ${D}/firmware/fip-fvp.bin
> > >  }
> > > -
> > > diff --git
> > > a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> > > b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> > > index d7c4fbf..93ca199 100644
> > > --- a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> > > +++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> > > @@ -5,7 +5,7 @@ PROVIDES = "virtual/trusted-firmware-a"
> > >
> > >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> > >
> > > -inherit deploy
> > > +inherit deploy nopackages
> > 
> > I totally missed this ^^^ - may I ask why nopackages was added here?
> 
> Because this recipe is not generating packages to be installed in the rootfs.

So does u-boot, grub, efi, systemd-boot, ovmf, opensbi, optee-os and many 
other recipes that deploy binaries outside of the rootfs. And yet, they do 
not inherit nopackages, because packages are useful for many things besides 
just rootfs...


> > >  COMPATIBLE_MACHINE ?= "invalid"
> > >
> > > @@ -42,12 +42,12 @@ SRCREV_FORMAT_append =
> > > "${@bb.utils.contains('TFA_MBEDTLS', '1', '_mbedtls', '',  TFA_UBOOT ?=
> > "0"
> > >
> > >  # What to build
> > > -# By default we only build bl1, do_deploy will install
> > > +# By default we only build bl1, do_deploy will copy
> > >  # everything listed in this variable (by default bl1.bin)
> > > TFA_BUILD_TARGET ?= "bl1"
> > >
> > >  # What to install
> > > -# do_deploy will install everything listed in this
> > > +# do_install and do_deploy will install everything listed in this
> > >  # variable. It is set by default to TFA_BUILD_TARGET
> > > TFA_INSTALL_TARGET ?= "${TFA_BUILD_TARGET}"
> > >
> > > @@ -60,9 +60,8 @@ LDFLAGS[unexport] = "1"
> > >  AS[unexport] = "1"
> > >  LD[unexport] = "1"
> > >
> > > -# No configure or install
> > > +# No configure
> > >  do_configure[noexec] = "1"
> > > -do_install[noexec] = "1"
> > >
> > >  # We need dtc for dtbs compilation
> > >  # We need openssl for fiptool
> > > @@ -87,27 +86,27 @@ do_compile() {
> > >      oe_runmake ${TFA_BUILD_TARGET}
> > >  }
> > >
> > > -do_deploy() {
> > > -    install -d -m 755 ${DEPLOYDIR}
> > > +do_install() {
> > > +    install -d -m 755 ${D}/firmware
> > >      for atfbin in ${TFA_INSTALL_TARGET}; do
> > >          if [ "$atfbin" = "all" ]; then
> > >              # Target all is not handled by default
> > > -            bberror "all as TFA_INSTALL_TARGET is not handled by do_deploy"
> > > +            bberror "all as TFA_INSTALL_TARGET is not handled by do_install"
> > >              bberror "Please specify valid targets in TFA_INSTALL_TARGET or"
> > > -            bberror "rewrite or turn off do_deploy"
> > > +            bberror "rewrite or turn off do_install"
> > >              exit 1
> > >          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin.bin ]; then
> > >              echo "Install $atfbin.bin"
> > >              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin.bin \
> > > -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}.bin
> > > +                ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
> > >          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin.elf ]; then
> > >              echo "Install $atfbin.elf"
> > >              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin.elf \
> > > -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}.elf
> > > +                ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
> > >          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin ]; then
> > >              echo "Install $atfbin"
> > >              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin \
> > > -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}
> > > +                ${D}/firmware/$atfbin-${TFA_PLATFORM}
> > >          elif [ "$atfbin" = "dtbs" ]; then
> > >              echo "dtbs install, skipped"
> > >          elif [ -f ${S}/tools/$atfbin/$atfbin ]; then @@ -118,4
> > > +117,10 @@ do_deploy() {
> > >          fi
> > >      done
> > >  }
> > > -addtask deploy before do_build after do_compile
> > > +
> > > +SYSROOT_DIRS += "/firmware"
> > > +
> > > +do_deploy() {
> > > +    cp -rf ${D}/firmware/* ${DEPLOYDIR}/ } addtask deploy after
> > > +do_install
> > > --
> > > 2.7.4
> > >
> > 
> > >
> 

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-arm] [PATCH 2/5] trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware
  2020-05-19  6:40       ` Denys Dmytriyenko
@ 2020-05-19  9:11         ` Diego Sueiro
  0 siblings, 0 replies; 12+ messages in thread
From: Diego Sueiro @ 2020-05-19  9:11 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-arm, nd

> -----Original Message-----
> From: Denys Dmytriyenko <denis@denix.org>
> Sent: 19 May 2020 07:41
> To: Diego Sueiro <Diego.Sueiro@arm.com>
> Cc: meta-arm@lists.yoctoproject.org; nd <nd@arm.com>
> Subject: Re: [meta-arm] [PATCH 2/5] trusted-firmware-a: Deliver binaries
> artefacts to sysroot/firmware
> 
> On Tue, May 19, 2020 at 06:10:46AM +0000, Diego Sueiro wrote:
> > > -----Original Message-----
> > > From: meta-arm@lists.yoctoproject.org
> > > <meta-arm@lists.yoctoproject.org> On Behalf Of Denys Dmytriyenko via
> > > lists.yoctoproject.org
> > > Sent: 19 May 2020 05:06
> > > To: meta-arm@lists.yoctoproject.org
> > > Cc: nd <nd@arm.com>; Diego Sueiro <Diego.Sueiro@arm.com>
> > > Subject: Re: [meta-arm] [PATCH 2/5] trusted-firmware-a: Deliver
> > > binaries artefacts to sysroot/firmware
> > >
> > > On Tue, Apr 21, 2020 at 08:33:52AM +0100, Diego Sueiro wrote:
> > > > Make usage of the do_install task to deliver binaries artefacts to
> > > > the `sysroot/firmware` path, making it easier for other recipes
> > > > that depends on it to make usage of those binaries instead of
> > > > copying them from the DEPLOY_DIR_IMAGE.
> > > >
> > > > This recipe still deploys its artefacts to DEPLOY_DIR_IMAGE.
> > > >
> > > > Change-Id: I97b97f90b23746557e981f8de10159c5f475becd
> > > > Issue-Id: SCM-888
> > > > Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
> > > > ---
> > > >  .../trusted-firmware-a/trusted-firmware-a-fvp.inc  |  7 +++--
> > > >  .../trusted-firmware-a/trusted-firmware-a.inc      | 31 +++++++++++++--
> -----
> > > --
> > > >  2 files changed, 21 insertions(+), 17 deletions(-)
> > > >
> > > > diff --git
> > > > a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-f
> > > > vp.i
> > > > nc
> > > > b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-f
> > > > vp.i
> > > > nc
> > > > index 6e7eba3..3e58ecf 100644
> > > > ---
> > > > a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-f
> > > > vp.i
> > > > nc
> > > > +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware
> > > > +++ -a-f
> > > > +++ vp.inc
> > > > @@ -12,9 +12,9 @@ TFA_MBEDTLS = "1"
> > > >  TFA_UBOOT = "1"
> > > >  TFA_BUILD_TARGET = "bl1 bl2 bl31 dtbs fiptool"
> > > >
> > > > -do_deploy[depends] += "virtual/kernel:do_deploy"
> > > > +do_install[depends] += "virtual/kernel:do_deploy"
> > > >
> > > > -do_deploy_append() {
> > > > +do_install_append() {
> > > >      ./tools/fiptool/fiptool create \
> > > >          --tb-fw ${S}/${TFA_BUILD_DIR}/bl2.bin \
> > > >          --soc-fw ${S}/${TFA_BUILD_DIR}/bl31.bin \ @@ -26,6 +26,5
> > > > @@
> > > > do_deploy_append() {
> > > >
> > > >      ./tools/fiptool/fiptool info fip.bin
> > > >
> > > > -    install -m 0644 ${S}/fip.bin ${DEPLOYDIR}/fip-fvp.bin
> > > > +    install -m 0644 ${S}/fip.bin ${D}/firmware/fip-fvp.bin
> > > >  }
> > > > -
> > > > diff --git
> > > > a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> > > > b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> > > > index d7c4fbf..93ca199 100644
> > > > ---
> > > > a/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.inc
> > > > +++ b/meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a.i
> > > > +++ nc
> > > > @@ -5,7 +5,7 @@ PROVIDES = "virtual/trusted-firmware-a"
> > > >
> > > >  PACKAGE_ARCH = "${MACHINE_ARCH}"
> > > >
> > > > -inherit deploy
> > > > +inherit deploy nopackages
> > >
> > > I totally missed this ^^^ - may I ask why nopackages was added here?
> >
> > Because this recipe is not generating packages to be installed in the rootfs.
> 
> So does u-boot, grub, efi, systemd-boot, ovmf, opensbi, optee-os and many
> other recipes that deploy binaries outside of the rootfs. And yet, they do not
> inherit nopackages, because packages are useful for many things besides just
> rootfs...
> 

If you think that generating packages for tf-a could be useful I'm happy to accept this change.  ; - )

> 
> > > >  COMPATIBLE_MACHINE ?= "invalid"
> > > >
> > > > @@ -42,12 +42,12 @@ SRCREV_FORMAT_append =
> > > > "${@bb.utils.contains('TFA_MBEDTLS', '1', '_mbedtls', '',
> > > > TFA_UBOOT ?=
> > > "0"
> > > >
> > > >  # What to build
> > > > -# By default we only build bl1, do_deploy will install
> > > > +# By default we only build bl1, do_deploy will copy
> > > >  # everything listed in this variable (by default bl1.bin)
> > > > TFA_BUILD_TARGET ?= "bl1"
> > > >
> > > >  # What to install
> > > > -# do_deploy will install everything listed in this
> > > > +# do_install and do_deploy will install everything listed in this
> > > >  # variable. It is set by default to TFA_BUILD_TARGET
> > > > TFA_INSTALL_TARGET ?= "${TFA_BUILD_TARGET}"
> > > >
> > > > @@ -60,9 +60,8 @@ LDFLAGS[unexport] = "1"
> > > >  AS[unexport] = "1"
> > > >  LD[unexport] = "1"
> > > >
> > > > -# No configure or install
> > > > +# No configure
> > > >  do_configure[noexec] = "1"
> > > > -do_install[noexec] = "1"
> > > >
> > > >  # We need dtc for dtbs compilation  # We need openssl for fiptool
> > > > @@ -87,27 +86,27 @@ do_compile() {
> > > >      oe_runmake ${TFA_BUILD_TARGET}  }
> > > >
> > > > -do_deploy() {
> > > > -    install -d -m 755 ${DEPLOYDIR}
> > > > +do_install() {
> > > > +    install -d -m 755 ${D}/firmware
> > > >      for atfbin in ${TFA_INSTALL_TARGET}; do
> > > >          if [ "$atfbin" = "all" ]; then
> > > >              # Target all is not handled by default
> > > > -            bberror "all as TFA_INSTALL_TARGET is not handled by
> do_deploy"
> > > > +            bberror "all as TFA_INSTALL_TARGET is not handled by
> do_install"
> > > >              bberror "Please specify valid targets in TFA_INSTALL_TARGET or"
> > > > -            bberror "rewrite or turn off do_deploy"
> > > > +            bberror "rewrite or turn off do_install"
> > > >              exit 1
> > > >          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin.bin ]; then
> > > >              echo "Install $atfbin.bin"
> > > >              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin.bin \
> > > > -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}.bin
> > > > +                ${D}/firmware/$atfbin-${TFA_PLATFORM}.bin
> > > >          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin.elf ]; then
> > > >              echo "Install $atfbin.elf"
> > > >              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin.elf \
> > > > -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}.elf
> > > > +                ${D}/firmware/$atfbin-${TFA_PLATFORM}.elf
> > > >          elif [ -f ${S}/${TFA_BUILD_DIR}/$atfbin ]; then
> > > >              echo "Install $atfbin"
> > > >              install -m 0644 ${S}/${TFA_BUILD_DIR}/$atfbin \
> > > > -                ${DEPLOYDIR}/$atfbin-${TFA_PLATFORM}
> > > > +                ${D}/firmware/$atfbin-${TFA_PLATFORM}
> > > >          elif [ "$atfbin" = "dtbs" ]; then
> > > >              echo "dtbs install, skipped"
> > > >          elif [ -f ${S}/tools/$atfbin/$atfbin ]; then @@ -118,4
> > > > +117,10 @@ do_deploy() {
> > > >          fi
> > > >      done
> > > >  }
> > > > -addtask deploy before do_build after do_compile
> > > > +
> > > > +SYSROOT_DIRS += "/firmware"
> > > > +
> > > > +do_deploy() {
> > > > +    cp -rf ${D}/firmware/* ${DEPLOYDIR}/ } addtask deploy after
> > > > +do_install
> > > > --
> > > > 2.7.4
> > > >
> > >
> > > >
> >

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-05-19  9:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21  7:33 [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno Diego Sueiro
2020-04-21  7:33 ` [PATCH 1/5] meta-arm-bsp:trusted-firmware-a: Remove custom do_clean task Diego Sueiro
2020-04-21  7:33 ` [PATCH 2/5] trusted-firmware-a: Deliver binaries artefacts to sysroot/firmware Diego Sueiro
2020-05-19  4:05   ` [meta-arm] " Denys Dmytriyenko
2020-05-19  6:10     ` Diego Sueiro
2020-05-19  6:40       ` Denys Dmytriyenko
2020-05-19  9:11         ` Diego Sueiro
2020-04-21  7:33 ` [PATCH 3/5] meta-arm-bsp: Introduce the scp-firmware-juno recipe Diego Sueiro
2020-04-21  7:33 ` [PATCH 4/5] meta-arm-bsp: Introduce firmware-image-juno recipe Diego Sueiro
2020-04-21  7:33 ` [PATCH 5/5] arm-autonomy: Append firmware-image-juno recipe to collect Xen binaries Diego Sueiro
2020-04-21  8:10 ` [meta-arm] [PATCH 0/5] tf-a recipe improvements and new recipes for SCP and firmware image for Juno Bertrand Marquis
2020-04-23 18:35   ` Jon Mason

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.