On 06/06/19 07:38, Udit Kumar wrote:
> Dear Community, 
> 
> I like to print git commit id, which printing UEFI firmware build 
> information. 
> Could you help, how I can collect ' git describe' information in C file. 

I think you should be able to do this in the PREBUILD hook in the DSC file. 
(Run "git describe" in a script for generating a simple C source file.)


Another option would be to introduce a PCD in your platform package DEC file, 
with datum type (VOID*) and access method FixedAtBuild. For example:

[PcdsFixedAtBuild]
  gMyPlatformPkgTokenSpaceGuid.PcdBuildIdentifier|""|VOID*|<token>

and when you build your platform DSC, you could pass the following option to 
the "build" utility:

  --pcd=gMyPlatformPkgTokenSpaceGuid.PcdBuildIdentifier="$(git describe)"

Thanks
Laszlo 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#41987): https://edk2.groups.io/g/devel/message/41987
Mute This Topic: https://groups.io/mt/31948238/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to