From patchwork Mon Oct 16 16:34:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 115927 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp3883007qgn; Mon, 16 Oct 2017 09:34:28 -0700 (PDT) X-Received: by 10.99.165.73 with SMTP id r9mr8774109pgu.437.1508171668792; Mon, 16 Oct 2017 09:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508171668; cv=none; d=google.com; s=arc-20160816; b=DfX15FbxR60fz1/Mwq8kZJj3ElmsPt96l3K9hD2JVxcAdEZoqg5qPNwxGJ9k4jUltl oVnpTE8C3U+AegDrctRGhmTcYa/x8Ej8j5X2lOL9bvMjsiwAQJLjbUginXi2DNHsPs1t 3o6/0yDq/Fs/IjmHN2zltDGUD6uePKID1bdYo1wfHbier6uSkalU0k4Xm8V84z+wF2FF J8OVyCIOqhCnpuUhp6dMAQFoLbvKHVJ8sSS5VXuu9zKp5YtooA4os/PrD42YHBtUZ12j ZSErxs2OW6R47j+HZxEaqP8UQX1TZPtud2wdVZ7Hbr2fW/X50NCadncx8U1fL4HLkOBn fwbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=UkQM4qX5PSGlzHFyyTTy6ffuaSHZc+XBNy11BZYoyFg=; b=BPFNcwrAxiwJ1aj3WikwDOM9sBLA8rJik/SpJ43pBDF4X1KOq5YKVAoyVAo+fDggH/ 6Rpo43n7JuJT3/hveM8q7+I354Flr8Q1wrImlByrnTqGEUdeG1N36NqAZzDdW67nl83L XnAEgja16fDX8TwyhW1aF3LC8YiiXiXCfVO9Albay2vSnyACLrsP2ekiZLxH5L1ATx2R HyttXCayjf6q1qpcTYq2eOCKT6v61TRMWj2zlklqH4obBk8+9joqZ1Mw+cep77hp6ypq 7Xecvdx2Wpyqysa1vYEO8ISyk+g8FusoMVHpkhtLHYIqTPikznjcOjKp57RQ6ojzJKTq UKBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TZfKqTgv; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id w6si4282025pgb.291.2017.10.16.09.34.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Oct 2017 09:34:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TZfKqTgv; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 08690202E6170; Mon, 16 Oct 2017 09:30:53 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::233; helo=mail-wm0-x233.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (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 891D4202E6152 for ; Mon, 16 Oct 2017 09:30:51 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id l68so5156683wmd.5 for ; Mon, 16 Oct 2017 09:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=av2rbWVl8Vs7Hic39z3XyxWbNHUFyElZPdRubiO/vh0=; b=TZfKqTgvf9916X66/t6YfDZCZNtrjz1XefV/bVfO+rCF67Rwxlzp66S5QQe3h87Uz/ d+38Lwp7c6UjkEM+yhBco6L6PtpJzBdQ7zuxHWiUuTlfDB+QqiJONp6IaJkICXlBapMc v7m/UK7G8G0D1Qc2opvWZCHAULmbR0CpvKHiA= 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; bh=av2rbWVl8Vs7Hic39z3XyxWbNHUFyElZPdRubiO/vh0=; b=dZRA2tsalUZgaC30Jwzd+gUFpFnqofH5ktRhG4lwn8hE3AtXP3IpwCuLH4Lr0Qlilx EQuXTLtuR5OX2+SyttEhYoVnjPFRCG/wnMQCSzGGonNgGU4N6xHhCzJ8N57G3hlc3AEA x657Fh4uOIuZlS8G9hAIIVVx/gXvl6toGxhuWK7bsit0DULaiwnU0tMM2JlXZHcjo6/4 RQ1FCL0e1OV2d7YUlY5ikg4fEPcCo2iMzcPp9pvvAtAUYA2aB6jOZV4fVVie7aSVAefd 8co9nz8xkxWx3ohmR15koGoLJ1yvVzfOWxl9rnLOllPjOjxOmw30dSp6X6wsGCvqwhHd AmzQ== X-Gm-Message-State: AMCzsaWB/KGcXlEzEDfIz/p7ZY9wUiD6dRC45G3v4TslweH2zl7vOBa9 qinjLFVhdDf+2GjdPyWVlGi95aCPndg= X-Google-Smtp-Source: ABhQp+RKt9IGed2lu6V1ImmROlgTVvVoFk2/8HxFfxk0tD/msE8Cq4SlDAZ64qZjXdF4jL1IR8N28w== X-Received: by 10.28.217.130 with SMTP id q124mr1574944wmg.30.1508171664228; Mon, 16 Oct 2017 09:34:24 -0700 (PDT) Received: from localhost.localdomain ([154.144.50.139]) by smtp.gmail.com with ESMTPSA id p78sm10214333wma.11.2017.10.16.09.34.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Oct 2017 09:34:23 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 16 Oct 2017 17:34:13 +0100 Message-Id: <20171016163413.15051-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [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: , Cc: alan@softiron.co.uk, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 9 +++++++++ Platform/AMD/OverdriveBoard/OverdriveBoard.fdf | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm 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 ################################################################################ #