[Buildroot] Adding post image hook

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed May 13 20:16:28 UTC 2020

Hello Louis-Paul,

You should consider changing your e-mail client, or configure it
better. Indeed, the plain text version of your e-mail is not properly
quoted, i.e the text from me you are replying to was not quoted with
">" signs.

On Wed, 13 May 2020 22:05:08 +0200 (CEST)
lpdev at cordier.org wrote:

> You can actually do that, by running:
> make VARS=<some-variable-name> printvars
> from your post-image script.
> If what you need to retrieve is the version of the different packages,
> you can also run:
> make show-info
> from your post-image script, and parse the JSON output.

> Thank you for the tip. However this method seems to be very slow
> because of the makefile parsing (takes between 5 to 10sec on my PC).
> I would not recommend that for retrieving values of a lot of
> variables.

You can do:

  make VARS=FOO% printvars

if the different variables you want to get match a wildcard.

Or alternatively, you can do just:

  make printvars

pay the one-time price of dumping all variables, and then grab what you
need from the output.

But otherwise, I agree that indeed it is quite slow.

Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering

More information about the buildroot mailing list