[Buildroot] (no subject)

Bernhard Fischer rep.dot.nop at gmail.com
Sun Jan 28 22:18:18 UTC 2007


On Thu, Jan 25, 2007 at 11:44:36PM +0100, Ulf Samuelsson wrote:
>Author:	Ulf Samuelsson
>Date:	2007-01-25
>
>Log:
>	Here is my suggestion for supporting different BSP's
>	in the same buildroot structure
>	Add BINARIES_DIR directory, 
>	where resulting binaries can be stored
>	Typically this directory contains a subdirectory for each BSP.
>
>	Add TARGET_BUILD_DIR directory, where BSP for different
>	boards can be built without destroying results of previous
>	builds. Typically each BSP would build in a subdirectory of 
>	TARGET_BUILD_DIR
>
>Modified:
>	Config.in
>	Makefile
>	package/Makefile.in
>
>Changeset
>	Config.in
>	Makefile
>	package/Makefile.in
>

>Author:	Ulf Samuelsson
>Date:	2007-01-25
>
>Log:
>	Here is my suggestion for supporting different BSP's
>	in the same buildroot structure
>	Add BINARIES_DIR directory, 
>	where resulting binaries can be stored
>	Typically this directory contains a subdirectory for each BSP.
>
>	Add TARGET_BUILD_DIR directory, where BSP for different
>	boards can be built without destroying results of previous builds.
>	Typically each BSP would build in a subdirectory of TARGET_BUILD_DIR
>
>Modified:
>	Config.in
>	Makefile
>	package/Makefile.in
>
>Changeset
>	Config.in
>	Makefile
>	package/Makefile.in
>
>diff -urN buildroot/Config.in buildroot-atmel/Config.in
>--- buildroot/Config.in	2007-01-25 21:58:40.000000000 +0100
>+++ buildroot-atmel/Config.in	2007-01-25 23:34:50.000000000 +0100
>@@ -2,6 +2,17 @@
> 
> mainmenu "Buildroot2 Configuration"
> 
>+config BR2_BOARDNAME
>+	string "Boardname"
>+	default "board"

That default should be ""
and specific target/*/* should set this, no?

Also, please move below HAVE_DOT_CONFIG.

>+	help
>+	  Name is used to define subdirectories
>+	  * where the Board Support Packages are built
>+	    (Linux,Root fs Bootmonitor,Utilities etc.)
>+	  * where the resulting binaries are stored.
>+	  Older target may still build in the build_<arch>
>+	  and store binaries in the top directory.
>+
> config BR2_HAVE_DOT_CONFIG
> 	bool
> 	default y
>@@ -266,6 +277,7 @@
> 	depends BR2_arm
> 	string "Atmel AT91 Linux Patch download site"
> 	default "http://maxim.org.za/AT91RM9200/2.6/"
>+	help
> 	    Patches for the AT91 generated by the Linux community
> 	    usually ends up here, courtesy of Andrew Victor
> 	    
hunk not needed anymore.

>diff -urN buildroot/Makefile buildroot-atmel/Makefile
>--- buildroot/Makefile	2007-01-25 21:05:25.000000000 +0100
>+++ buildroot-atmel/Makefile	2007-01-25 23:36:12.000000000 +0100
>@@ -76,12 +76,16 @@
> TARGETS_SOURCE:=$(patsubst %,%-source,$(TARGETS))
> TARGETS_DIRCLEAN:=$(patsubst %,%-dirclean,$(TARGETS))
> 
>-world: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) $(TARGETS)
>+world: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
>+	$(TARGET_BUILD_DIR) $(BINARIES_DIR) \
>+	$(TARGETS)
>+
> dirs: $(DL_DIR) $(BUILD_DIR) $(STAGING_DIR)
> 
> .PHONY: all world dirs clean dirclean distclean source $(TARGETS) \
> 	$(TARGETS_CLEAN) $(TARGETS_DIRCLEAN) $(TARGETS_SOURCE) \
>-	$(DL_DIR) $(BUILD_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR)
>+	$(DL_DIR) $(BUILD_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR) \
>+	$(TARGET_BUILD_DIR) $(BINARIES_DIR)
> 
> #############################################################
> #
>@@ -115,6 +119,12 @@
> 	-find $(TARGET_DIR) -type d -name CVS | xargs rm -rf
> 	-find $(TARGET_DIR) -type d -name .svn | xargs rm -rf
> 
>+$(TARGET_BUILD_DIR):
>+	mkdir -p $(TARGET_BUILD_DIR)
>+
>+$(BINARIES_DIR):
>+	mkdir -p $(BINARIES_DIR)
>+

an
$(DL_DIR) $(BUILD_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR) \
$(TARGET_BUILD_DIR) $(BINARIES_DIR):
	mkdir -p $@

should do, too, i'd say. We could delete the other superfluous rules
then.

> source: $(TARGETS_SOURCE)
> 
> #############################################################
>diff -urN buildroot/package/Makefile.in buildroot-atmel/package/Makefile.in
>--- buildroot/package/Makefile.in	2007-01-25 21:05:25.000000000 +0100
>+++ buildroot-atmel/package/Makefile.in	2007-01-25 23:19:11.000000000 +0100
>@@ -42,6 +42,8 @@
> BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
> TARGET_DIR:=$(BUILD_DIR)/root
> TOOL_BUILD_DIR=$(BASE_DIR)/$(TOPDIR_PREFIX)toolchain_build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)
>+TARGET_BUILD_DIR:=$(BASE_DIR)/$(TOPDIR_PREFIX)target_build_$(ARCH)$(ARCH_FPU_SUFFIX)$(TOPDIR_SUFFIX)/$(BR2_BOARDNAME)
>+BINARIES_DIR:=$(BASE_DIR)/binaries/$(BR2_BOARDNAME)

shouldn't the BINARIES_DIR rather be only visible in targets/MAkefile.in
and below?  Just curious..



More information about the buildroot mailing list