[Buildroot] [PATCH 1/1] core: enhance printvars for variables with newlines

Yann E. MORIN yann.morin.1998 at free.fr
Tue Apr 3 16:21:56 UTC 2018


Stefan, All,

On 2018-04-03 18:15 +0300, Stefan Becker spake thusly:
> Hi,
> 
> On Tue, Apr 3, 2018 at 5:50 PM, Thomas Petazzoni
> <thomas.petazzoni at bootlin.com> wrote:
> >
> > Just curious, what is the use case for feeding the printvars output
> > back into GNU Make ?
> 
> Short answer: because we have factored out buildroot image creation
> step to a separate build.
> 
> Previously it was enough to provide the SDK, output/target/ and a
> selected list of source *.mk file s from the "upstream" buildroot
> build to be able to do that. With todays @master update the root fs
> creation requires internal variables, like PACKAGES_USERS, to be set
> correctly to create a valid, bootable image. Which took me a while to
> root cause...

The real solution IMHO is that you base your iamge creatikon out of the
rootfs.tar image generated by Buildroot.

If you are using a br2-external tree, you can also define your own
filesystem iamge type that depends on rootfs.tar. Then your image
generator (or a wrapper around that) would extract (under fakeroot)
rootfs.tar, and generate your own image format out of that.

(Note: this is not a reason not to apply your patch, of course, just an
alternate solution for your use-case).

Regards,
Yann E. MORIN.

> Hence we need to use "printvars" to extract the content of those
> internal variables from the "upstream" buildroot build into a .mk file
> that is passed down to the "downstream" image build, which include's
> it in its top-level Makefile (a stripped-down version of buildroot
> top-level Makefile). The variables we are interested in unfortunately
> contain newlines.
> 
> Regards, Stefan

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'


More information about the buildroot mailing list