[edk2] [PATCH edk2-platforms v3 04/11] Hisilicon D03/D05: get firmware version from FIRMWARE_VER

Heyi Guo posted 11 patches 7 years, 3 months ago
There is a newer version of this series
[edk2] [PATCH edk2-platforms v3 04/11] Hisilicon D03/D05: get firmware version from FIRMWARE_VER
Posted by Heyi Guo 7 years, 3 months ago
From: Ming Huang <waip23@foxmail.com>

Value of the environment variable FIRMWARE_VER is GIT SHA by default,
and you can add the environment variable FIRMWARE_VER to EXTRA_OPTIONS
at build time to specify something else, eg. "16.12-<commit id>".

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ming Huang <huangming23@huawei.com>
---
 Platform/Hisilicon/D03/D03.dsc | 6 +++++-
 Platform/Hisilicon/D05/D05.dsc | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc
index 7e25ffb..fca6781 100644
--- a/Platform/Hisilicon/D03/D03.dsc
+++ b/Platform/Hisilicon/D03/D03.dsc
@@ -170,7 +170,11 @@
   gHisiTokenSpaceGuid.PcdAlgSmmuBaseAddress|0xd0040000
 
 
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Hisilicon D03 UEFI 16.12 Release"
+  !ifdef $(FIRMWARE_VER)
+    gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(FIRMWARE_VER)"
+  !else
+    gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Development build base on Hisilicon D03 UEFI 17.10 Release"
+  !endif
 
   gHisiTokenSpaceGuid.PcdBiosVersionString|L"10.01.01T18"
 
diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc
index 7cd5758..aa61c0e 100644
--- a/Platform/Hisilicon/D05/D05.dsc
+++ b/Platform/Hisilicon/D05/D05.dsc
@@ -188,7 +188,11 @@
 
   gHisiTokenSpaceGuid.PcdIsMPBoot|1
   gHisiTokenSpaceGuid.PcdSocketMask|0x3
-  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Hisilicon D05 UEFI 16.12 Release"
+  !ifdef $(FIRMWARE_VER)
+    gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(FIRMWARE_VER)"
+  !else
+    gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Development build base on Hisilicon D05 UEFI 17.10 Release"
+  !endif
 
   gHisiTokenSpaceGuid.PcdBiosVersionString|L"10.01.01T18"
 
-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH edk2-platforms v3 04/11] Hisilicon D03/D05: get firmware version from FIRMWARE_VER
Posted by Leif Lindholm 7 years, 3 months ago
On Thu, Sep 21, 2017 at 06:59:46PM +0800, Heyi Guo wrote:
> From: Ming Huang <waip23@foxmail.com>
> 
> Value of the environment variable FIRMWARE_VER is GIT SHA by default,
> and you can add the environment variable FIRMWARE_VER to EXTRA_OPTIONS
> at build time to specify something else, eg. "16.12-<commit id>".
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang <huangming23@huawei.com>

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---
>  Platform/Hisilicon/D03/D03.dsc | 6 +++++-
>  Platform/Hisilicon/D05/D05.dsc | 6 +++++-
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Hisilicon/D03/D03.dsc b/Platform/Hisilicon/D03/D03.dsc
> index 7e25ffb..fca6781 100644
> --- a/Platform/Hisilicon/D03/D03.dsc
> +++ b/Platform/Hisilicon/D03/D03.dsc
> @@ -170,7 +170,11 @@
>    gHisiTokenSpaceGuid.PcdAlgSmmuBaseAddress|0xd0040000
>  
>  
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Hisilicon D03 UEFI 16.12 Release"
> +  !ifdef $(FIRMWARE_VER)
> +    gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(FIRMWARE_VER)"
> +  !else
> +    gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Development build base on Hisilicon D03 UEFI 17.10 Release"
> +  !endif
>  
>    gHisiTokenSpaceGuid.PcdBiosVersionString|L"10.01.01T18"
>  
> diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc
> index 7cd5758..aa61c0e 100644
> --- a/Platform/Hisilicon/D05/D05.dsc
> +++ b/Platform/Hisilicon/D05/D05.dsc
> @@ -188,7 +188,11 @@
>  
>    gHisiTokenSpaceGuid.PcdIsMPBoot|1
>    gHisiTokenSpaceGuid.PcdSocketMask|0x3
> -  gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Hisilicon D05 UEFI 16.12 Release"
> +  !ifdef $(FIRMWARE_VER)
> +    gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(FIRMWARE_VER)"
> +  !else
> +    gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"Development build base on Hisilicon D05 UEFI 17.10 Release"
> +  !endif
>  
>    gHisiTokenSpaceGuid.PcdBiosVersionString|L"10.01.01T18"
>  
> -- 
> 1.9.1
> 
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel