Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] build: add 'file' option for 'make defconfig'
@ 2012-02-11  0:03 Felipe Contreras
  2012-02-11 16:01 ` Arnout Vandecappelle
  0 siblings, 1 reply; 10+ messages in thread
From: Felipe Contreras @ 2012-02-11  0:03 UTC (permalink / raw)
  To: buildroot

So that this works:

 % make defconfig file=~/busybox-defconfig

Right now we have to do:

 % make $PWD/output/build/buildroot-config/conf
 % $PWD/output/build/buildroot-config/conf --defconfig=~/busybox-defconfig Config.in

And the first command would through an error. Not nice.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 25da853..5a26961 100644
--- a/Makefile
+++ b/Makefile
@@ -594,7 +594,7 @@ silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 
 defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@$(COMMON_CONFIG_ENV) $< --defconfig $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $< --defconfig$(addprefix =,$(file)) $(CONFIG_CONFIG_IN)
 
 %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-- 
1.7.9.1.g97f7d

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH] build: add 'file' option for 'make defconfig'
  2012-02-11  0:03 [Buildroot] [PATCH] build: add 'file' option for 'make defconfig' Felipe Contreras
@ 2012-02-11 16:01 ` Arnout Vandecappelle
  2012-02-11 17:29   ` Felipe Contreras
  2012-02-14  9:46   ` Thomas De Schampheleire
  0 siblings, 2 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-02-11 16:01 UTC (permalink / raw)
  To: buildroot

On Saturday 11 February 2012 01:03:16 Felipe Contreras wrote:
> So that this works:
> 
>  % make defconfig file=~/busybox-defconfig
> 
> Right now we have to do:
> 
>  % make $PWD/output/build/buildroot-config/conf
>  % $PWD/output/build/buildroot-config/conf --defconfig=~/busybox-defconfig Config.in
> 
> And the first command would through an error. Not nice.

 +1!  And such a graceful solution too!

 One remark, though: we normally use capitals for variables.  Also I'd make
it more clear that the file means the defconfig file, so you can write:

make DEFCONFIG=~/my-buildroot.config defconfig world

 And eventually we can even update the non-BR2_HAVE_DOT_CONFIG targets to
default to defconfig if DEFCONFIG is defined.


 Note that the way to do it without this patch would be:

cp ~/busybox-defconfig configs/busybox_defconfig
make busybox_defconfig

which doesn't error out.  However, it does require a writable buildroot
directory and it makes it dirty.


 Oh and another thing, I guess the example should by 'buildroot-defconfig'.


 Regards,
 Arnout

> 
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 25da853..5a26961 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -594,7 +594,7 @@ silentoldconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
>  
>  defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
>  	@mkdir -p $(BUILD_DIR)/buildroot-config
> -	@$(COMMON_CONFIG_ENV) $< --defconfig $(CONFIG_CONFIG_IN)
> +	@$(COMMON_CONFIG_ENV) $< --defconfig$(addprefix =,$(file)) $(CONFIG_CONFIG_IN)
>  
>  %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
>  	@mkdir -p $(BUILD_DIR)/buildroot-config
> 

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH] build: add 'file' option for 'make defconfig'
  2012-02-11 16:01 ` Arnout Vandecappelle
@ 2012-02-11 17:29   ` Felipe Contreras
  2012-02-14  9:46   ` Thomas De Schampheleire
  1 sibling, 0 replies; 10+ messages in thread
From: Felipe Contreras @ 2012-02-11 17:29 UTC (permalink / raw)
  To: buildroot

On Sat, Feb 11, 2012 at 6:01 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On Saturday 11 February 2012 01:03:16 Felipe Contreras wrote:
>> So that this works:
>>
>> ?% make defconfig file=~/busybox-defconfig
>>
>> Right now we have to do:
>>
>> ?% make $PWD/output/build/buildroot-config/conf
>> ?% $PWD/output/build/buildroot-config/conf --defconfig=~/busybox-defconfig Config.in
>>
>> And the first command would through an error. Not nice.
>
> ?+1! ?And such a graceful solution too!
>
> ?One remark, though: we normally use capitals for variables. ?Also I'd make
> it more clear that the file means the defconfig file, so you can write:
>
> make DEFCONFIG=~/my-buildroot.config defconfig world

I find it a bit redundant. Maybe FILE.

Cheers.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH] build: add 'file' option for 'make defconfig'
  2012-02-11 16:01 ` Arnout Vandecappelle
  2012-02-11 17:29   ` Felipe Contreras
@ 2012-02-14  9:46   ` Thomas De Schampheleire
  2012-02-14 12:44     ` Felipe Contreras
  1 sibling, 1 reply; 10+ messages in thread
From: Thomas De Schampheleire @ 2012-02-14  9:46 UTC (permalink / raw)
  To: buildroot

Hi,

On Sat, Feb 11, 2012 at 5:01 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On Saturday 11 February 2012 01:03:16 Felipe Contreras wrote:
>> So that this works:
>>
>> ?% make defconfig file=~/busybox-defconfig
>>
>> Right now we have to do:
>>
>> ?% make $PWD/output/build/buildroot-config/conf
>> ?% $PWD/output/build/buildroot-config/conf --defconfig=~/busybox-defconfig Config.in
>>
>> And the first command would through an error. Not nice.
>
> ?+1! ?And such a graceful solution too!
>
> ?One remark, though: we normally use capitals for variables. ?Also I'd make
> it more clear that the file means the defconfig file, so you can write:
>
> make DEFCONFIG=~/my-buildroot.config defconfig world
>
> ?And eventually we can even update the non-BR2_HAVE_DOT_CONFIG targets to
> default to defconfig if DEFCONFIG is defined.
>
>
> ?Note that the way to do it without this patch would be:
>
> cp ~/busybox-defconfig configs/busybox_defconfig
> make busybox_defconfig
>
> which doesn't error out. ?However, it does require a writable buildroot
> directory and it makes it dirty.

Is this really a problem?
If one creates a defconfig file, why not store it in 'configs' ?

Felipe, are you aware of the suggested behavior of placing your
defconfig file in configs/ and 'enabling' it with:
make your_defconfig
?
Could you explain why you don't think this is sufficient?

Thanks,
Thomas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH] build: add 'file' option for 'make defconfig'
  2012-02-14  9:46   ` Thomas De Schampheleire
@ 2012-02-14 12:44     ` Felipe Contreras
  2012-02-14 13:53       ` Arnout Vandecappelle
  0 siblings, 1 reply; 10+ messages in thread
From: Felipe Contreras @ 2012-02-14 12:44 UTC (permalink / raw)
  To: buildroot

On Tue, Feb 14, 2012 at 11:46 AM, Thomas De Schampheleire
<patrickdepinguin+buildroot@gmail.com> wrote:
> Hi,
>
> On Sat, Feb 11, 2012 at 5:01 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
>> On Saturday 11 February 2012 01:03:16 Felipe Contreras wrote:
>>> So that this works:
>>>
>>> ?% make defconfig file=~/busybox-defconfig
>>>
>>> Right now we have to do:
>>>
>>> ?% make $PWD/output/build/buildroot-config/conf
>>> ?% $PWD/output/build/buildroot-config/conf --defconfig=~/busybox-defconfig Config.in
>>>
>>> And the first command would through an error. Not nice.
>>
>> ?+1! ?And such a graceful solution too!
>>
>> ?One remark, though: we normally use capitals for variables. ?Also I'd make
>> it more clear that the file means the defconfig file, so you can write:
>>
>> make DEFCONFIG=~/my-buildroot.config defconfig world
>>
>> ?And eventually we can even update the non-BR2_HAVE_DOT_CONFIG targets to
>> default to defconfig if DEFCONFIG is defined.
>>
>>
>> ?Note that the way to do it without this patch would be:
>>
>> cp ~/busybox-defconfig configs/busybox_defconfig
>> make busybox_defconfig
>>
>> which doesn't error out. ?However, it does require a writable buildroot
>> directory and it makes it dirty.
>
> Is this really a problem?
> If one creates a defconfig file, why not store it in 'configs' ?

