Skip to contentSkip to conversation

add some simple "config & build" board shortcuts

PATCH New Mike Frysinger 2 participants 3 messages Nov 18, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add some simple "config & build" board shortcuts

I like to be able to do make foo and have buildroot build up an image for the board named "foo". This saves me from having to do a full clean, config, and make cycle. Yes, I am that lazy :P.

---
 Makefile |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
Makefile +5 -1
index 0396e37..f6d82df 100644
@@ -562,6 +562,11 @@ source-check: allyesconfig
 
 endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 
+%: $(TOPDIR)/configs/%_defconfig
+	$(MAKE) clean
+	$(MAKE) $@_defconfig
+	$(MAKE)
+
 #############################################################
 #
 # Cleanup and misc junk
@@ -638,4 +643,3 @@ release:
 	git archive --format=tar --prefix=$(OUT)/ master|gzip -9 >$(OUT).tar.gz
 
 .PHONY: $(noconfig_targets)
-
Signature · 1 line
1.7.3.2
#1 lore raw

PATCH 1/1 add some simple "config & build" board shortcuts

Quoted 3 lines · On Thu, 18 Nov 2010 05:26:36 -0500 Mike Frysinger <[email protected]> wrote:

I like to be able to do make foo and have buildroot build up an image for the board named "foo". This saves me from having to do a full clean, config, and make cycle. Yes, I am that lazy :P.

I'd prefer not to have this in Buildroot. The general direction we are taking (from my point of view) is to try to *reduce* the number of make targets and the number of ways to use Buildroot, in order to make it easier/simpler to understand for users.

So just like we removed options whose sole purpose was to rename final target images, I think we should not add new make targets that should instead simply be a shell invocation "make clean && make foobar_defconfig && make". In addition to this, I am not sure your implementation correctly passes down the O= argument for out-of-tree builds.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 add some simple "config & build" board shortcuts

Quoted 9 lines · On Thursday, November 18, 2010 05:59:10 Thomas Petazzoni wrote:
Quoted 3 lines · On Thu, 18 Nov 2010 05:26:36 -0500 Mike Frysinger wrote:

I like to be able to do make foo and have buildroot build up an image for the board named "foo". This saves me from having to do a full clean, config, and make cycle. Yes, I am that lazy :P.

I'd prefer not to have this in Buildroot. The general direction we are taking (from my point of view) is to try to *reduce* the number of make targets and the number of ways to use Buildroot, in order to make it easier/simpler to understand for users.

i dont think this has any real impact on "usability" for new users. buildroot shouldnt really be forcing people into strict usage patterns to cater to new users while screwing power users. the existing distro for Blackfin processors has similar targets and gets used quite a bit.

Quoted 6 lines

So just like we removed options whose sole purpose was to rename final target images, I think we should not add new make targets that should instead simply be a shell invocation "make clean && make foobar_defconfig && make". In addition to this, I am not sure your implementation correctly passes down the O= argument for out-of-tree builds.

i dont see any reason why it wouldnt work. it's using $(MAKE) after all, not make, to process the sub-targets, and that, by design, preserves the original make setup. and if this were true, i dont see how any of the current $(MAKE) usage in the top level Makefile wouldnt also be broken.

also, please maintain proper CC when replying. not everyone gets e-mail from the buildroot list.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101118/d8d247c0/attachment.pgp>