From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web11.4497.1681461219027993923 for ; Fri, 14 Apr 2023 01:33:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fCgbBGh/; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: osteffen@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681461218; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZcyGxx7PRu1lUNxUXhxar/ntjhWzYXJFrRuUxjG3kwM=; b=fCgbBGh/IYNbTHdFT2GfDb/koTVV6todt4Udhk6fxLF8Jxjj9rkm/T35ihu3KxynIkhfKl zEMUW3QL6A7Pv351aN/FPajJDnKkZwZ/Zk4fUpT3l8kwcQZZUSak7nVKtD0fvoE+PmqAXR IQ89NnRFy5MAgEGyn/zwjg3DiyblVR4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-320-MnmzvaFxOGu7yIXB33Sz6w-1; Fri, 14 Apr 2023 04:33:35 -0400 X-MC-Unique: MnmzvaFxOGu7yIXB33Sz6w-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 68B8F8996E3; Fri, 14 Apr 2023 08:33:34 +0000 (UTC) Received: from osteffen-laptop.redhat.com (unknown [10.39.193.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2FC3492C13; Fri, 14 Apr 2023 08:33:32 +0000 (UTC) From: "Oliver Steffen" To: devel@edk2.groups.io Cc: Anthony Perard , Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao , Jordan Justen , Julien Grall , Leif Lindholm , Ray Ni , Sami Mujawar , Zhichao Gao , Oliver Steffen Subject: [PATCH v4 2/2] ArmVirtPkg: allow setting Firmware Version from build command line Date: Fri, 14 Apr 2023 10:33:23 +0200 Message-Id: <20230414083323.153731-3-osteffen@redhat.com> In-Reply-To: <20230414083323.153731-1-osteffen@redhat.com> References: <20230414083323.153731-1-osteffen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true ArmVirtXen.dsc initializes gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString with with the value of the variable "FIRMWARE_VER". Move that functionality to ArmVirt.dsc.inc to make it available to all ArmVirt packages, and make it conditional: only set the PCD string if FIRMWARE_VER is actually defined. This allows specifying the firmware version string on the build command line with -D FIRMARE_VER=... Signed-off-by: Oliver Steffen Reviewed-by: Sami Mujawar --- ArmVirtPkg/ArmVirt.dsc.inc | 4 ++++ ArmVirtPkg/ArmVirtXen.dsc | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 5b18184be263..2443e8351c99 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -282,6 +282,10 @@ [PcdsFeatureFlag.AARCH64] gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE [PcdsFixedAtBuild.common] +!ifdef $(FIRMWARE_VER) + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(FIRMWARE_VER)" +!endif + gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|1000000 gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength|1000000 gEfiMdePkgTokenSpaceGuid.PcdMaximumLinkedListLength|0 diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc index 58088af6ea3a..a280ae203bae 100644 --- a/ArmVirtPkg/ArmVirtXen.dsc +++ b/ArmVirtPkg/ArmVirtXen.dsc @@ -69,7 +69,6 @@ [BuildOptions] ################################################################################ [PcdsFixedAtBuild.common] - gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(FIRMWARE_VER)" !if $(ARCH) == AARCH64 gArmTokenSpaceGuid.PcdVFPEnabled|1 !endif -- 2.40.0