From patchwork Tue Dec 12 10:38:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 121501 Delivered-To: patch@linaro.org Received: by 10.80.152.193 with SMTP id j59csp3890585edb; Tue, 12 Dec 2017 02:38:23 -0800 (PST) X-Google-Smtp-Source: ACJfBov8x6B/6dZju0RFVuJQJ3EF2nEcAbSQcBCegFE7pZskjO69KUw8fBDVNT8NF8WNOkLQevDZ X-Received: by 10.84.206.37 with SMTP id f34mr1734190ple.299.1513075103631; Tue, 12 Dec 2017 02:38:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513075103; cv=none; d=google.com; s=arc-20160816; b=lyG1NwX7ivpuvpisJYbcBrqWXeHTqwiqCVSZhkN6piMB0DGGsR42IjjwDTmmSgMDtj t9bawNuBAJ2J0lY5E9CK+A4AJbBcjq0nuxPRpmr5zsM7pGDwKygY0rDuerBS4UQkaqbV uFuzS9cBUl3yG/uqJ6xdjGCy4VEFq58TLtn14ClfCWcTt2izHibSw8AxCPFwYnU92n0s aQ6pZ1aihbkMwb0KigFyZSBHwO3d/HMCTvr7QNiXqQxwHX2NBTD12LWBEN3rlKbEDi/B NG7jOwMPMVGQ1bcuTVQ4Yu59IbfqdT2M4DN+JUfLESvmGoVc1Mzc6XQzEb5bIpvJfDNz foUg== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=ySuPHbKmoo+zovKyCc4QmsIU73GiwcKkbZ2rt1O+Mgo=; b=ayAkDqJZeM+AMQXaP3Wf6+/IA4mzVrIwdOJF69xF9eQZ8NlM1/gTHNPj6POPpa9uY+ DSWkkvAb/QTgmA+coKkLjjMIi9Gu4/KFk1ZTHpSOqDQXIkETZy+6T/wDvBYl8aGkux9d 4Z5ZSLTVHjusS/XLgrOST7j3cdzl2YGrSAKBGVZkATSNmUmJ/EW14/LPg2fF5RQCW77d lu0f0Fxiulix4VIax8aRODw7PHQxLOKPASV1i1Gdw8ZoyodSXtTmk9F/8Ivxz1wcpRSS rcakoIB20s37rqRUQ+2pJJKOr1h59aIDuGRV43T976gAYOufYKcakAnfXaxrSIpHpPJA a8nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=iMm+sMbR; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id f12si11471733plo.19.2017.12.12.02.38.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 02:38:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=iMm+sMbR; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 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 78287220EE10B; Tue, 12 Dec 2017 02:33:44 -0800 (PST) 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::242; helo=mail-wm0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) (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 A0D6C21B02825 for ; Tue, 12 Dec 2017 02:33:42 -0800 (PST) Received: by mail-wm0-x242.google.com with SMTP id i11so19299353wmf.4 for ; Tue, 12 Dec 2017 02:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GQz+qxBtxnX2/Ssf1t45Ut14/fFf8qj4RveaFtN6USw=; b=iMm+sMbRQZyrDvnicpAaoezg3iDb+3+QjoU+PnIiMNm33WSMu+f4R3ZXHhABfaxF2j ZRxRcs/Ihn34F4QVpA/x0ybHg1yI/8iGqmsGl2ZfhIWCtjDbsQKf1xOP8tXeCz1CLB9s bp0b2PGYIL6xvyhAIGHySbhFyCZgcU34tl0kE= 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; bh=GQz+qxBtxnX2/Ssf1t45Ut14/fFf8qj4RveaFtN6USw=; b=F8kif4AvdPVot4j5bm/FZKOMXQAfJihS4oXjcloojs8axedFNhymM/TmBOME3vDCk/ w8BqRtc8VHAe4N4kPThlGgDCXkE2F+WipGhF9tAaQADvJcfZ/EjBF71+BBFpgxs0srbS 8TGg4XxffY2ARuj91G0/GTb44J+Sd6FZIuDNiWrkU/oIU1sJN7pFLfi6NEFRVRubrssQ LLurno/t+w+61tuhu0wdm/gf7ZK2MvdSAhT2mRAdEyU6QV82eL1bW21m17R8CjaWK5c8 /PbqDHxwZjKPuRp8sUzgakG8W57LpagQFCLtil2HSQcUC+3LNRll1l3uTivsxCmzb3AY BqAg== X-Gm-Message-State: AKGB3mJEWJ979CstSz+szIfUwxRj8iyVo9XI4oUlCX3WRh2yLZFvuyZr 0CwDLkRrydSEMM87osW5YDqJGtKnoGs= X-Received: by 10.28.191.86 with SMTP id p83mr1422093wmf.114.1513075099465; Tue, 12 Dec 2017 02:38:19 -0800 (PST) Received: from localhost.localdomain ([160.171.158.223]) by smtp.gmail.com with ESMTPSA id b16sm21279762wrd.69.2017.12.12.02.38.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2017 02:38:18 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Tue, 12 Dec 2017 10:38:01 +0000 Message-Id: <20171212103807.18836-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171212103807.18836-1-ard.biesheuvel@linaro.org> References: <20171212103807.18836-1-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH edk2-platforms 2/8] Platform/Socionext/SynQuacer: expose build number as firmware version 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: daniel.thompson@linaro.org, masami.hiramatsu@linaro.org, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Expose the contents of the .DSC macro BUILD_NUMBER via the PCD gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString (if > 1), and as the FMP system firmware version (for capsule update). Also, set the firmware vendor to 'Linaro Enterprise Group', to distinguish our builds from builds by other parties. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Platform/Socionext/DeveloperBox/DeveloperBox.dsc | 8 +++++++- Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf | 1 + Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc | 6 ++++-- Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 8 +++++++- Platform/Socionext/SynQuacerEvalBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf | 1 + Platform/Socionext/SynQuacerEvalBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc | 6 ++++-- 6 files changed, 24 insertions(+), 6 deletions(-) -- 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/Socionext/DeveloperBox/DeveloperBox.dsc b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc index 8fbd7b2d908f..5ec26f9cdd34 100644 --- a/Platform/Socionext/DeveloperBox/DeveloperBox.dsc +++ b/Platform/Socionext/DeveloperBox/DeveloperBox.dsc @@ -26,6 +26,7 @@ [Defines] BUILD_TARGETS = DEBUG|RELEASE SKUID_IDENTIFIER = DEFAULT FLASH_DEFINITION = Platform/Socionext/DeveloperBox/DeveloperBox.fdf + BUILD_NUMBER = 1 [BuildOptions] RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 @@ -222,7 +223,7 @@ [PcdsFeatureFlag] gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE [PcdsFixedAtBuild.common] - gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"Linaro" + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"Linaro Enterprise Group" # non-secure SRAM gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x2E000000 @@ -384,6 +385,11 @@ [PcdsFixedAtBuild.common] # set DIP switch DSW3-PIN1 (GPIO pin PD[0] on the SoC) to clear the varstore gSynQuacerTokenSpaceGuid.PcdClearSettingsGpioPin|0 +!if $(BUILD_NUMBER) > 1 + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(BUILD_NUMBER)" +!endif + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision|$(BUILD_NUMBER) + [PcdsPatchableInModule] gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0 diff --git a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf index f5272c0f0d37..95a5e482a713 100644 --- a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf +++ b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf @@ -38,6 +38,7 @@ [LibraryClasses] [FixedPcd] gArmTokenSpaceGuid.PcdFdSize + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision [Pcd] gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor diff --git a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc index bc47e696da7a..fb69de078313 100644 --- a/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc +++ b/Platform/Socionext/DeveloperBox/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc @@ -21,8 +21,10 @@ #define PACKAGE_VERSION 0xFFFFFFFF #define PACKAGE_VERSION_STRING L"Unknown" -#define CURRENT_FIRMWARE_VERSION 0x00000001 -#define CURRENT_FIRMWARE_VERSION_STRING L"0x00000001" +#define __BUILD_STRING(x) L ## #x +#define BUILD_STRING(x) L"build #" __BUILD_STRING(x) +#define CURRENT_FIRMWARE_VERSION FixedPcdGet32 (PcdFirmwareRevision) +#define CURRENT_FIRMWARE_VERSION_STRING BUILD_STRING (FixedPcdGet32 (PcdFirmwareRevision)) #define LOWEST_SUPPORTED_FIRMWARE_VERSION 0x00000001 #define IMAGE_ID SIGNATURE_64('S', 'N', 'D', 'E', 'V', 'B', 'O', 'X') diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc index 895d3b09fdc9..bc8ddd452d4b 100644 --- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc +++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc @@ -26,6 +26,7 @@ [Defines] BUILD_TARGETS = DEBUG|RELEASE SKUID_IDENTIFIER = DEFAULT FLASH_DEFINITION = Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf + BUILD_NUMBER = 1 [BuildOptions] RELEASE_*_*_CC_FLAGS = -DMDEPKG_NDEBUG -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 @@ -214,7 +215,7 @@ [PcdsFeatureFlag] gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE [PcdsFixedAtBuild.common] - gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"Linaro" + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"Linaro Enterprise Group" # non-secure SRAM gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x2E000000 @@ -372,6 +373,11 @@ [PcdsFixedAtBuild.common] # set DIP switch DSW3-PIN1 (GPIO pin PD[0] on the SoC) to clear the varstore gSynQuacerTokenSpaceGuid.PcdClearSettingsGpioPin|0 +!if $(BUILD_NUMBER) > 1 + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(BUILD_NUMBER)" +!endif + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision|$(BUILD_NUMBER) + [PcdsPatchableInModule] gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution|0 gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution|0 diff --git a/Platform/Socionext/SynQuacerEvalBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf b/Platform/Socionext/SynQuacerEvalBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf index f5272c0f0d37..95a5e482a713 100644 --- a/Platform/Socionext/SynQuacerEvalBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf +++ b/Platform/Socionext/SynQuacerEvalBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptor.inf @@ -38,6 +38,7 @@ [LibraryClasses] [FixedPcd] gArmTokenSpaceGuid.PcdFdSize + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision [Pcd] gEfiSignedCapsulePkgTokenSpaceGuid.PcdEdkiiSystemFirmwareImageDescriptor diff --git a/Platform/Socionext/SynQuacerEvalBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc b/Platform/Socionext/SynQuacerEvalBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc index 3413f76f95c7..daf26c79dff1 100644 --- a/Platform/Socionext/SynQuacerEvalBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc +++ b/Platform/Socionext/SynQuacerEvalBoard/SystemFirmwareDescriptor/SystemFirmwareDescriptorTable.aslc @@ -21,8 +21,10 @@ #define PACKAGE_VERSION 0xFFFFFFFF #define PACKAGE_VERSION_STRING L"Unknown" -#define CURRENT_FIRMWARE_VERSION 0x00000001 -#define CURRENT_FIRMWARE_VERSION_STRING L"0x00000001" +#define __BUILD_STRING(x) L ## #x +#define BUILD_STRING(x) L"build #" __BUILD_STRING(x) +#define CURRENT_FIRMWARE_VERSION FixedPcdGet32 (PcdFirmwareRevision) +#define CURRENT_FIRMWARE_VERSION_STRING BUILD_STRING (FixedPcdGet32 (PcdFirmwareRevision)) #define LOWEST_SUPPORTED_FIRMWARE_VERSION 0x00000001 #define IMAGE_ID SIGNATURE_64('S', 'N', 'I', 'S', 'Y', 'N', 'Q', 'U')