From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::231; helo=mail-wm0-x231.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 6F29021F38854 for ; Tue, 17 Oct 2017 11:19:14 -0700 (PDT) Received: by mail-wm0-x231.google.com with SMTP id t69so5617683wmt.2 for ; Tue, 17 Oct 2017 11:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ePIvxTDu7UbXx8Q0woG0ax9pj913bDru6/VTH1kUqyU=; b=NHvz7R811vnB/Z70jOTAT+Jfo594ZlQozfYI1b9gvLmQtWS5l0KTM43QtMhXutCOGE G26WmWjU7nMEh+ZgTUkCduDLD7v+E0CwK1NT5Nxp76ljIVfJjO1wmJBQCZAWaNpOfJ5Z D9TKmSojxxKnYovtEghmvr3FRCu9QP5VrmZUQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ePIvxTDu7UbXx8Q0woG0ax9pj913bDru6/VTH1kUqyU=; b=p1jTAGwXMOEicnC9cZMWaO6b+KxXU5WE7BR/6PhxL4xsmrAqWSwrYGKjE8/Gp1GI8H eOP/yWUo5G3Ke0Y4geD/GOOwzj/e8vR1XF+AGXQAa1lVbjIFDuBKwzA//CLTJuMtky0S WOcOVGnDBuMAMuwtPvrLEs+Pjv2etVcOK7YJSe/UlQZZizt1LIgQBU+8Dtp1d0fX9SDW eX1mkhVWmnVEcimzZgF8I74xMk+905uGS/m0BlidAxuASL/LszS5MFmzRTSJ/jtoFofD toK+yJapezVhRrYC5pYjMp1J6UNhQuMkTkfXsoIfRzIbtaat+Nic4yyjZrdpP2AGe3s+ Vp+g== X-Gm-Message-State: AMCzsaUThoEmo5duOqQzmUU74usjOEOn1R6yL31FwACaRS6Npg45rphN xabMv5UoWO1++IU8fe93RDjuUQ== X-Google-Smtp-Source: ABhQp+Sk4U4OpWfJUdr1sUFxXjjfUlcwsh49+g5d+CK2zUMggQmPGa/ARPcjHNqnUPVX80rPhsib3g== X-Received: by 10.28.153.206 with SMTP id b197mr4927280wme.60.1508264568381; Tue, 17 Oct 2017 11:22:48 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id 31sm6901744wrm.0.2017.10.17.11.22.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Oct 2017 11:22:47 -0700 (PDT) Date: Tue, 17 Oct 2017 19:22:45 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, alan@softiron.co.uk Message-ID: <20171017182245.5xqd2uj6mf6swr4c@bivouac.eciton.net> References: <20171016163413.15051-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20171016163413.15051-1-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH] Platforms/AMD/OverDrive: make capsule support conditional X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2017 18:19:14 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Oct 16, 2017 at 05:34:13PM +0100, Ard Biesheuvel wrote: > The signed capsule update support added to the Overdrive platform in > a recent patch inadvertently introduced a dependency on the external > OpenSSL library, which many users may not have installed into their > EDK2 tree by default. So add a DO_CAPSULE variable that defaults to > FALSE, and only build the capsule pieces if it is set to TRUE. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel Thanks! Reviewed-by: Leif Lindholm Pushed as a9ec390fe8. > --- > Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 9 +++++++++ > Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 9 ++++++++- > 2 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc > index a15f96d2fba9..8620f6be3514 100644 > --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc > +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc > @@ -23,6 +23,7 @@ DEFINE DO_PSCI = 1 > DEFINE DO_ISCP = 1 > DEFINE DO_KCS = 1 > DEFINE DO_FLASHER = FALSE > +DEFINE DO_CAPSULE = FALSE > > PLATFORM_NAME = Overdrive > PLATFORM_GUID = B2296C02-9DA1-4CD1-BD48-4D4F0F1276EB > @@ -124,6 +125,7 @@ DEFINE DO_FLASHER = FALSE > RealTimeClockLib|Silicon/AMD/Styx/Library/RealTimeClockLib/RealTimeClockLib.inf > > CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf > +!if $(DO_CAPSULE) == TRUE > BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf > OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf > @@ -131,6 +133,7 @@ DEFINE DO_FLASHER = FALSE > FmpAuthenticationLib|SecurityPkg/Library/FmpAuthenticationLibPkcs7/FmpAuthenticationLibPkcs7.inf > IniParsingLib|SignedCapsulePkg/Library/IniParsingLib/IniParsingLib.inf > PlatformFlashAccessLib|Silicon/AMD/Styx/Library/StyxPlatformFlashAccessLib/StyxPlatformFlashAccessLib.inf > +!endif > > UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf > PlatformBootManagerLib|ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf > @@ -507,6 +510,8 @@ DEFINE DO_FLASHER = FALSE > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0x0 > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0x0 > > +!if $(DO_CAPSULE) == TRUE > + > [PcdsDynamicExDefault.common.DEFAULT] > gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor|{0x0}|VOID*|0x100 > > @@ -516,6 +521,8 @@ DEFINE DO_FLASHER = FALSE > # d34b3d29-0085-4ab3-8be8-84188cc50489 > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid|{0x29, 0x3d, 0x4b, 0xd3, 0x85, 0x0, 0xb3, 0x4a, 0x8b, 0xe8, 0x84, 0x18, 0x8c, 0xc5, 0x04, 0x89} > > +!endif > + > [PcdsDynamicHii] > gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|5 > > @@ -763,6 +770,7 @@ DEFINE DO_FLASHER = FALSE > } > !endif > > +!if $(DO_CAPSULE) == TRUE > # > # Firmware update > # > @@ -770,3 +778,4 @@ DEFINE DO_FLASHER = FALSE > SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf > SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf > Platform/AMD/OverdriveBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf > +!endif > diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf > index 18f74b3c46fe..867523da3638 100644 > --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf > +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.fdf > @@ -249,11 +249,13 @@ READ_LOCK_STATUS = TRUE > # > INF Silicon/AMD/Styx/Drivers/StyxRngDxe/StyxRngDxe.inf > > +!if $(DO_CAPSULE) == TRUE > # > # Firmware update > # > INF MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf > INF SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf > +!endif > > [FV.STYX_EFI] > FvAlignment = 16 > @@ -283,8 +285,10 @@ READ_LOCK_STATUS = TRUE > INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf > INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf > INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf > - INF RuleOverride = FMP_IMAGE_DESC Platform/AMD/OverdriveBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf > > +!if $(DO_CAPSULE) == TRUE > + INF RuleOverride = FMP_IMAGE_DESC Platform/AMD/OverdriveBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf > +!endif > > FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { > SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE { > @@ -292,6 +296,8 @@ READ_LOCK_STATUS = TRUE > } > } > > +!if $(DO_CAPSULE) == TRUE > + > [FV.CapsuleDispatchFv] > FvAlignment = 16 > ERASE_POLARITY = 1 > @@ -359,6 +365,7 @@ CAPSULE_HEADER_INIT_VERSION = 0x1 > > FMP_PAYLOAD = FmpPayloadSystemFirmwarePkcs7 > > +!endif > > ################################################################################ > # > -- > 2.11.0 >