Re: Print git tag or commit info

Bob Feng

Hi Pankaj,

In edk2 build environment, the makefile is generated by build tool, while it also allow user to provide custom makefile for a module.

As you mentioned, git tag info is easy to do in makefile, so I think you may try to use custom makefile for a module.

In INF file, defines section, set CUSTOM_MAKEFILE attribute. For example


And place your makefile and GNUmakefile to the same folder of .inf file.

You can check for more CUSTOM_MAKEFILE details.

From: Pankaj Bansal [mailto:pankaj.bansal@...]
Sent: Friday, October 11, 2019 11:26 AM
To:; Feng, Bob C <bob.c.feng@...>; Gao, Liming <liming.gao@...>
Cc: Varun Sethi <V.Sethi@...>
Subject: Print git tag or commit info

Hello Edk2 members,

I want to print the git tag info (if not available then top commit id) when booting UEFI image.
Can you please tell us how to do it?
In build environment that uses make files it's easy to do, but I don't know how to do it in edk2 build environment that uses inf files?

Pankaj Bansal

Join to automatically receive all group messages.