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.129.124]) by mx.groups.io with SMTP id smtpd.web10.16745.1681399978595499553 for ; Thu, 13 Apr 2023 08:32:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RpuGKht9; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: osteffen@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681399977; 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=RpuGKht9xRmfN+oolwyvI9notEcNW3zU5bSecQS6MkBmYLYlTHsVy1JM8c727w37bSqpNl KcO22ykkA/eS7qZqf1OEhramqt4c1w7+ES9RG9jbW1/NBD6yrBKPy3F231qFWc4VR7F9PB uOb7cpDy7OTsEu8ceJ3kgDEJ1Xupj40= 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-267-WXPXg6wzN7W5_Z4ThubYSg-1; Thu, 13 Apr 2023 11:32:54 -0400 X-MC-Unique: WXPXg6wzN7W5_Z4ThubYSg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E4574857F81; Thu, 13 Apr 2023 15:32:53 +0000 (UTC) Received: from osteffen-laptop.redhat.com (unknown [10.39.195.81]) by smtp.corp.redhat.com (Postfix) with ESMTP id 387F5C158BB; Thu, 13 Apr 2023 15:32:52 +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 v3 2/2] ArmVirtPkg: allow setting Firmware Version from build command line Date: Thu, 13 Apr 2023 17:32:09 +0200 Message-Id: <20230413153209.128585-3-osteffen@redhat.com> In-Reply-To: <20230413153209.128585-1-osteffen@redhat.com> References: <20230413153209.128585-1-osteffen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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