From patchwork Tue Sep 13 03:54:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 12642 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C602C6FD23 for ; Tue, 13 Sep 2022 03:55:55 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web10.833.1663041348006721351 for ; Mon, 12 Sep 2022 20:55:48 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id EFD4140D8B for ; Tue, 13 Sep 2022 03:55:45 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fCP8oMalvh0a for ; Tue, 13 Sep 2022 03:55:45 +0000 (UTC) Received: from mail.denix.org (pool-100-15-80-88.washdc.fios.verizon.net [100.15.80.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id D681740D8A for ; Tue, 13 Sep 2022 03:55:43 +0000 (UTC) Received: from thorin.denix (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id 6BA3C1749DC for ; Mon, 12 Sep 2022 23:55:40 -0400 (EDT) From: Denys Dmytriyenko To: meta-ti@lists.yoctoproject.org Subject: [master/kirkstone][PATCH 16/65] j721s2-hs: changes to support new hs platform Date: Tue, 13 Sep 2022 03:54:52 +0000 Message-Id: <20220913035541.2364351-17-denis@denix.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220913035541.2364351-1-denis@denix.org> References: <20220913035541.2364351-1-denis@denix.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 13 Sep 2022 03:55:55 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-ti/message/15044 From: Jayesh Choudhary Changes to support new j721s2-hs platform in: 1) ti-sci-fw_git: Update firmware prefix for j721s2-hs 2) atf: sign the image 3) u-boot: Add u-boot-spl image for combined boot image 4) optee: sign the image Signed-off-by: Jayesh Choudhary Signed-off-by: Ryan Eatmon Signed-off-by: Denys Dmytriyenko --- .../recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb | 18 ++++++++++++++++++ .../trusted-firmware-a_%.bbappend | 8 ++++++++ meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc | 6 ++++++ .../recipes-security/optee/optee-os_%.bbappend | 4 ++++ 4 files changed, 36 insertions(+) diff --git a/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb b/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb index 530b25b8..6a381447 100644 --- a/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb +++ b/meta-ti-bsp/recipes-bsp/ti-sci-fw/ti-sci-fw_git.bb @@ -4,6 +4,7 @@ DEPENDS = "openssl-native u-boot-mkimage-native dtc-native" DEPENDS:append:j7200-evm-k3r5 = " virtual/bootloader" DEPENDS:append:j7200-hs-evm-k3r5 = " virtual/bootloader" DEPENDS:append:j721s2-evm-k3r5 = " virtual/bootloader" +DEPENDS:append:j721s2-hs-evm-k3r5 = " virtual/bootloader" DEPENDS:append:am64xx-evm-k3r5 = " virtual/bootloader" DEPENDS:append:am64xx-hs-evm-k3r5 = " virtual/bootloader" DEPENDS:append:am62xx-evm-k3r5 = " virtual/bootloader" @@ -30,6 +31,7 @@ SYSFW_PREFIX:j721e-hs-evm-k3r5-sr1-1 = "ti-fs-firmware" SYSFW_PREFIX:j7200-evm-k3r5 = "ti-fs-firmware" SYSFW_PREFIX:j7200-hs-evm-k3r5 = "ti-fs-firmware" SYSFW_PREFIX:j721s2-evm-k3r5 = "ti-fs-firmware" +SYSFW_PREFIX:j721s2-hs-evm-k3r5 = "ti-fs-firmware" SYSFW_PREFIX:am62xx-evm-k3r5 = "ti-fs-firmware" SYSFW_SUFFIX ?= "unknown" @@ -63,6 +65,7 @@ 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"" EXTRA_OEMAKE:append:j721s2-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" +EXTRA_OEMAKE:append:j721s2-hs-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" EXTRA_OEMAKE:append:am64xx-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" EXTRA_OEMAKE:append:am64xx-hs-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" EXTRA_OEMAKE:append:am62xx-evm-k3r5 = " SBL="${STAGING_DIR_HOST}/boot/u-boot-spl.bin"" @@ -143,6 +146,21 @@ do_deploy:j721s2-evm-k3r5() { 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} diff --git a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend index 45d56451..6254d09e 100644 --- a/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend +++ b/meta-ti-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend @@ -42,3 +42,11 @@ do_compile:append:j7200-hs-evm() { ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ ) } + +do_compile:append:j721s2-hs-evm() { + export TI_SECURE_DEV_PKG=${TI_SECURE_DEV_PKG} + ( cd ${B}/${BUILD_DIR}/release/; \ + mv bl31.bin bl31.bin.unsigned; \ + ${TI_SECURE_DEV_PKG}/scripts/secure-binary-image.sh bl31.bin.unsigned bl31.bin; \ + ) +} diff --git a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc index dddf6284..f470c95e 100644 --- a/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc +++ b/meta-ti-bsp/recipes-bsp/u-boot/u-boot-ti.inc @@ -59,6 +59,7 @@ SPL_UART_BINARY:lego-ev3 = "" SPL_UART_BINARY:j7200-evm-k3r5 = "u-boot-spl.bin" SPL_UART_BINARY:j7200-hs-evm-k3r5 = "u-boot-spl.bin" SPL_UART_BINARY:j721s2-evm-k3r5 = "u-boot-spl.bin" +SPL_UART_BINARY:j721s2-hs-evm-k3r5 = "u-boot-spl.bin" SPL_UART_BINARY:am64xx-evm-k3r5 = "u-boot-spl.bin" SPL_UART_BINARY:am64xx-hs-evm-k3r5 = "u-boot-spl.bin" SPL_UART_BINARY:am62xx-evm-k3r5 = "u-boot-spl.bin" @@ -277,6 +278,11 @@ do_deploy:append:j721s2-evm-k3r5 () { mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true } +do_deploy:append:j721s2-hs-evm-k3r5 () { + mv ${DEPLOYDIR}/tiboot3.bin ${DEPLOYDIR}/tiboot3-r5spl.bin || true + mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true +} + do_deploy:append:am64xx-evm-k3r5 () { mv ${DEPLOYDIR}/tiboot3.bin ${DEPLOYDIR}/tiboot3-r5spl.bin || true mv ${DEPLOYDIR}/u-boot-spl.bin ${DEPLOYDIR}/u-boot-spl-r5spl.bin || true diff --git a/meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend b/meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend index 6097580f..d55bbc90 100644 --- a/meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend +++ b/meta-ti-bsp/recipes-security/optee/optee-os_%.bbappend @@ -63,6 +63,10 @@ do_compile:append:j7200-hs-evm() { optee_sign_k3hs } +do_compile:append:j721s2-hs-evm() { + optee_sign_k3hs +} + do_install:append:ti-soc() { install -m 644 ${B}/*.optee ${D}${nonarch_base_libdir}/firmware/ || true install -m 644 ${B}/bl32.bin ${D}${nonarch_base_libdir}/firmware/ || true