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.web08.18515.1665571179373837975 for ; Wed, 12 Oct 2022 03:39:40 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bxLyQFsh; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665571178; 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: in-reply-to:in-reply-to:references:references; bh=c+eIAi3tQMFeUQC8WqQpOgvipFd9KtlCXzrdXVm0YDk=; b=bxLyQFshFZHNGXipLzERLV0GqwxHfD0Is4yhJBa/HRmAqcztzacVbdiuVErZHrW7ALiJNV /AA6GozR1noi80uwegO9AqULyzfElbzmkcy/Si0tlBDXg2qy706zX51ASQqz05wvBcFRFH xtc6oPX+TgWiOGk60wtZO6gb3pgMNFA= 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-116-Y6J2udD5OJaBJxk2GiKqzA-1; Wed, 12 Oct 2022 06:39:35 -0400 X-MC-Unique: Y6J2udD5OJaBJxk2GiKqzA-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 81D15101A56D; Wed, 12 Oct 2022 10:39:34 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.195.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BFF1549BB64; Wed, 12 Oct 2022 10:39:32 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E486E18003A8; Wed, 12 Oct 2022 12:39:30 +0200 (CEST) Date: Wed, 12 Oct 2022 12:39:30 +0200 From: "Gerd Hoffmann" To: Oliver Steffen Cc: devel@edk2.groups.io, Anthony Perard , Ard Biesheuvel , Jian J Wang , Jiewen Yao , Jordan Justen , Julien Grall , Leif Lindholm , Liming Gao , Ray Ni , Sami Mujawar , Zhichao Gao , Pawel Polawski Subject: Re: [PATCH 2/2] ArmVirtPkg: allow setting Firmware Version from build command line Message-ID: <20221012103930.imhnaniw2ug2fkey@sirius.home.kraxel.org> References: <20221012073504.511854-1-osteffen@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Oct 12, 2022 at 07:35:23AM +0000, Oliver Steffen wrote: > Initialize > gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString > with with the value of the variable "FIRMWARE_VER" > in all flavors of ArmVirtPkg. > > This behavior is already implemented in ArmVirtXen.dsc. > It allows specifying the firmware version string on the > build command line with -D FIRMARE_VER=... I think we need to decide which approach we want support for setting PcdFirmwareVersionString (and write it down in armvirt/ovmf readme). The options we have are: (1) -D "FIRMARE_VER=${version}" (needs this patch), or (2) --pcd "PcdFirmwareVersionString=L'${version}\\0'" Advantage of (1) is that the build command line is a bit simpler. Disadvantage of (1) is that it overrides PcdFirmwareVersionString even in case FIRMARE_VER is not set on the command line. Which doesn't make much of a difference today because the default value defined in MdeModulePkg is just the empty string. In case we set the default to something more useful (https://edk2.groups.io/g/devel/message/94985) overriding it is not so nice though ... take care, Gerd