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::230; helo=mail-wm0-x230.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (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 79E24220EE133 for ; Tue, 12 Dec 2017 10:12:44 -0800 (PST) Received: by mail-wm0-x230.google.com with SMTP id b76so494755wmg.1 for ; Tue, 12 Dec 2017 10:17:23 -0800 (PST) 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=KeckI6XKG9t0qulVn2qLgwUoEajNZHj5uxH4y0d5x1E=; b=PZUHC543rIkduXrZOG37TF6hREqWqTlZWDClRJRMx9Kdbq/W2Y7HbBGBUvTwZ2XAUG 6Z9VYhe8zMQcU3cI6DBjelPlD2wbAV+nOQ74WlBRg0AUirlJs2yW+ETsZ85MP2KDYaQe gh7uC7hFKCReFVvOyECng15b1SQIiyTUATXgQ= 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=KeckI6XKG9t0qulVn2qLgwUoEajNZHj5uxH4y0d5x1E=; b=aJtIF4AD/iJIPK/g34lwfK+UKctLYf/qe/OVF+4urnwxwJcVyJat6FG8WEfXB3nJwq crb4IXNT/D87GU1i4tIqMAurksRRSc7UnlwpNcpG10JPyea+K88BsIkEGJiF9jaIXCc1 +pM9EbbNlKSZH5i3cARuTSuRPFDsbTweOyal7JqO4TQcv9UsGkey1Mefie86FK7UBd9T HSTD0MfyYH5n8w5VqnCJ6jR/bVYj41EzO9LKd4H/gCv1s99OkmJK4Jj6WR5zoDHfaANg KRVSCF/v7FUA1iyI4vX0Hk9u0FEH1g82m/7pOMMBL68vULBENLs6rlZO8T5GXRcXBaWJ s1RQ== X-Gm-Message-State: AKGB3mIZq7jf3XueMWPSKVvAiwoPQ8uxhLjfQLwUTcdrEHgw4q07wytr 0St7Jam0b9OKRaP7fSP7VAemJl1Ig24= X-Google-Smtp-Source: ACJfBov01H98FwO5UNey2L6acMXY9cfATFKyXdocVYVupkaO1U5WyD9mwpip21m08Cn6Ub/mYKVfyw== X-Received: by 10.28.72.9 with SMTP id v9mr2650706wma.102.1513102642014; Tue, 12 Dec 2017 10:17:22 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id 30sm18868638wrl.22.2017.12.12.10.17.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Dec 2017 10:17:20 -0800 (PST) Date: Tue, 12 Dec 2017 18:17:19 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, daniel.thompson@linaro.org, masami.hiramatsu@linaro.org Message-ID: <20171212181719.bp4g56wdcnt56vtj@bivouac.eciton.net> References: <20171212103807.18836-1-ard.biesheuvel@linaro.org> <20171212103807.18836-3-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20171212103807.18836-3-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [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: , X-List-Received-Date: Tue, 12 Dec 2017 18:12:44 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 12, 2017 at 10:38:01AM +0000, Ard Biesheuvel wrote: > 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(-) > > 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" Actually, could you just delete this Pcd and let it fall back to the default value of "EDK II"? / Leif > > # 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') > -- > 2.11.0 >