Because it's personal.

I want to be able to clone buildroot, and 'make defconfig
file=/media/drive/notes/my-buildroot-config'.

> Felipe, are you aware of the suggested behavior of placing your
> defconfig file in configs/ and 'enabling' it with:
> make your_defconfig
> ?
> Could you explain why you don't think this is sufficient?

It requires an extra step. Specially annoying when doing 'git clean
-fxd', and specially annoying while bisecting.

Plus, I think this command is perfectly understandable:
% make defconfig file=/media/drive/notes/my-buildroot-config

This not so much:
% cp /media/drive/notes/my-buildroot-config configs/my-defconfig
% make my-defconfig

Cheers.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH] build: add 'file' option for 'make defconfig'
  2012-02-14 12:44     ` Felipe Contreras
@ 2012-02-14 13:53       ` Arnout Vandecappelle
  2012-02-14 16:15         ` Felipe Contreras
  2012-02-15  6:58         ` Thomas De Schampheleire
  0 siblings, 2 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-02-14 13:53 UTC (permalink / raw)
  To: buildroot

On Tuesday 14 February 2012 13:44:03 Felipe Contreras wrote:
> > If one creates a defconfig file, why not store it in 'configs' ?
> 
> Because it's personal.
> 
> I want to be able to clone buildroot, and 'make defconfig
> file=/media/drive/notes/my-buildroot-config'.

 Same here.

 BTW, regarding the naming: eventually I'd like to include BR2_DEFCONFIG
in the .config, which gets qstripped to DEFCONFIG in the Makefile.  This can
be used to be able to store the config again, similar to linux-update-defconfig.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120214/24cdb088/attachment.html>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH] build: add 'file' option for 'make defconfig'
  2012-02-14 13:53       ` Arnout Vandecappelle
@ 2012-02-14 16:15         ` Felipe Contreras
  2012-02-15  6:58         ` Thomas De Schampheleire
  1 sibling, 0 replies; 10+ messages in thread
From: Felipe Contreras @ 2012-02-14 16:15 UTC (permalink / raw)
  To: buildroot

On Tue, Feb 14, 2012 at 3:53 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On Tuesday 14 February 2012 13:44:03 Felipe Contreras wrote:
>
>> > If one creates a defconfig file, why not store it in 'configs' ?
>
>>
>
>> Because it's personal.
>
>>
>
>> I want to be able to clone buildroot, and 'make defconfig
>
>> file=/media/drive/notes/my-buildroot-config'.
>
>
> Same here.
>
>
> BTW, regarding the naming: eventually I'd like to include BR2_DEFCONFIG
>
> in the .config, which gets qstripped to DEFCONFIG in the Makefile. This can
>
> be used to be able to store the config again, similar to
> linux-update-defconfig.

That would be nice. I just do 'make savedefconfig' and manually merge
the changes with gvimdiff (I might not want all of them).

Cheers.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH] build: add 'file' option for 'make defconfig'
  2012-02-14 13:53       ` Arnout Vandecappelle
  2012-02-14 16:15         ` Felipe Contreras
@ 2012-02-15  6:58         ` Thomas De Schampheleire
  2012-02-15 11:53           ` Felipe Contreras
  1 sibling, 1 reply; 10+ messages in thread
From: Thomas De Schampheleire @ 2012-02-15  6:58 UTC (permalink / raw)
  To: buildroot

On Tue, Feb 14, 2012 at 2:53 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On Tuesday 14 February 2012 13:44:03 Felipe Contreras wrote:
>
>> > If one creates a defconfig file, why not store it in 'configs' ?
>
>>
>
>> Because it's personal.
>
>>
>
>> I want to be able to clone buildroot, and 'make defconfig
>
>> file=/media/drive/notes/my-buildroot-config'.
>
>
> Same here.

Ok, I see. I have been used to having my own repository for buildroot
and didn't think of people who just download a tarball each time.

>
>
> BTW, regarding the naming: eventually I'd like to include BR2_DEFCONFIG
>
> in the .config, which gets qstripped to DEFCONFIG in the Makefile. This can
>
> be used to be able to store the config again, similar to
> linux-update-defconfig.

I once proposed a patch that did something similar:
http://lists.busybox.net/pipermail/buildroot/2011-February/041626.html

It would automatically save the last used 'defconfig' instead of
requiring an explicit 'file' option.


Being able to do 'make savedefconfig file=...' would also be nice.

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH] build: add 'file' option for 'make defconfig'
  2012-02-15  6:58         ` Thomas De Schampheleire
