From patchwork Wed May 15 16:03:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 43626 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 1A244C25B7B for ; Wed, 15 May 2024 16:03:24 +0000 (UTC) Received: from smtp-bc0d.mail.infomaniak.ch (smtp-bc0d.mail.infomaniak.ch [45.157.188.13]) by mx.groups.io with SMTP id smtpd.web10.20586.1715789001732301016 for ; Wed, 15 May 2024 09:03:22 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: 0leil.net, ip: 45.157.188.13, mailfrom: foss+yocto@0leil.net) Received: from smtp-3-0000.mail.infomaniak.ch (smtp-3-0000.mail.infomaniak.ch [10.4.36.107]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4VfdLJ2R41zbt8; Wed, 15 May 2024 18:03:20 +0200 (CEST) Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4VfdLJ0834zXcL; Wed, 15 May 2024 18:03:19 +0200 (CEST) From: Quentin Schulz Date: Wed, 15 May 2024 18:03:00 +0200 Subject: [PATCH meta-rockchip v2 06/16] bsp: u-boot: rework BL31 in EXTRA_OEMAKE MIME-Version: 1.0 Message-Id: <20240515-rk3588-family-v2-6-f81897a3ac50@cherry.de> References: <20240515-rk3588-family-v2-0-f81897a3ac50@cherry.de> In-Reply-To: <20240515-rk3588-family-v2-0-f81897a3ac50@cherry.de> To: Quentin Schulz , yocto-patches@lists.yoctoproject.org X-Mailer: b4 0.13.0 X-Infomaniak-Routing: alpha 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 ; Wed, 15 May 2024 16:03:24 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/146 From: Quentin Schulz By making use of the newly added rockchip MACHINEOVERRIDES as well as SOC_FAMILY, the logic can be drastically simplified in addition to not needing to update BL31 for new SoCs. Signed-off-by: Quentin Schulz --- recipes-bsp/u-boot/u-boot_%.bbappend | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/recipes-bsp/u-boot/u-boot_%.bbappend b/recipes-bsp/u-boot/u-boot_%.bbappend index a83179a..7e0d1d1 100644 --- a/recipes-bsp/u-boot/u-boot_%.bbappend +++ b/recipes-bsp/u-boot/u-boot_%.bbappend @@ -3,21 +3,15 @@ DEPENDS:append = " python3-pyelftools-native" DEPENDS:append:rk3308 = " u-boot-tools-native" DEPENDS:append:rock-pi-4 = " gnutls-native" -EXTRA_OEMAKE:append:px30 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-px30.elf" -EXTRA_OEMAKE:append:rk3308 = " \ - BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3308.elf \ - ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3308.bin \ - " -EXTRA_OEMAKE:append:rk3328 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3328.elf" -EXTRA_OEMAKE:append:rk3399 = " BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3399.elf" -EXTRA_OEMAKE:append:rk3568 = " \ - BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3568.elf \ - ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3568.bin \ - " -EXTRA_OEMAKE:append:rk3588s = " \ - BL31=${DEPLOY_DIR_IMAGE}/bl31-rk3588.elf \ - ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin \ - " +BL31:rockchip:aarch64 = "${DEPLOY_DIR_IMAGE}/bl31-${SOC_FAMILY}.elf" +# SOC_FAMILY for RK3588S is rk3588s but it should use the binaries from rk3588 +BL31:rk3588s = "${DEPLOY_DIR_IMAGE}/bl31-rk3588.elf" +EXTRA_OEMAKE:append:rockchip:aarch64 = " BL31=${BL31}" + +# No open-source TPL (yet) +EXTRA_OEMAKE:append:rk3308 = " ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3308.bin" +EXTRA_OEMAKE:append:rk3568 = " ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3568.bin" +EXTRA_OEMAKE:append:rk3588s = " ROCKCHIP_TPL=${DEPLOY_DIR_IMAGE}/ddr-rk3588.bin" INIT_FIRMWARE_DEPENDS ??= "" INIT_FIRMWARE_DEPENDS:px30 = " trusted-firmware-a:do_deploy"