From: Andrew Davis <afd@ti.com>
To: Denys Dmytriyenko <denys@konsulko.com>,
Ryan Eatmon <reatmon@ti.com>, <meta-ti@lists.yoctoproject.org>
Cc: Andrew Davis <afd@ti.com>
Subject: [meta-ti][dunfell][PATCH 2/4] ti-sci-fw: Use new SOC_TYPE and SYSFW_DIR to simplify recipe
Date: Mon, 1 Aug 2022 16:40:05 -0500 [thread overview]
Message-ID: <20220801214007.25463-2-afd@ti.com> (raw)
In-Reply-To: <20220801214007.25463-1-afd@ti.com>
The k3-image-gen now has two new helper flags SOC_TYPE and SYSFW_DIR
that we can use to simplify this recipe. With these we do not need to do
anything different here for HS builds, the SOC_TYPE selects this now.
DL_URL also do not need cleared anymore, the k3-image-gen will no longer
download missing files when not needed for the current build type.
do_install and do_deploy can also check for the existence of either
sysfw.itb or tiboot3.bin and install/deploy as needed. k3-image-gen only
gerneates the right one now depending on the SoC. Merge all these
steps for all SoCs.
Signed-off-by: Andrew Davis <afd@ti.com>
---
recipes-bsp/ti-linux-fw/ti-linux-fw.inc | 2 +-
recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 147 +++++-------------------
2 files changed, 28 insertions(+), 121 deletions(-)
diff --git a/recipes-bsp/ti-linux-fw/ti-linux-fw.inc b/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
index 8aaf1559..a8627c68 100644
--- a/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
+++ b/recipes-bsp/ti-linux-fw/ti-linux-fw.inc
@@ -25,7 +25,7 @@ SRCREV = "${TI_LINUX_FW_SRCREV}"
BRANCH ?= "ti-linux-firmware"
-K3_IMAGE_GEN_SRCREV ?= "85a70059fc24242ea03653a5014b98100e4da2d6"
+K3_IMAGE_GEN_SRCREV ?= "91a75b17c616a5cc41b3345905dccba5c29aca66"
SRCREV_imggen = "${K3_IMAGE_GEN_SRCREV}"
SRCREV_FORMAT = "imggen"
diff --git a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
index 983d23e3..d1f2859e 100644
--- a/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
+++ b/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb
@@ -54,13 +54,9 @@ LD[unexport] = "1"
do_configure[noexec] = "1"
EXTRA_OEMAKE = "\
- CROSS_COMPILE=${TARGET_PREFIX} SYSFW_DL_URL='' SYSFW_HS_DL_URL='' SYSFW_HS_INNER_CERT_DL_URL='' \
- SYSFW_PATH="${SYSFW_TISCI}" SOC=${SYSFW_SOC} CONFIG=${SYSFW_CONFIG} \
+ CROSS_COMPILE=${TARGET_PREFIX} SOC=${SYSFW_SOC} SOC_TYPE=${SYSFW_SUFFIX} \
+ CONFIG=${SYSFW_CONFIG} SYSFW_DIR="${S}/ti-sysfw" \
"
-EXTRA_OEMAKE_HS = " \
- HS=1 SW_REV=1 SYSFW_HS_PATH="${S}/ti-sysfw/${SYSFW_BASE}-enc.bin" SYSFW_HS_INNER_CERT_PATH="${S}/ti-sysfw/${SYSFW_BASE}-cert.bin" \
-"
-EXTRA_OEMAKE_append = "${@['',' ${EXTRA_OEMAKE_HS}']['${SYSFW_SUFFIX}' == 'hs']}"
EXTRA_OEMAKE_append_j7200-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
EXTRA_OEMAKE_append_j7200-hs-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin""
@@ -77,10 +73,19 @@ do_compile() {
do_install() {
install -d ${D}/boot
- install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${D}/boot/${SYSFW_VBINARY}
- ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_IMAGE}
- if [ ! -z "${SYSFW_SYMLINK}" ]; then
- ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_SYMLINK}
+
+ if [ -f "${WORKDIR}/imggen/${SYSFW_BINARY}" ]; then
+ install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${D}/boot/${SYSFW_VBINARY}
+ ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_IMAGE}
+ if [ ! -z "${SYSFW_SYMLINK}" ]; then
+ ln -sf ${SYSFW_VBINARY} ${D}/boot/${SYSFW_SYMLINK}
+ fi
+ fi
+
+ if [ -f "${WORKDIR}/imggen/${UBOOT_BINARY}" ]; then
+ install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
+ ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
+ ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
fi
}
@@ -90,119 +95,21 @@ inherit deploy
do_deploy () {
install -d ${DEPLOYDIR}
- install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${DEPLOYDIR}/${SYSFW_VBINARY}
- rm -f ${DEPLOYDIR}/${SYSFW_IMAGE}
- ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_IMAGE}
- if [ ! -z "${SYSFW_SYMLINK}" ]; then
- rm -f ${DEPLOYDIR}/${SYSFW_SYMLINK}
- ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_SYMLINK}
- fi
-
- install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
-}
-
-do_install_j7200-evm-k3r5() {
- install -d ${D}/boot
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
-}
-
-do_deploy_j7200-evm-k3r5() {
- install -d ${DEPLOYDIR}
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
- install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
-}
-
-do_install_j7200-hs-evm-k3r5() {
- install -d ${D}/boot
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
-}
-
-do_deploy_j7200-hs-evm-k3r5() {
- install -d ${DEPLOYDIR}
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
- install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
-}
-
-do_install_j721s2-evm-k3r5() {
- install -d ${D}/boot
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
-}
-
-do_deploy_j721s2-evm-k3r5() {
- install -d ${DEPLOYDIR}
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
- install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
-}
-
-do_install_j721s2-hs-evm-k3r5() {
- install -d ${D}/boot
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
-}
-
-do_deploy_j721s2-hs-evm-k3r5() {
- install -d ${DEPLOYDIR}
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
- install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
-}
-
-do_install_am64xx-evm-k3r5() {
- install -d ${D}/boot
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
-}
-do_deploy_am64xx-evm-k3r5() {
- install -d ${DEPLOYDIR}
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
- install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
-}
-
-do_install_am64xx-hs-evm-k3r5() {
- install -d ${D}/boot
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
-}
-
-do_deploy_am64xx-hs-evm-k3r5() {
- install -d ${DEPLOYDIR}
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
- install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
-}
+ if [ -f "${WORKDIR}/imggen/${SYSFW_BINARY}" ]; then
+ install -m 644 ${WORKDIR}/imggen/${SYSFW_BINARY} ${DEPLOYDIR}/${SYSFW_VBINARY}
+ ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_IMAGE}
+ if [ ! -z "${SYSFW_SYMLINK}" ]; then
+ ln -sf ${SYSFW_VBINARY} ${DEPLOYDIR}/${SYSFW_SYMLINK}
+ fi
+ fi
-do_install_am62xx-evm-k3r5() {
- install -d ${D}/boot
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${D}/boot/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${D}/boot/${UBOOT_BINARY}
-}
+ if [ -f "${WORKDIR}/imggen/${UBOOT_BINARY}" ]; then
+ install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
+ ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
+ ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
+ fi
-do_deploy_am62xx-evm-k3r5() {
- install -d ${DEPLOYDIR}
- install -m 644 ${WORKDIR}/imggen/${UBOOT_BINARY} ${DEPLOYDIR}/${UBOOT_IMAGE}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_SYMLINK}
- ln -sf ${UBOOT_IMAGE} ${DEPLOYDIR}/${UBOOT_BINARY}
install -m 644 ${SYSFW_TISCI} ${DEPLOYDIR}/
}
--
2.36.1
next prev parent reply other threads:[~2022-08-01 21:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 21:40 [meta-ti][dunfell][PATCH 1/4] conf: machine: Make multi-certificate image the default Andrew Davis
2022-08-01 21:40 ` Andrew Davis [this message]
2022-08-01 21:40 ` [meta-ti][dunfell][PATCH 3/4] ti-sci-fw: Deploy all SYSFW firmware types Andrew Davis
2022-08-01 21:40 ` [meta-ti][dunfell][PATCH 4/4] ti-sci-fw: Use SYSFW_TIBOOT3 to point to the SYSFW image Andrew Davis
2022-08-02 19:47 ` [meta-ti][dunfell][PATCH 1/4] conf: machine: Make multi-certificate image the default Denys Dmytriyenko
2022-08-02 19:57 ` Andrew Davis
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=20220801214007.25463-2-afd@ti.com \
--to=afd@ti.com \
--cc=denys@konsulko.com \
--cc=meta-ti@lists.yoctoproject.org \
--cc=reatmon@ti.com \
/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.