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.web10.17945.1665564767694788535 for ; Wed, 12 Oct 2022 01:52:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JR0j5lED; 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=1665564766; 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=ELXRIQ68olLk7E31pJ1dBBmwFmxfTa4lA03OL0qHUhc=; b=JR0j5lEDbfIDcvk1gcx6YUGBmkqDaJUQEhSgm2+IqNvwdmrMxdAmOf3u2dUDuOZojMe5eI 7j8IHUdoxomLiCTLgEmk5f7aoFs5N9lZgDAaPVcxebNM93nvoBWlXEtHuylGDMIW8hg6mb +2NxVsb8kHmEMW2Arw5R1PwlTHZH2kU= 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-562-1bdkKyIvMs2onUiGn2sN6Q-1; Wed, 12 Oct 2022 04:52:45 -0400 X-MC-Unique: 1bdkKyIvMs2onUiGn2sN6Q-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6DA4088434A; Wed, 12 Oct 2022 08:52:39 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.195.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 65948414A809; Wed, 12 Oct 2022 08:52:30 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 10F5518003A8; Wed, 12 Oct 2022 10:52:28 +0200 (CEST) Date: Wed, 12 Oct 2022 10:52:27 +0200 From: "Gerd Hoffmann" To: Rebecca Cran Cc: devel@edk2.groups.io, Rebecca Cran , Jordan Justen , Julien Grall , Oliver Steffen , Pawel Polawski , Ard Biesheuvel , Anthony Perard , Jiewen Yao Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/SmbiosPlatformDxe: use PcdFirmwareVersionString Message-ID: <20221012085227.sykh5ikmfganxmtn@sirius.home.kraxel.org> References: <20221010144213.1470478-1-kraxel@redhat.com> <8fde917f-c932-0e0c-499f-bbe9daa95ac9@quicinc.com> <20221011075952.r5yxm6s2hukzapnz@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Oct 11, 2022 at 09:34:17AM -0600, Rebecca Cran wrote: > On 10/11/22 01:59, Gerd Hoffmann wrote: > > > > Next question is how to set them. I think it makes sense to have some > > sensible defaults, but still allow to override them. MdeModulePkg > > defines them to empty strings (except vendor). Should we set them to > > the most recent stable tag instead, i.e. something like this? > > > > - gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L""|VOID*|0x00010052 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"edk2-stable202208"|VOID*|0x00010052 > > > > - gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareReleaseDateString|L""|VOID*|0x00010053 > > + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareReleaseDateString|L"26/08/2022"|VOID*|0x00010053 > > > > When doing that: Can this be overridden on the command line? Trying to > > do so using 'build --pcd PcdFirmwareVersionString=Test' didn't work for > > me, the string wasn't translated to unicode ... > > > > I've noticed ArmVirtPkg/ArmVirtXen.dsc has this line ... > > > > gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString|L"$(FIRMWARE_VER)" > > > > ... which allows to override using 'build -D FIRMWARE_VER=Test'. > > Unicode encoding works that way, but it would also override the > > MdeModulePkg default (if we add one). > > The method I've used in the past is to override strings on the command line, > just like ArmVirtXen.dsc does, and I like that approach. After digging around in the source code and experimenting a bit I figured how to do it without the FIRMWARE_VER indirection: build --pcd="PcdFirmwareVersionString=L'${version}\\0'" > I like the idea of defaulting to the stable tag, though we could perhaps > shorten it to "202208" instead? I'd prefer to keep it identical to the stable tag name. Makes it easier to figure where this comes from. > I'm fairly sure the release date should be > in MM/DD/YYYY format for e.g. SMBIOS compatibility (sigh) Hmm. At least we tag stable releases close to the end of the month (after 12th), so it should be clear what is DD and what is MM ... take care, Gerd