1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-04-20 11:29:54 +00:00

meta-arm-bsp: Introduce firmware-image-juno recipe

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>
Reviewed-By: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
This commit is contained in:
Diego Sueiro
2020-04-21 08:33:54 +01:00
committed by Jon Mason
parent 4b84b124cc
commit d7b179b934
8 changed files with 73 additions and 78 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -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
}