build: add 'file' option for 'make defconfig'
PATCH 1/1 build: add 'file' option for 'make defconfig'
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.
--- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
@@ -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
Signature · 1 line
1.7.9.1.g97f7d
PATCH 1/1 build: add 'file' option for 'make defconfig'
Quoted 10 lines · 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.inAnd 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
Quoted 20 lines
Signed-off-by Felipe Contreras <[email protected]>--- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)Makefile +1
-1@@ -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
Signature · 6 lines
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
PATCH 1/1 build: add 'file' option for 'make defconfig'
Quoted 10 lines · Arnout Vandecappelle
Quoted 9 lines · 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
Quoted 8 lines
Quoted 1 line
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.
Signature · 1 line
Felipe Contreras
PATCH 1/1 build: add 'file' option for 'make defconfig'
In reply to Arnout VandecappelleHi,
Quoted 23 lines · Arnout Vandecappelle
Quoted 10 lines · 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.inAnd 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.
Quoted 7 lines
?Note that the way to do it without this patch would be:
cp ~/busybox-defconfig configs/busybox_defconfig
makebusybox_defconfigwhich 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
PATCH 1/1 build: add 'file' option for 'make defconfig'
Quoted 28 lines · Thomas De Schampheleire
Hi,
Quoted 25 lines · Arnout Vandecappelle
Quoted 10 lines · 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.inAnd 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:
Quoted 8 lines
Quoted 5 lines
cp ~/busybox-defconfig configs/busybox_defconfig
makebusybox_defconfigwhich 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'.
Quoted 5 lines
Felipe, are you aware of the suggested behavior of placing your defconfig file in configs/ and 'enabling' it with:
makeyour_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.
Signature · 1 line
Felipe Contreras
PATCH 1/1 build: add 'file' option for 'make defconfig'
Quoted 6 lines · On Tuesday 14 February 2012 13:44:03 Felipe Contreras wrote:
Quoted 1 line
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
Signature · 9 lines
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>
PATCH 1/1 build: add 'file' option for 'make defconfig'
Quoted 18 lines · Arnout Vandecappelle
Quoted 11 lines · On Tuesday 14 February 2012 13:44:03 Felipe Contreras wrote:
Quoted 1 line
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.
Quoted 6 lines
BTW, regarding the naming: eventually I'd like to include
BR2_DEFCONFIGin the .config, which gets qstripped to DEFCONFIG in the
Makefile. This canbe 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.
Signature · 1 line
Felipe Contreras
PATCH 1/1 build: add 'file' option for 'make defconfig'
In reply to Arnout VandecappelleQuoted 10 lines · Arnout Vandecappelle
Quoted 7 lines · On Tuesday 14 February 2012 13:44:03 Felipe Contreras wrote:
Quoted 1 line
If one creates a defconfig file, why not store it in 'configs' ?
Because it's personal.
Quoted 6 lines
Quoted 3 lines
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.
Quoted 8 lines
BTW, regarding the naming: eventually I'd like to include
BR2_DEFCONFIGin the .config, which gets qstripped to DEFCONFIG in the
Makefile. This canbe 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
PATCH 1/1 build: add 'file' option for 'make defconfig'
Quoted 2 lines · Thomas De Schampheleire
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 =/
Quoted 4 lines
Quoted 4 lines
BTW, regarding the naming: eventually I'd like to include
BR2_DEFCONFIGin the .config, which gets qstripped to DEFCONFIG in the
Makefile. This can
Quoted 8 lines
Quoted 2 lines
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.htmlIt 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.
Signature · 1 line
Felipe Contreras
PATCH 1/1 build: add 'file' option for 'make defconfig'
Quoted 18 lines · Felipe Contreras
Quoted 2 lines · Thomas De Schampheleire
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 =/
Quoted 10 lines
Quoted 6 lines
BTW, regarding the naming: eventually I'd like to include
BR2_DEFCONFIGin the .config, which gets qstripped to DEFCONFIG in the
Makefile. This canbe 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
Quoted 6 lines
Quoted 2 lines
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