From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=hW+N9qnG; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.221.50, mailfrom: pete@akeo.ie) Received: by mail-wr1-f50.google.com with SMTP id v4so12891356wrs.8 for ; Mon, 02 Mar 2020 06:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OHK6vLVgpGAChClp91G3+xLYPbwQ7Cw0s8G+Qg/NSbQ=; b=hW+N9qnGQBt4T5JIH0Sr3HlWPQLS0VGCQy/ty0/X0RDGVGqEfYLZHZ6UHeIVctW99J ZNRefTBQYVf/dRLI124efY7XeaM2vTn+Tkf3Q7iwJB3pGFCPQVdr2UcYPKd2u5uMB6on SBYWkbYBLIRVM45o87OL/IANUE/txJ0FYpRfJXM+6aXtALAhpjHdYBiG04ad0PmykUA6 M9BDvVZj/dqXdNC49alybNCxgecP3oAXJ+pg5vMeM0RmuUIrkC93h63ePqq9OEDYs4tn EMfjIsVL3AOTGd113hI6OmTiUcLq8U60rpgtIus7Ahy9+IuWXP5Ib0dl8RwAbVRjzLkc T5jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OHK6vLVgpGAChClp91G3+xLYPbwQ7Cw0s8G+Qg/NSbQ=; b=EFZlfeKQ5cN3KYHp7mWB/5Wj7wkveU/jy2a/h+5RAHA+by2tiGu4UPxbq3/bJug0sa UjE3RPucVof6+t4p5rr2k77CEwK9E5LQIcb6yKewFrZWfsxIQjSaKAs6xYm2LVRAfMZS BUbLmXhnKsFB4w+CGSANdipZLSE8HJ1w9OrftBdncI2O7keHsSi1A1G8tyVfOvcM9enJ S8gKlMMw6ShpDTWJSP4+ho/6a3RdUtKEEPfwFg6HBto4PC3LKr/dQWhzlLjN3N3KCQRO ou5ETK1KOtOU8mwTrV5shsOlumnSzpVDALxXZGJMc34QFxEwXyE554FQgw+wU+Leejva x9gA== X-Gm-Message-State: APjAAAVt3OFB5aM5Bh/Hmoh6q7VnrC5C8VBGjLSmarsEkhEUJyXAXg9+ 60QX0PzR1RdbR4bg5laaI8Y8Cqc0yQY= 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) Return-Path: 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> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200302144219.10452-1-pete@akeo.ie> References: <20200302144219.10452-1-pete@akeo.ie> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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