* Printing git commit in build
@ 2019-06-06 5:38 udit.kumar
2019-06-06 8:25 ` [edk2-devel] " Laszlo Ersek
0 siblings, 1 reply; 3+ messages in thread
From: udit.kumar @ 2019-06-06 5:38 UTC (permalink / raw)
To: devel@edk2.groups.io
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.
Thanks
Udit
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] Printing git commit in build
2019-06-06 5:38 Printing git commit in build udit.kumar
@ 2019-06-06 8:25 ` Laszlo Ersek
2019-06-13 6:40 ` [EXT] " Udit Kumar
0 siblings, 1 reply; 3+ messages in thread
From: Laszlo Ersek @ 2019-06-06 8:25 UTC (permalink / raw)
To: devel, udit.kumar
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [EXT] Re: [edk2-devel] Printing git commit in build
2019-06-06 8:25 ` [edk2-devel] " Laszlo Ersek
@ 2019-06-13 6:40 ` Udit Kumar
0 siblings, 0 replies; 3+ messages in thread
From: Udit Kumar @ 2019-06-13 6:40 UTC (permalink / raw)
To: Laszlo Ersek, devel@edk2.groups.io
Thanks Laszlo
> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Thursday, June 6, 2019 1:55 PM
> To: devel@edk2.groups.io; Udit Kumar <udit.kumar@nxp.com>
> Subject: [EXT] Re: [edk2-devel] Printing git commit in build
>
> Caution: EXT Email
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-13 6:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-06 5:38 Printing git commit in build udit.kumar
2019-06-06 8:25 ` [edk2-devel] " Laszlo Ersek
2019-06-13 6:40 ` [EXT] " Udit Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox