From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 08/10] linux: avoid unnecessary changes in defconfig for INITRAMFS_SOURCE
Date: Sat, 14 Feb 2015 17:36:16 +0100 [thread overview]
Message-ID: <20150214173616.6ea77cd3@free-electrons.com> (raw)
In-Reply-To: <d2981725a8a9bf2f5c557e769047ce6fa60cf5fe.1422972638.git.yann.morin.1998@free.fr>
Dear Yann E. MORIN,
On Tue, 3 Feb 2015 15:21:48 +0100, Yann E. MORIN wrote:
> From: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
>
> When Buildroot is configured to append the root filesystem to the Linux
> kernel as initramfs, Buildroot sets the path to the initramfs source
> dynamically in the Linux configuration file.
>
> As this path is specified as an absolute path, typically being different
> for different users of the same project (e.g. containing a username),
> saving the configuration to a version control system (for example using
> 'make linux-update-defconfig') would result in a difference for this
> path at every invocation by a different user.
> Although this is technically not an issue, it is confusing that this
> generates a difference.
>
> Address this issue by using a not-yet-expanded make variable to specify
> the path to the initramfs source. That variable will be expanded by the
> Linux build system, which uses it both as a Makefile variable and a
> shell variable; thus, it needs to be specified in LINUX_MAKE_ENV (so
> it is exported and available in sub-processes of make). Any saved
> configuration file would simply contain the reference to the
> not-yet-expanded variable.
>
> As in the Linux build system, the config variables are both read from
> make as from a shell script, we cannot use $() syntax as this would be
> interpreted as a command invocation by the shell. Instead, use ${}
> syntax which is interpreted as variable reference both by the shell as
> by make.
At first, I was a bit dubious, because it now means that if one wants
to re-use the Buildroot generated Linux kernel config file outside of
Buildroot, (s)he has to remember to define this BR_BINARIES_DIR
variable. But since this use-case is probably not that frequent, I got
convinced by Yann that this patch makes versioning the kernel config
file nicer.
There was an implementation bug though. See below.
> -LINUX_MAKE_ENV = $(TARGET_MAKE_ENV)
> +LINUX_MAKE_ENV = \
> + $(TARGET_MAKE_ENV) \
> + BR_BINARIES_DIR=$(BINARIES_DIR)
Defining $(LINUX_MAKE_ENV) is call, but you have to use it at some
point. The linux.mk makefile was using $(TARGET_MAKE_ENV) everywhere,
so I've used $(LINUX_MAKE_ENV) instead before applying. Without this,
an initramfs-enabled kernel was not building, since the BR_BINARIES_DIR
variable value was not passed.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-02-14 16:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 14:21 [Buildroot] [PATCH 0/10] kconfig infra: enhancements, and more packages migrated (branch yem/pdp/kconfig) Yann E. MORIN
2015-02-03 14:21 ` [Buildroot] [PATCH 01/10] kconfig infra: support built-in config files Yann E. MORIN
2015-02-03 14:21 ` [Buildroot] [PATCH 02/10] kconfig infra: add support for defconfig files Yann E. MORIN
2015-02-03 14:21 ` [Buildroot] [PATCH 03/10] kconfig infra: make update-config/defconfig handling symmetrical Yann E. MORIN
2015-02-03 14:21 ` [Buildroot] [PATCH 04/10] kconfig infra: remove all install stamp files Yann E. MORIN
2015-02-14 15:35 ` Thomas Petazzoni
2015-02-03 14:21 ` [Buildroot] [PATCH 05/10] kconfig infra: only provide foo-*config targets when the package is enabled Yann E. MORIN
2015-02-03 14:21 ` [Buildroot] [PATCH 06/10] linux: qstrip the path to the custom configuration file Yann E. MORIN
2015-02-03 14:21 ` [Buildroot] [PATCH 07/10] linux: migrate to the kconfig infrastructure Yann E. MORIN
2015-02-03 14:21 ` [Buildroot] [PATCH 08/10] linux: avoid unnecessary changes in defconfig for INITRAMFS_SOURCE Yann E. MORIN
2015-02-14 16:36 ` Thomas Petazzoni [this message]
2015-02-03 14:21 ` [Buildroot] [PATCH 09/10] barebox: qstrip the path to the custom configuration file Yann E. MORIN
2015-02-03 14:21 ` [Buildroot] [PATCH 10/10] barebox: migrate to the kconfig infrastructure Yann E. MORIN
2015-02-14 16:37 ` Thomas Petazzoni
2015-02-14 16:33 ` [Buildroot] [PATCH 0/10] kconfig infra: enhancements, and more packages migrated (branch yem/pdp/kconfig) Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150214173616.6ea77cd3@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox