From nobody Tue Feb 10 04:16:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+55213+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55213+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1583160157; cv=none; d=zohomail.com; s=zohoarc; b=Rcl2TLZH+bCTEcG2eAViniLfYFirqsaJn8J+ig+ln/2RRNR95VKD5ZE0BLfogmQUiL7//kRK7sOdToQRM6V3fyhURG++ZLztddNzjhsoeS/0afaO7nfY1wpo+UxX2dg+v9rOos0I8q3c694M2SNxQCnKlwym2ktpcBi1A7fSFuA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583160157; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=idfH2c399ueTpgTbPI3gYEKKvrBEnJ5QxgXDWcLdMuk=; b=mA+bzTlej9S2ym1w5e3kWfzoDcuLd0kcpXrb3MSSOFulaRTIBupuhMFtrarFZ65P9SNw4EO9e+WzR8tUbPRyRGZ1dvOSC4NJuNuAKoy/99WAlo5vGefHdbSkRqcn5blNZaG1E6wBSUNTyiMT+NI8lgfOtHqH6t4x/G8LlQV8KX0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55213+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 158316015762545.37105613276174; Mon, 2 Mar 2020 06:42:37 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id JQhRYY1788612x7hMhFokfIJ; Mon, 02 Mar 2020 06:42:35 -0800 X-Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mx.groups.io with SMTP id smtpd.web11.15105.1583160154537031700 for ; Mon, 02 Mar 2020 06:42:34 -0800 X-Received: by mail-wr1-f50.google.com with SMTP id v4so12891356wrs.8 for ; Mon, 02 Mar 2020 06:42:34 -0800 (PST) X-Gm-Message-State: su6bXbbvTxKcfASi774XtR6Xx1787277AA= X-Google-Smtp-Source: APXvYqyHaZl+i4fc2tI6h2pEbl0nbHjhD4XMSh9a/34G+Sxn/toGcehwjBvz6Lmh0q9hK9NaocDqcg== X-Received: by 2002:adf:ed4c:: with SMTP id u12mr24216314wro.204.1583160152849; Mon, 02 Mar 2020 06:42:32 -0800 (PST) X-Received: from localhost.localdomain ([84.203.56.244]) by smtp.gmail.com with ESMTPSA id h10sm16366125wml.18.2020.03.02.06.42.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Mar 2020 06:42:32 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, awarkentin@vmware.com Subject: [edk2-devel][RESEND][PATCH 1/2] Platform/RPi4: allow overriding TF-A binaries during build Date: Mon, 2 Mar 2020 14:42:18 +0000 Message-Id: <20200302144219.10452-2-pete@akeo.ie> In-Reply-To: <20200302144219.10452-1-pete@akeo.ie> References: <20200302144219.10452-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1583160155; bh=VPl3YCEQur1UklVtpn5bDvX53VJ67ESCvQC40C3xTzQ=; h=Cc:Date:From:Reply-To:Subject:To; b=jgr+d6OD9hgkt0wjICFIPUWBc2oWuPMFBY3CSuc32P+2ERcUY/PoS0RNVJRRayQosHG LldRh7h8p4O+adftyNk7DExquucUIHvI4wjqzz2VAlifZB/9AJ52AWX8aM18nCyQHZrOO 3eBT8KEsxcQgnUQ2cbL3cyjLJDvsi0avXxE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Andrei Warkentin For PFTF developers working on the firmware, being able to use a local TF-A build without extra extra copy operations ends up being very helpful. This can be accomplished via a TFA_BUILD_ARTIFACTS option passed to the edk2 build tool. If/when the Pi 3 and 4 DSC/FDFs become unified, this will be even more important to trivially perform a full clean upstream build for either platform, without having to worry about different TF-A deliverables - Pi 4 uses bl31.bin, while Pi 3 uses fip.bin and bl1.bin. A similar Pi 3 patch to follow. The context for this is the community Raspberry Pi 4 firmware project (https://https://rpi4-uefi.dev, https://github.com/pftf), which you might have heard already about from Pete Batard, who upstreamed much of my previous Pi 3 and Pi 4 enablement patches. Signed-off-by: Andrei Warkentin Reviewed-by: Ard Biesheuvel --- Platform/RaspberryPi/RPi4/RPi4.dsc | 14 ++++++++++++++ Platform/RaspberryPi/RPi4/RPi4.fdf | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4= /RPi4.dsc index c039f6df2eb4..1d38f4ab051d 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.dsc +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc @@ -40,6 +40,20 @@ [Defines] DEFINE DEBUG_PRINT_ERROR_LEVEL =3D 0x8000004F DEFINE ACPI_BASIC_MODE_ENABLE =3D FALSE =20 +!ifndef TFA_BUILD_ARTIFACTS + # + # Default TF-A binary checked into edk2-non-osi. + # + DEFINE TFA_BUILD_BL31 =3D Platform/RaspberryPi/$(PLATFORM_NAME)/TrustedF= irmware/bl31_pl011.bin +!else + # + # Usually we use the checked-in binaries, but for developers working + # on the firmware, being able to use a local TF-A build without extra co= py + # operations ends up being very helpful. + # + DEFINE TFA_BUILD_BL31 =3D $(TFA_BUILD_ARTIFACTS)/bl31.bin +!endif + ##########################################################################= ###### # # Library Class section - list of all Library Classes needed by this Platf= orm. diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4= /RPi4.fdf index b2a6ac9e6c66..8e2d6fd49a9d 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.fdf +++ b/Platform/RaspberryPi/RPi4/RPi4.fdf @@ -51,7 +51,7 @@ [FD.RPI_EFI] # ATF primary boot image # 0x00000000|0x00020000 -FILE =3D Platform/RaspberryPi/$(PLATFORM_NAME)/TrustedFirmware/bl31_pl011.= bin +FILE =3D $(TFA_BUILD_BL31) =20 # # DTB. --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55213): https://edk2.groups.io/g/devel/message/55213 Mute This Topic: https://groups.io/mt/71676028/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-