From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web10.15391.1583160855099542263 for ; Mon, 02 Mar 2020 06:54:15 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=feGbo5rO; spf=pass (domain: linaro.org, ip: 209.85.221.66, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f66.google.com with SMTP id y17so7451wrn.6 for ; Mon, 02 Mar 2020 06:54:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=d5zZQDUs8H5bRg1qSO3HIvx/0hp4xFjswsUtNKyTzMQ=; b=feGbo5rO6wuuNcwWfCCHozQyHUvHOzpHt7vuIjoGZS1PsyTpIUV1AS7wFNmMiqkz4P +3IkERd+kxUCuTZGAhyQ/E8rtoazLGKtrwb08ny/5KY7nJ3GcNnTYX/6yY2s3PgKq91+ cnhishZHCunwydAEhvRK+UeK32jh2acY6y8ZvhigWFvcpmrpW1vmBxp/BnX/54XJwQNt ZyIExxyQTI0mfOWwNsJaOWA4PNgOudUt15d4xmt+zYXaYtRCGQrDJbTVoCaHWcibfZ03 9N2zUUixEIuzrbDf8NWnXLMva5Kht2itGR1hHVY1j+FXHgV48PXRqFbofwfhnM+asxQk VbIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d5zZQDUs8H5bRg1qSO3HIvx/0hp4xFjswsUtNKyTzMQ=; b=s7cYpMVfFyxXwVQ/6AmLQExvPbfYxqh/XBokFIH1Tem/Q7BNXx8l7OxuOAVWolG6sJ WTaSQk2QFjHUQW8iSRjTdKG8ZzD+lSdJGAVhLwnzn3N8ma0u0tpIs2yoFFVYrVuGPEil HZ/1BUE9NZXxfhUFY46DceIaam4+Y9NILDvZF9sqDgv+iONqybSqwLEpB2DvTQgAphhs 5slzWyw05e2GN41tw///0RbWB9n1ttKQj5SWXaTmy2Phr6CkUIBLymzlzv+4PuuH6zvY UsEuwlhPDNgCtU09veq8SGA5eXo5u35uD+v/xZt3/HYNyE8Icn/Ol6AC+FzTDX3KP4sF 0ZMA== X-Gm-Message-State: ANhLgQ0JrW3k8eXDGs3elOMR2je/ZSDL0cYXsljneI6NVtEBDTUqbKuQ ym//VSJ6/tJe3U0HBk114tTig6uAKGmQZVVYw+iCOQ== X-Google-Smtp-Source: ADFU+vs3KdHctkcU8vqGPXtVXtmj4C9rKylqmTAf9Ch54/hfmAME54UnPVX/U6A0/qwUJglYaUdPPlSIMa+NH6s87yo= X-Received: by 2002:a5d:6051:: with SMTP id j17mr2744779wrt.151.1583160853671; Mon, 02 Mar 2020 06:54:13 -0800 (PST) MIME-Version: 1.0 References: <20200302144219.10452-1-pete@akeo.ie> <20200302144219.10452-2-pete@akeo.ie> In-Reply-To: <20200302144219.10452-2-pete@akeo.ie> From: "Ard Biesheuvel" Date: Mon, 2 Mar 2020 15:54:02 +0100 Message-ID: Subject: Re: [edk2-devel][RESEND][PATCH 1/2] Platform/RPi4: allow overriding TF-A binaries during build To: Pete Batard Cc: edk2-devel-groups-io , Leif Lindholm , Andrei Warkentin Content-Type: text/plain; charset="UTF-8" On Mon, 2 Mar 2020 at 15:42, Pete Batard wrote: > > 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 Do we really need this patch? For development, you can put anything you want here. For doing releases, I'd expect edk2-platforms to be in sync with edk2-non-osi, given that there are more blobs there than TF-A, right? > --- > 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 = 0x8000004F > DEFINE ACPI_BASIC_MODE_ENABLE = FALSE > > +!ifndef TFA_BUILD_ARTIFACTS > + # > + # Default TF-A binary checked into edk2-non-osi. > + # > + DEFINE TFA_BUILD_BL31 = Platform/RaspberryPi/$(PLATFORM_NAME)/TrustedFirmware/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 copy > + # operations ends up being very helpful. > + # > + DEFINE TFA_BUILD_BL31 = $(TFA_BUILD_ARTIFACTS)/bl31.bin > +!endif > + > ################################################################################ > # > # Library Class section - list of all Library Classes needed by this Platform. > 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 = Platform/RaspberryPi/$(PLATFORM_NAME)/TrustedFirmware/bl31_pl011.bin > +FILE = $(TFA_BUILD_BL31) > > # > # DTB. > -- > 2.21.0.windows.1 >