OvmfPkg: allow setting Firmware Version from build command line

Initialize gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString with
with the value of the variable "FIRMWARE_VER", if is is defined. Applies
to all flavors of OvmfPkg.

This behavior is already implemented in ArmVirtXen.dsc. It allows
specifying the firmware version string on the build command line with
-D FIRMARE_VER=...

Introduce a common include file to be used in the .dsc files for the
different OVMF flavors, and add the changes there.  (ArmVirtPkg already
has such a file).

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
This commit is contained in:
Oliver Steffen
2023-04-14 10:33:22 +02:00
committed by mergify[bot]
parent 5de2a54b2c
commit 8d59bbf47e
5 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
##
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
[PcdsFixedAtBuild.common]
!ifdef $(FIRMWARE_VER)
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(FIRMWARE_VER)"
!endif