@ 2012-02-15 11:53           ` Felipe Contreras
  2012-02-15 11:54             ` Thomas De Schampheleire
  0 siblings, 1 reply; 10+ messages in thread
From: Felipe Contreras @ 2012-02-15 11:53 UTC (permalink / raw)
  To: buildroot

On Wed, Feb 15, 2012 at 8:58 AM, Thomas De Schampheleire
<patrickdepinguin+buildroot@gmail.com> wrote:
> Ok, I see. I have been used to having my own repository for buildroot
> and didn't think of people who just download a tarball each time.

Some might, I don't, but I don't want to be carrying patches for the
configs on all my branches either =/

>> BTW, regarding the naming: eventually I'd like to include BR2_DEFCONFIG
>>
>> in the .config, which gets qstripped to DEFCONFIG in the Makefile. This can
>>
>> be used to be able to store the config again, similar to
>> linux-update-defconfig.
>
> I once proposed a patch that did something similar:
> http://lists.busybox.net/pipermail/buildroot/2011-February/041626.html
>
> It would automatically save the last used 'defconfig' instead of
> requiring an explicit 'file' option.

Yeah but the defconfig would have to be on the configs dir.

Also, this saves the .config, not the simplified defconfig.

Cheers.

-- 
Felipe Contreras

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH] build: add 'file' option for 'make defconfig'
  2012-02-15 11:53           ` Felipe Contreras
@ 2012-02-15 11:54             ` Thomas De Schampheleire
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas De Schampheleire @ 2012-02-15 11:54 UTC (permalink / raw)
  To: buildroot

On Wed, Feb 15, 2012 at 12:53 PM, Felipe Contreras
<felipe.contreras@gmail.com> wrote:
> On Wed, Feb 15, 2012 at 8:58 AM, Thomas De Schampheleire
> <patrickdepinguin+buildroot@gmail.com> wrote:
>> Ok, I see. I have been used to having my own repository for buildroot
>> and didn't think of people who just download a tarball each time.
>
> Some might, I don't, but I don't want to be carrying patches for the
> configs on all my branches either =/
>
>>> BTW, regarding the naming: eventually I'd like to include BR2_DEFCONFIG
>>>
>>> in the .config, which gets qstripped to DEFCONFIG in the Makefile. This can
>>>
>>> be used to be able to store the config again, similar to
>>> linux-update-defconfig.
>>
>> I once proposed a patch that did something similar:
>> http://lists.busybox.net/pipermail/buildroot/2011-February/041626.html
>>
>> It would automatically save the last used 'defconfig' instead of
>> requiring an explicit 'file' option.
>
> Yeah but the defconfig would have to be on the configs dir.
>
> Also, this saves the .config, not the simplified defconfig.

True. I think at that time the 'savedefconfig' option was not yet in
buildroot or at least not known to me.

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-02-15 11:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-11  0:03 [Buildroot] [PATCH] build: add 'file' option for 'make defconfig' Felipe Contreras
2012-02-11 16:01 ` Arnout Vandecappelle
2012-02-11 17:29   ` Felipe Contreras
2012-02-14  9:46   ` Thomas De Schampheleire
2012-02-14 12:44     ` Felipe Contreras
2012-02-14 13:53       ` Arnout Vandecappelle
2012-02-14 16:15         ` Felipe Contreras
2012-02-15  6:58         ` Thomas De Schampheleire
2012-02-15 11:53           ` Felipe Contreras
2012-02-15 11:54             ` Thomas De Schampheleire

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox