From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web08.19521.1666620209352136635 for ; Mon, 24 Oct 2022 07:03:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bnlq8uJk; spf=pass (domain: kernel.org, ip: 145.40.68.75, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8A27FB81A90 for ; Mon, 24 Oct 2022 14:03:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F0A5C433C1 for ; Mon, 24 Oct 2022 14:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666620205; bh=emCRsjygrPj68xIfhNugS5WqgmKcbSx89+kWqsXT4tk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bnlq8uJkKgfI4v5bZS9wajqjL2CjxFuWOW3HKtC7IZFwndRVgp47Dx+3oMs7YYk3H 5fiV2AGLwY+z2U4hLaYqhCIon0bN7tDdn43DrP2i26Dh+baDFhxNaOUZU0UyTlDR4W JR1HIihzfHp9bBnc5DYqkf6UusBrHmLRkJ+d4veROrMFwG0IgCrfRMZ3of/rnWqM2W T5tg7Dz8DREFGStbuKE0vplv1dyZXAp39OqiFI5qYq4KCkN5kOPfoMc0L6SVUK/1q9 /IT83f7rNIOeQVXtYcPsjaaB1hr5Bq5ZZCyrTfZTUOUWXw1IPGUX41+OAhfflP3+40 YIiBmgd92/GPg== Received: by mail-lj1-f180.google.com with SMTP id o4so8057044ljp.8 for ; Mon, 24 Oct 2022 07:03:25 -0700 (PDT) X-Gm-Message-State: ACrzQf26jrzH6PiYjLD2yNnqjTmqLEQYsMR+gWvIMrA74NsggqQ6nKZt UemvXXLst1q+F2M9FfmiqxusEE148WqpCAgNjLA= X-Google-Smtp-Source: AMsMyM75XVZQoMF8V8lxG08EGTZ3iML5bNHzkMEKq2xXXOBShVoufJVKM3zIDjkL2JF/jlZX7fCWbwq28vGBfP0fuXg= X-Received: by 2002:a2e:9a81:0:b0:26c:5b63:7a83 with SMTP id p1-20020a2e9a81000000b0026c5b637a83mr13125125lji.291.1666620203225; Mon, 24 Oct 2022 07:03:23 -0700 (PDT) MIME-Version: 1.0 References: <20221010144213.1470478-1-kraxel@redhat.com> <8fde917f-c932-0e0c-499f-bbe9daa95ac9@quicinc.com> <20221011075952.r5yxm6s2hukzapnz@sirius.home.kraxel.org> <20221012085227.sykh5ikmfganxmtn@sirius.home.kraxel.org> In-Reply-To: <20221012085227.sykh5ikmfganxmtn@sirius.home.kraxel.org> From: "Ard Biesheuvel" Date: Mon, 24 Oct 2022 16:03:11 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH 1/1] OvmfPkg/SmbiosPlatformDxe: use PcdFirmwareVersionString To: devel@edk2.groups.io, kraxel@redhat.com Cc: Rebecca Cran , Rebecca Cran , Jordan Justen , Julien Grall , Oliver Steffen , Pawel Polawski , Anthony Perard , Jiewen Yao Content-Type: text/plain; charset="UTF-8" On Wed, 12 Oct 2022 at 10:52, Gerd Hoffmann wrote: > > 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 ... > Is there a conclusion here?