[Buildroot] Project layout : where to put the .config files

Thomas De Schampheleire patrickdepinguin at gmail.com
Thu Jan 30 09:59:29 UTC 2014


On Thu, Jan 30, 2014 at 10:53 AM, Jeremy Rosen <jeremy.rosen at openwide.fr> wrote:
> Hello everybody
>
> Buildroot is currently in the process of cleanly separating files
> that are generated by buildroot and are throwaway files (in the
> output directory) from files that are configuration files (the
> BR2_EXTERNAL directory)
>
> However the .config files used by buildroot and other kconfig
> enabled software are not dealt with in a way that is consistant.
>
> .config is the main buildroot configuration file. This is, more
> than anything else "the project." It is the file we want to
> keep in git, share within a software project, be warned in
> case of conflict. However it is currently savedin the output
> directory.
>
> I am sending this mail to understand how the community see this
> file, if there is something that needs to be changed to follow
> the new separation and see what I can do to get this going.
>
> (I will focus only in the buildroot .config file, the kernel,
> busybox and uclibc ones can be worked out after that)
>
> so, I have been looking around and there are a couple of
> approches I can think of...
>
>
> * keep the current approch
>
> .config is considered a throw away file, it is logical that
> it is in output/ and it is normal that it is destroyed on a
> regular basis.
>
> I don't like this too much because, for a final product, it
> is the most important file, and a file that needs to be
> kept in git. I don't think it is very logical to have such
> an important file be a hidden file and be in a directory that
> is meant to be removed.
>
> * keep the file as $(CONFIG_DIR)/.config, but document that
> CONFIG_DIR can be overridden
>
> This keeps the file as a hidden file, but it allows us to
> move it out of the output directory. Maybe CONFIG_DIR should
> default to BR2_EXTERNAL instead of output/ (with some
> backward compatibility layer)
>
> * allow to override the configuration file with env variables
>
> Basically allow overriding BUILDROOT_CONFIG from the command
> line. This would solve all the problems I have but I am not
> sure it follows the buildroot philosophy, thus the long mail.
>
>
>
> This could be a subject for the buildroot days. If other people
> are interested I can add it to the list of topics...
>
>
> (note that I tried moving the kernel/busybox .config and it's
> more tricky than the buildroot one... maybe we need a generic
> infrastructure for kconfig enabled packages...)
>
>

I find it a strange strategy to put .config in git: this is why we
have the configs/ directory, and a target 'make savedefconfig' to
store the .config configuration in a defconfig file. If you don't like
defconfigs, you can still copy .config directly in the configs/
subdirectory.

Best regards,
Thomas



More information about the buildroot mailing list