From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (NAM02-SN1-obe.outbound.protection.outlook.com [40.107.77.79]) by mx.groups.io with SMTP id smtpd.web10.8980.1583116438134339787 for ; Sun, 01 Mar 2020 18:33:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@vmware.com header.s=selector2 header.b=N9Mv0RV6; spf=pass (domain: vmware.com, ip: 40.107.77.79, mailfrom: awarkentin@vmware.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OZ5sJswkwcUGD9MD8qPfSZWesyrEnPt5AJfKQajJ4QroBIaPRF1+tysTOac4jZLR4npuG01zbjikbPVQSaDZU/QOBfhZYR29D7IEdx+Xw58MsrKl1fOW6asLuw86/CDy6y0PiJmUYD9CYq3/RrPcm3tBR0ZNi5LjMDZwau0jZ4bzI1RZsqJUcS7I8wWZ7yBKlmkMuf+XPu6avO00f5URdIyny/gOP7GjzXkCziP96Q+4r7qxgzUKJ4+N03WwR7mWL/gl30X1I2JsYEc85PIOEfaJ4CbccwSN+jwYAKBy1T4K4STO3ej0t8zUe8tvjccNK4Xu87f9O+5taVyeFp0LkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UIxE7dPDfxGE4tszdTbPFgRohezkwezSqLEfnKmWi7s=; b=iK5hzPny3ipP7KFQCQdzlBUqfCcjRA9hAnLCqXuhONe37uqO3YpxFpfFrRtRO7S93vVu+sVZaElRe+BNk6fJJ7yDBMpq8SN6lveRVLLp6loqA+XzFaEK5kgchTpRnXzV5wIDZY7ls4ZCU6sKOr/Czk0bHeFlWaXGOKQYl90VfGiqrHUaM/mYhSK4rajFvHGnFY/jV61suHqalfJqVgFvD/MXrsNPcIgI7hK4LIPU7J3rU2wdkbrlu7b0r0wqUaVnLCUsOOpdWIO+hjuD+Gncwz733haELDuxutmgcSlvP3yYPwsBmLG3JQPGsSdXZ7BGP3gJJHAs82h8QqF58vUSag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UIxE7dPDfxGE4tszdTbPFgRohezkwezSqLEfnKmWi7s=; b=N9Mv0RV671bt7hCCYz9OWYEv1e5DErEqph6pb0nd98yTHBoWHvzsrd2WkZTm7SH72TKFQSR7nYWc6IpVSezjoytbxsIWxb5qW0u3a1c86q9GC4HsLka+dTCa5OJUjddvPQ3fANGR7TzgCKV1a1YnoZqHOkPKcCE6QdE0MfGtqNg= Received: from BN6PR05MB3411.namprd05.prod.outlook.com (2603:10b6:405:43::23) by BN6PR05MB3026.namprd05.prod.outlook.com (2603:10b6:404:2b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.5; Mon, 2 Mar 2020 02:33:56 +0000 Received: from BN6PR05MB3411.namprd05.prod.outlook.com ([fe80::5df3:40e3:521a:7f84]) by BN6PR05MB3411.namprd05.prod.outlook.com ([fe80::5df3:40e3:521a:7f84%5]) with mapi id 15.20.2793.011; Mon, 2 Mar 2020 02:33:56 +0000 Received: from ubuntu.localdomain (24.147.160.127) by SN4PR0501CA0034.namprd05.prod.outlook.com (2603:10b6:803:40::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2793.9 via Frontend Transport; Mon, 2 Mar 2020 02:33:55 +0000 From: awarkentin@vmware.com To: "devel@edk2.groups.io" CC: Andrei Warkentin Subject: [PATCH] Platform/RPi4: allow overriding TF-A binaries during build Thread-Topic: [PATCH] Platform/RPi4: allow overriding TF-A binaries during build Thread-Index: AQHV8DsFxFXT/KAJnkuRNwr6ID1vzw== Date: Mon, 2 Mar 2020 02:33:56 +0000 Message-ID: <20200302023315.46048-1-awarkentin@vmware.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [24.147.160.127] x-clientproxiedby: SN4PR0501CA0034.namprd05.prod.outlook.com (2603:10b6:803:40::47) To BN6PR05MB3411.namprd05.prod.outlook.com (2603:10b6:405:43::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=awarkentin@vmware.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c8423ccf-c16c-455a-263d-08d7be5227e0 x-ms-traffictypediagnostic: BN6PR05MB3026:|BN6PR05MB3026: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 033054F29A x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(366004)(346002)(136003)(396003)(376002)(189003)(199004)(5660300002)(16526019)(6486002)(8936002)(81166006)(52116002)(186003)(81156014)(4326008)(8676002)(478600001)(956004)(6512007)(966005)(1076003)(2616005)(107886003)(6506007)(66946007)(36756003)(19627235002)(71200400001)(316002)(66476007)(26005)(66556008)(86362001)(2906002)(6916009)(64756008)(66446008);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR05MB3026;H:BN6PR05MB3411.namprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NjPySaqp8+Ty4lP9vh24qxTBOkuE7VzdtKjVwd2tlaP/6ChJkAeXWGBNzkn36ZuYNYVHeYn8ieF+r7BcCnTQSFhQp6RURFz7/uetShakQdzVVGey2f/Bi6xuiazSgML7+3N1huKKZBVcdlTGS+tcH4LqcyoJnPLvl9PqU98WdoS7+AJ3kffu7UahpxoJQKCalZjEvlkfM6YnU5jAfmBQ7RHtx+lFOF2IJ47uYJBTTShJ91zF6waHa9m9JnBXIZbCQbPb6+4BUSoojPPoMw9sRK+vtNxebA/a1YtiBJ97dofBMlhpkShDDgkRLEfN0vYwPJx4i2iCLMJdhcJ1JMUZ5ORiFF+y6WPEZi7X1K/lKdICi3fTsve1G0Rc5LmwER3YT6WbFkjX6rh97TqcyliQP/JVZWy4o9X68dRCM/D5VxMBxCZ8JugjR/Hb0T6QA5+AlweIetTZQmtrx18yyYJ730cxBMiqZKWyQDgjZX4/03DaCObaBInKRgCNKIbhVL8FUVX23hqYR5rzgYv+92kVrw== x-ms-exchange-antispam-messagedata: 68IbPWSkCyVPGgRR4A4t7VbcTsvapyCjEXxV5otWQHZkgPfoS2hNgCxlPQ/P8NZzyAKvPs4wZWphL5x8bJ6OEVJXSj4wMT+kqFmn+iucDRiUSgxhReHmvKKwsXzXGkl3qNAMRkW0QbDvgXRHifnaNQ== MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8423ccf-c16c-455a-263d-08d7be5227e0 X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2020 02:33:56.5159 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xWsP6E0kq9FIQ9ns/RglJiVEfXWrPy8esxFOV/UrzdWzFyMgOZMnzp0NSMf2AveSH8WEUv2yxzL8Uy7R5Uc38Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR05MB3026 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 7c19376725..9af472d3f0 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.dsc +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc @@ -40,6 +40,20 @@ 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 52ae1e5b65..5356cfd4b3 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.fdf +++ b/Platform/RaspberryPi/RPi4/RPi4.fdf @@ -51,7 +51,7 @@ NumBlocks =3D 0x200 # 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.17.1