From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yann E. MORIN Date: Tue, 3 Apr 2018 18:21:56 +0200 Subject: [Buildroot] [PATCH 1/1] core: enhance printvars for variables with newlines In-Reply-To: References: <20180403143151.13372-1-chemobejk@gmail.com> <20180403165012.0d0e173a@windsurf> Message-ID: <20180403162156.GA2335@scaer> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net 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 > 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. | '------------------------------^-------^------------------^--------------------'