[edk2] [PATCH edk2-platforms 2/8] Platform/Socionext/SynQuacer: expose build number as firmware version

Ard Biesheuvel posted 8 patches 7 years, 1 month ago
[edk2] [PATCH edk2-platforms 2/8] Platform/Socionext/SynQuacer: expose build number as firmware version
Posted by Ard Biesheuvel 7 years, 1 month ago
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 <ard.biesheuvel@linaro.org>
---
 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"
 
   # 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

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 2/8] Platform/Socionext/SynQuacer: expose build number as firmware version
Posted by Leif Lindholm 7 years, 1 month ago
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 <ard.biesheuvel@linaro.org>
> ---
>  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
> 
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 2/8] Platform/Socionext/SynQuacer: expose build number as firmware version
Posted by Ard Biesheuvel 7 years, 1 month ago
On 12 December 2017 at 18:17, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> 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 <ard.biesheuvel@linaro.org>
>> ---
>>  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"?
>

Yes. But perhaps it makes sense to put $(FW_VENDOR) in there if it is
defined, so we can set it at build time? I would like to have a way to
put something in the FirmwareVendor field in the UEFI system table
that can help us identify firmware builds done by Linaro.
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 2/8] Platform/Socionext/SynQuacer: expose build number as firmware version
Posted by Leif Lindholm 7 years, 1 month ago
On Tue, Dec 12, 2017 at 06:20:00PM +0000, Ard Biesheuvel wrote:
> On 12 December 2017 at 18:17, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > 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 <ard.biesheuvel@linaro.org>
> >> ---
> >>  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"?
> >
> 
> Yes. But perhaps it makes sense to put $(FW_VENDOR) in there if it is
> defined, so we can set it at build time? I would like to have a way to
> put something in the FirmwareVendor field in the UEFI system table
> that can help us identify firmware builds done by Linaro.

Sure, that makes sense. Although we already have FIRMWARE_VER for
similar purposes, so something to match that name?
I.e. FIRMWARE_VENDOR.

/
    Leif
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 2/8] Platform/Socionext/SynQuacer: expose build number as firmware version
Posted by Ard Biesheuvel 7 years, 1 month ago
On 12 December 2017 at 18:24, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> On Tue, Dec 12, 2017 at 06:20:00PM +0000, Ard Biesheuvel wrote:
>> On 12 December 2017 at 18:17, Leif Lindholm <leif.lindholm@linaro.org> wrote:
>> > 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 <ard.biesheuvel@linaro.org>
>> >> ---
>> >>  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"?
>> >
>>
>> Yes. But perhaps it makes sense to put $(FW_VENDOR) in there if it is
>> defined, so we can set it at build time? I would like to have a way to
>> put something in the FirmwareVendor field in the UEFI system table
>> that can help us identify firmware builds done by Linaro.
>
> Sure, that makes sense. Although we already have FIRMWARE_VER for
> similar purposes, so something to match that name?
> I.e. FIRMWARE_VENDOR.
>

Yes, so replace the hunk above with

@@ -222,7 +227,9 @@ [PcdsFeatureFlag]
   gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE

 [PcdsFixedAtBuild.common]
-  gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"Linaro"
+!ifdef $(FIRMWARE_VENDOR)
+  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"$(FIRMWARE_VENDOR)"
+!endif

   # non-secure SRAM
   gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x2E000000

?
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms 2/8] Platform/Socionext/SynQuacer: expose build number as firmware version
Posted by Leif Lindholm 7 years, 1 month ago
On Tue, Dec 12, 2017 at 06:28:31PM +0000, Ard Biesheuvel wrote:
> On 12 December 2017 at 18:24, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > On Tue, Dec 12, 2017 at 06:20:00PM +0000, Ard Biesheuvel wrote:
> >> On 12 December 2017 at 18:17, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> >> > 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 <ard.biesheuvel@linaro.org>
> >> >> ---
> >> >>  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"?
> >> >
> >>
> >> Yes. But perhaps it makes sense to put $(FW_VENDOR) in there if it is
> >> defined, so we can set it at build time? I would like to have a way to
> >> put something in the FirmwareVendor field in the UEFI system table
> >> that can help us identify firmware builds done by Linaro.
> >
> > Sure, that makes sense. Although we already have FIRMWARE_VER for
> > similar purposes, so something to match that name?
> > I.e. FIRMWARE_VENDOR.
> >
> 
> Yes, so replace the hunk above with
> 
> @@ -222,7 +227,9 @@ [PcdsFeatureFlag]
>    gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE
> 
>  [PcdsFixedAtBuild.common]
> -  gArmPlatformTokenSpaceGuid.PcdFirmwareVendor|"Linaro"
> +!ifdef $(FIRMWARE_VENDOR)
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"$(FIRMWARE_VENDOR)"
> +!endif
> 
>    # non-secure SRAM
>    gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase|0x2E000000
> 
> ?

Works for me:
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel