* [Buildroot] [PATCH v3 02/10] target/generic: add filesystem overlay option
2012-11-08 8:36 [Buildroot] [PATCH v3 01/10] manual: add section about storing the configuration Arnout Vandecappelle
@ 2012-11-08 8:36 ` Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 03/10] ctng: add ctng-update-config target Arnout Vandecappelle
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-11-08 8:36 UTC (permalink / raw)
To: buildroot
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
The filesystem overlay is a tree that is copied over the target fs
after building everything - which is currently usually done in the
post-build script.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
v3: keep the custom skeleton documentation
v2: don't deprecate custom skeleton
---
Makefile | 9 +++++++++
docs/manual/customize-rootfs.txt | 15 ++++++++++-----
docs/manual/customize-store.txt | 13 +++++--------
system/Config.in | 11 +++++++++++
4 files changed, 35 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile
index c526fe1..e6eb379 100644
--- a/Makefile
+++ b/Makefile
@@ -464,6 +464,15 @@ endif
echo "PRETTY_NAME=\"Buildroot $(BR2_VERSION)\"" \
) > $(TARGET_DIR)/etc/os-release
+ @for dir in $(call qstrip,$(BR2_ROOTFS_OVERLAY)); do \
+ if [ -d $${dir} ]; then \
+ $(call MESSAGE,"Copying overlay $${dir}"); \
+ rsync -a \
+ --exclude .svn --exclude .git --exclude .hg --exclude '*~' \
+ $${dir}/ $(TARGET_DIR); \
+ fi \
+ done
+
ifneq ($(BR2_ROOTFS_POST_BUILD_SCRIPT),"")
@$(call MESSAGE,"Executing post-build script")
$(BR2_ROOTFS_POST_BUILD_SCRIPT) $(TARGET_DIR)
diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
index 44007c7..9be23ae 100644
--- a/docs/manual/customize-rootfs.txt
+++ b/docs/manual/customize-rootfs.txt
@@ -1,5 +1,6 @@
Customizing the generated target filesystem
-------------------------------------------
+[customize-rootfs]
There are a few ways to customize the resulting target filesystem:
@@ -18,16 +19,20 @@ There are a few ways to customize the resulting target filesystem:
skeleton are copied to output/target before any package
installation.
+* Create a filesystem overlay: a tree of files that are copied directly
+ over the target filesystem after it has been built. Set
+ +BR2_ROOTFS_OVERLAY+ to the top of the tree. +.git+, +.svn+,
+ +.hg+ directories and files ending with +~+ are excluded.
+
* In the Buildroot configuration, you can specify the path to a
post-build script, that gets called 'after' Buildroot builds all the
selected software, but 'before' the rootfs packages are
assembled. The destination root filesystem folder is given as the
first argument to this script, and this script can then be used to
- copy programs, static data or any other needed file to your target
- filesystem. You should, however, use this feature with care.
- Whenever you find that a certain package generates wrong or unneeded
- files, you should fix that package rather than work around it with a
- post-build cleanup script.
+ remove or modify any file in your target filesystem. You should,
+ however, use this feature with care. Whenever you find that a certain
+ package generates wrong or unneeded files, you should fix that
+ package rather than work around it with a post-build cleanup script.
* A special package, 'customize', stored in +package/customize+ can be
used. You can put all the files that you want to see in the final
diff --git a/docs/manual/customize-store.txt b/docs/manual/customize-store.txt
index a62d3e2..aa57660 100644
--- a/docs/manual/customize-store.txt
+++ b/docs/manual/customize-store.txt
@@ -134,15 +134,12 @@ you can skip the steps that are not relevant for your use case.
1. Create +board/<manufacturer>/<boardname>/fs-overlay/+ and fill it
with additional files you need on your rootfs, e.g.
+board/<manufacturer>/<boardname>/fs-overlay/etc/inittab+.
+ Set +BR2_ROOTFS_OVERLAY+
+ to +board/<manufacturer>/<boardname>/fs-overlay+.
1. Create a post-build script
- +board/<manufacturer>/<boardname>/post-build.sh+. It should contain
- the following command:
-+
-------------
-rsync -a --exclude .empty --exclude '*~' ${0%/*}/fs-overlay $1
-------------
-+
-1. Set +BR2_ROOTFS_POST_BUILD_SCRIPT+ to +board/<manufacturer>/<boardname>/post-build.sh+
+ +board/<manufacturer>/<boardname>/post-build.sh+. Set
+ +BR2_ROOTFS_POST_BUILD_SCRIPT+ to
+ +board/<manufacturer>/<boardname>/post-build.sh+
1. If additional setuid permissions have to be set or device nodes have
to be created, create +board/<manufacturer>/<boardname>/device_table.txt+
and add that path to +BR2_ROOTFS_DEVICE_TABLE+.
diff --git a/system/Config.in b/system/Config.in
index 10c9d9d..1859be6 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -166,6 +166,17 @@ config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
endif # BR2_ROOTFS_SKELETON_DEFAULT
+config BR2_ROOTFS_OVERLAY
+ string "Root filesystem overlay directories"
+ default ""
+ help
+ Specify a list of directories that are copied over the target
+ root filesystem after the build has finished and before it is
+ packed into the selected filesystem images.
+
+ They are copied as-is into the rootfs, excluding files ending with
+ ~ and .git, .svn and .hg directories.
+
config BR2_ROOTFS_POST_BUILD_SCRIPT
string "Custom script to run before creating filesystem images"
default ""
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH v3 03/10] ctng: add ctng-update-config target
2012-11-08 8:36 [Buildroot] [PATCH v3 01/10] manual: add section about storing the configuration Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 02/10] target/generic: add filesystem overlay option Arnout Vandecappelle
@ 2012-11-08 8:36 ` Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 04/10] busybox: busybox-update-config should depend on busybox-configure Arnout Vandecappelle
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-11-08 8:36 UTC (permalink / raw)
To: buildroot
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
Analogous to linux-update-config and friends.
Also update documentation.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
docs/manual/customize-store.txt | 11 ++++++-----
toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 3 +++
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/docs/manual/customize-store.txt b/docs/manual/customize-store.txt
index aa57660..3eb76ef 100644
--- a/docs/manual/customize-store.txt
+++ b/docs/manual/customize-store.txt
@@ -59,12 +59,13 @@ configuration files easier.
path specified by +BR2_PACKAGE_BUSYBOX_CONFIG+.
* +make uclibc-update-config+ saves the uClibc configuration to the
path specified by +BR2_UCLIBC_CONFIG+.
+* +make ctng-update-config+ saves the crosstool-NG configuration to the
+ patch specified by +BR2_TOOLCHAIN_CTNG_CONFIG+.
* +make barebox-update-defconfig+ saves the barebox configuration to the
path specified by +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+.
-* For crosstool-NG and at91bootstrap3 and no helper exists so you
- have to copy the config file manually to +BR2_TOOLCHAIN_CTNG_CONFIG+,
- resp. +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+.
-
+* For at91bootstrap3, no helper exists so you
+ have to copy the config file manually to
+ +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+.
Creating your own board support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -127,7 +128,7 @@ you can skip the steps that are not relevant for your use case.
1. Write the configuration files:
* +make linux-update-defconfig+
* +make busybox-update-config+
- * +cp <output>/build/build-toolchain/.config board/<manufacturer>/<boardname>/ctng.config+
+ * +make ctng-update-config+
* +make uclibc-update-config+
* +cp <output>/build/at91bootstrap3-*/.config board/<manufacturer>/<boardname>/at91bootstrap3.config+
* +make barebox-update-defconfig+
diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
index 5f9119d..85ca71e 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
@@ -397,3 +397,6 @@ ctng-menuconfig: $(CTNG_DIR)/.config
$(call ctng-oldconfig,$<)
$(call ctng-check-config-changed,$<,$<.timestamp)
$(Q)rm -f $<.timestamp
+
+ctng-update-config: $(CTNG_DIR)/.config
+ cp -f $< $(CTNG_CONFIG_FILE)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH v3 04/10] busybox: busybox-update-config should depend on busybox-configure
2012-11-08 8:36 [Buildroot] [PATCH v3 01/10] manual: add section about storing the configuration Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 02/10] target/generic: add filesystem overlay option Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 03/10] ctng: add ctng-update-config target Arnout Vandecappelle
@ 2012-11-08 8:36 ` Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 05/10] at91bootstrap3: add -update-config target Arnout Vandecappelle
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-11-08 8:36 UTC (permalink / raw)
To: buildroot
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
Before the config file can be copied, it has to exist. The
other xxx-update-config targets do this as well.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
v2: small spelling mistake in commit message
---
package/busybox/busybox.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 549e150..14a0ea2 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -218,5 +218,5 @@ busybox-menuconfig busybox-xconfig busybox-gconfig: busybox-patch
rm -f $(BUSYBOX_DIR)/.stamp_built
rm -f $(BUSYBOX_DIR)/.stamp_target_installed
-busybox-update-config:
+busybox-update-config: busybox-configure
cp -f $(BUSYBOX_BUILD_CONFIG) $(BUSYBOX_CONFIG_FILE)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH v3 05/10] at91bootstrap3: add -update-config target
2012-11-08 8:36 [Buildroot] [PATCH v3 01/10] manual: add section about storing the configuration Arnout Vandecappelle
` (2 preceding siblings ...)
2012-11-08 8:36 ` [Buildroot] [PATCH v3 04/10] busybox: busybox-update-config should depend on busybox-configure Arnout Vandecappelle
@ 2012-11-08 8:36 ` Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 06/10] Add update-all-configs target Arnout Vandecappelle
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-11-08 8:36 UTC (permalink / raw)
To: buildroot
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
v3: update documentation as well
---
boot/at91bootstrap3/at91bootstrap3.mk | 7 +++++++
docs/manual/customize-store.txt | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/boot/at91bootstrap3/at91bootstrap3.mk b/boot/at91bootstrap3/at91bootstrap3.mk
index 74f08e8..bb6ef09 100644
--- a/boot/at91bootstrap3/at91bootstrap3.mk
+++ b/boot/at91bootstrap3/at91bootstrap3.mk
@@ -65,3 +65,10 @@ $(error No at91bootstrap3 configuration file specified, check your BR2_TARGET_AT
endif
endif
endif
+
+ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y)
+at91bootstrap3-update-config: at91bootstrap3-configure
+ cp -f $(AT91BOOTSTRAP3_DIR)/.config $(AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE)
+else
+at91bootstrap3-update-config: ;
+endif
diff --git a/docs/manual/customize-store.txt b/docs/manual/customize-store.txt
index 3eb76ef..6c799ee 100644
--- a/docs/manual/customize-store.txt
+++ b/docs/manual/customize-store.txt
@@ -61,11 +61,11 @@ configuration files easier.
path specified by +BR2_UCLIBC_CONFIG+.
* +make ctng-update-config+ saves the crosstool-NG configuration to the
patch specified by +BR2_TOOLCHAIN_CTNG_CONFIG+.
+* +make at91bootstrap3-update-config+ saves the at91bootstrap3
+ configuration to the path specified by
+ +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+.
* +make barebox-update-defconfig+ saves the barebox configuration to the
path specified by +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+.
-* For at91bootstrap3, no helper exists so you
- have to copy the config file manually to
- +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+.
Creating your own board support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH v3 06/10] Add update-all-configs target
2012-11-08 8:36 [Buildroot] [PATCH v3 01/10] manual: add section about storing the configuration Arnout Vandecappelle
` (3 preceding siblings ...)
2012-11-08 8:36 ` [Buildroot] [PATCH v3 05/10] at91bootstrap3: add -update-config target Arnout Vandecappelle
@ 2012-11-08 8:36 ` Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 07/10] busybox: update-all-config shouldn't update default busybox config Arnout Vandecappelle
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-11-08 8:36 UTC (permalink / raw)
To: buildroot
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
The update-all-config starget updates all the external configuration
file with their current values. This includes:
- buildroot
- busybox
- linux
- crosstool-ng
- uClibc
- at91bootstrap3
- barebox
Linux and buildroot are saved as defconfigs. For Linux, this means
that it will fail on kernels before 2.6.33 (when the savedefconfig
was added to Linux Kconfig).
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
v3: - added barebox
- renamed to update-all-configs (Luca Ceresoli)
---
Makefile | 7 +++++++
boot/at91bootstrap3/at91bootstrap3.mk | 1 +
boot/barebox/barebox.mk | 1 +
docs/manual/customize-store.txt | 11 +++--------
linux/linux.mk | 2 ++
package/busybox/busybox.mk | 4 ++++
toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 4 ++++
toolchain/uClibc/uclibc.mk | 4 ++++
8 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index e6eb379..0e9ae92 100644
--- a/Makefile
+++ b/Makefile
@@ -549,6 +549,10 @@ legal-info: dirs legal-info-clean legal-info-prepare $(REDIST_SOURCES_DIR) \
show-targets:
@echo $(TARGETS)
+# UPDATE_ALL_CONFIGS_TARGETS is set by the individual packages that have a
+# save*config target.
+update-all-configs: savedefconfig $(UPDATE_ALL_CONFIGS_TARGETS)
+
else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
all: menuconfig
@@ -701,6 +705,9 @@ help:
@echo ' defconfig - New config with default answer to all options'
@echo ' BR2_DEFCONFIG, if set, is used as input'
@echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
+ @echo ' update-all-configs - Update all configuration targets that have an input:'
+ @echo ' buildroot, busybox, linux, crosstool-ng, uClibc,
+ @echo ' at91bootstrap3, barebox'
@echo ' allyesconfig - New config where all options are accepted with yes'
@echo ' allnoconfig - New config where all options are answered with no'
@echo ' randpackageconfig - New config with random answer to package options'
diff --git a/boot/at91bootstrap3/at91bootstrap3.mk b/boot/at91bootstrap3/at91bootstrap3.mk
index bb6ef09..902c153 100644
--- a/boot/at91bootstrap3/at91bootstrap3.mk
+++ b/boot/at91bootstrap3/at91bootstrap3.mk
@@ -69,6 +69,7 @@ endif
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y)
at91bootstrap3-update-config: at91bootstrap3-configure
cp -f $(AT91BOOTSTRAP3_DIR)/.config $(AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE)
+UPDATE_ALL_CONFIGS_TARGETS += at91bootstrap3-update-config
else
at91bootstrap3-update-config: ;
endif
diff --git a/boot/barebox/barebox.mk b/boot/barebox/barebox.mk
index a025d5f..bda2759 100644
--- a/boot/barebox/barebox.mk
+++ b/boot/barebox/barebox.mk
@@ -106,6 +106,7 @@ barebox-update-config: barebox-configure $(BAREBOX_DIR)/.config
barebox-update-defconfig: barebox-savedefconfig
cp -f $(BAREBOX_DIR)/defconfig $(BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE)
+UPDATE_ALL_CONFIGS_TARGETS += barebox-update-defconfig
else
barebox-update-config: ;
barebox-update-defconfig: ;
diff --git a/docs/manual/customize-store.txt b/docs/manual/customize-store.txt
index 6c799ee..e1bce3a 100644
--- a/docs/manual/customize-store.txt
+++ b/docs/manual/customize-store.txt
@@ -66,6 +66,8 @@ configuration files easier.
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+.
* +make barebox-update-defconfig+ saves the barebox configuration to the
path specified by +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+.
+* +make update-all-configs+ updates all of the above configuration files
+ for which you have defined the corresponding +_CONFIG+ option.
Creating your own board support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -125,13 +127,6 @@ you can skip the steps that are not relevant for your use case.
* +BR2_UCLIBC_CONFIG+
* +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+
* +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+
-1. Write the configuration files:
- * +make linux-update-defconfig+
- * +make busybox-update-config+
- * +make ctng-update-config+
- * +make uclibc-update-config+
- * +cp <output>/build/at91bootstrap3-*/.config board/<manufacturer>/<boardname>/at91bootstrap3.config+
- * +make barebox-update-defconfig+
1. Create +board/<manufacturer>/<boardname>/fs-overlay/+ and fill it
with additional files you need on your rootfs, e.g.
+board/<manufacturer>/<boardname>/fs-overlay/etc/inittab+.
@@ -144,7 +139,7 @@ you can skip the steps that are not relevant for your use case.
1. If additional setuid permissions have to be set or device nodes have
to be created, create +board/<manufacturer>/<boardname>/device_table.txt+
and add that path to +BR2_ROOTFS_DEVICE_TABLE+.
-1. +make savedefconfig+ to save the buildroot configuration.
+1. Save the configuration files: +make update-all-configs+
1. +cp defconfig configs/<boardname>_defconfig+
1. To add patches to the linux build, set +BR2_LINUX_KERNEL_PATCH+ to
+board/<manufacturer>/<boardname>/patches/linux/+ and add your
diff --git a/linux/linux.mk b/linux/linux.mk
index c4bdf90..7273ce6 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -151,6 +151,8 @@ ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y)
KERNEL_SOURCE_CONFIG = $(KERNEL_ARCH_PATH)/configs/$(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig
else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y)
KERNEL_SOURCE_CONFIG = $(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)
+# savedefconfig requires a kernel >= 2.6.33
+UPDATE_ALL_CONFIGS_TARGETS += linux-update-defconfig
endif
define LINUX_CONFIGURE_CMDS
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 14a0ea2..fb67b71 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -220,3 +220,7 @@ busybox-menuconfig busybox-xconfig busybox-gconfig: busybox-patch
busybox-update-config: busybox-configure
cp -f $(BUSYBOX_BUILD_CONFIG) $(BUSYBOX_CONFIG_FILE)
+
+ifneq ($(BUSYBOX_CONFIG_FILE),)
+UPDATE_ALL_CONFIGS_TARGETS += busybox-update-config
+endif
diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
index 85ca71e..f8dc88a 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
@@ -400,3 +400,7 @@ ctng-menuconfig: $(CTNG_DIR)/.config
ctng-update-config: $(CTNG_DIR)/.config
cp -f $< $(CTNG_CONFIG_FILE)
+
+ifneq ($(CTNG_CONFIG_FILE),)
+UPDATE_ALL_CONFIGS_TARGETS += ctng-update-config
+endif
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index 8cf59bc..c6ee491 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -508,6 +508,10 @@ uclibc-oldconfig: $(UCLIBC_DIR)/.oldconfig
uclibc-update-config: uclibc-config
cp -f $(UCLIBC_DIR)/.config $(UCLIBC_CONFIG_FILE)
+ifneq ($(UCLIBC_CONFIG_FILE),)
+UPDATE_ALL_CONFIGS_TARGETS += uclibc-update-config
+endif
+
uclibc-configured: gcc_initial kernel-headers $(UCLIBC_DIR)/.configured
uclibc-configured-source: uclibc-source
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH v3 07/10] busybox: update-all-config shouldn't update default busybox config
2012-11-08 8:36 [Buildroot] [PATCH v3 01/10] manual: add section about storing the configuration Arnout Vandecappelle
` (4 preceding siblings ...)
2012-11-08 8:36 ` [Buildroot] [PATCH v3 06/10] Add update-all-configs target Arnout Vandecappelle
@ 2012-11-08 8:36 ` Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 08/10] crosstool-ng: update-all-configs shouldn't update default crosstool-ng config Arnout Vandecappelle
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-11-08 8:36 UTC (permalink / raw)
To: buildroot
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
The new update-all-config target will update the busybox config file
if BR2_PACKAGE_BUSYBOX_CONFIG is set, even if it is set to the
default value in package/busybox/busybox-xxx.config.
To avoid this, set the default BR2_PACKAGE_BUSYBOX_CONFIG to empty,
and select a default to use in the .mk file.
Note that busybox-update-config will still overwrite the default
file in package/busybox/busybox-xxx.config - presumably it's
intentional.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v3: Add comment explaining the magic in BUSYBOX_CONFIG_VERSION.
I don't remember anymore if we decided during the developer days
whether this patch was a good idea or not, and I can't find it in
the report. So I leave it up to Peter to decide.
---
package/busybox/Config.in | 7 ++-----
package/busybox/busybox.mk | 10 ++++++----
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/package/busybox/Config.in b/package/busybox/Config.in
index dedcf18..0b77872 100644
--- a/package/busybox/Config.in
+++ b/package/busybox/Config.in
@@ -40,15 +40,12 @@ config BR2_BUSYBOX_VERSION
config BR2_PACKAGE_BUSYBOX_CONFIG
string "BusyBox configuration file to use?"
- default "package/busybox/busybox-1.20.x.config" if BR2_PACKAGE_BUSYBOX_SNAPSHOT
- default "package/busybox/busybox-1.18.x.config" if BR2_BUSYBOX_VERSION_1_18_X
- default "package/busybox/busybox-1.19.x.config" if BR2_BUSYBOX_VERSION_1_19_X
- default "package/busybox/busybox-1.20.x.config" if BR2_BUSYBOX_VERSION_1_20_X
+ default ""
help
Some people may wish to use their own modified BusyBox configuration
file, and will specify their config file location with this option.
- Most people will just use the default BusyBox configuration file.
+ If left empty, a default configuration file is used.
config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
bool "Show packages that are also provided by busybox"
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index fb67b71..a1a4b86 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -6,9 +6,12 @@
ifeq ($(BR2_PACKAGE_BUSYBOX_SNAPSHOT),y)
BUSYBOX_VERSION = snapshot
+BUSYBOX_CONFIG_VERSION = 1.20
BUSYBOX_SITE = http://www.busybox.net/downloads/snapshots
else
BUSYBOX_VERSION = $(call qstrip,$(BR2_BUSYBOX_VERSION))
+# Keep only the first two numbers of the version, e.g. 1.20.2 -> 1.20
+BUSYBOX_CONFIG_VERSION = $(subst $(space),.,$(wordlist 1,2,$(subst .,$(space),$(BUSYBOX_VERSION))))
BUSYBOX_SITE = http://www.busybox.net/downloads
endif
BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2
@@ -42,9 +45,8 @@ BUSYBOX_MAKE_OPTS = \
CONFIG_PREFIX="$(TARGET_DIR)" \
SKIP_STRIP=y
-ifndef BUSYBOX_CONFIG_FILE
- BUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG))
-endif
+BUSYBOX_CONFIG = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG))
+BUSYBOX_CONFIG_FILE = $(or $(wildcard $(BUSYBOX_CONFIG)),package/busybox/busybox-$(BUSYBOX_CONFIG_VERSION).x.config)
define BUSYBOX_PERMISSIONS
/bin/busybox f 4755 0 0 - - - - -
@@ -221,6 +223,6 @@ busybox-menuconfig busybox-xconfig busybox-gconfig: busybox-patch
busybox-update-config: busybox-configure
cp -f $(BUSYBOX_BUILD_CONFIG) $(BUSYBOX_CONFIG_FILE)
-ifneq ($(BUSYBOX_CONFIG_FILE),)
+ifneq ($(BUSYBOX_CONFIG),)
UPDATE_ALL_CONFIGS_TARGETS += busybox-update-config
endif
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH v3 08/10] crosstool-ng: update-all-configs shouldn't update default crosstool-ng config
2012-11-08 8:36 [Buildroot] [PATCH v3 01/10] manual: add section about storing the configuration Arnout Vandecappelle
` (5 preceding siblings ...)
2012-11-08 8:36 ` [Buildroot] [PATCH v3 07/10] busybox: update-all-config shouldn't update default busybox config Arnout Vandecappelle
@ 2012-11-08 8:36 ` Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 09/10] uClibc: update-all-configs shouldn't update default uClibc config Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 10/10] Make savedefconfig save to a configured file Arnout Vandecappelle
8 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-11-08 8:36 UTC (permalink / raw)
To: buildroot
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
The new update-all-configs target will update the ctng config file
if BR2_TOOLCHAIN_CTNG_CONFIG is set, even if it is set to the
default value in toolchain/toolchain-crosstool-ng/crosstool-ng.config-xxx
To avoid this, set the default BR2_TOOLCHAIN_CTNG_CONFIG to empty,
and select a default to use in the .mk file.
Note that ctng-update-config will still overwrite the default
file in toolchain/toolchain-crosstool-ng/crosstool-ng.config-xxx -
presumably it's intentional.
Also factored out the often-qstripped BR2_TOOLCHAIN_CTNG_LIBC (thereby
adding a few missing qstrips).
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
v2: fix copy-paste error in commit message (Samuel Martin)
---
toolchain/toolchain-crosstool-ng/Config.in | 6 ++----
toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 16 +++++++++-------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/toolchain/toolchain-crosstool-ng/Config.in b/toolchain/toolchain-crosstool-ng/Config.in
index 9cd5ca5..e55b206 100644
--- a/toolchain/toolchain-crosstool-ng/Config.in
+++ b/toolchain/toolchain-crosstool-ng/Config.in
@@ -40,15 +40,13 @@ config BR2_TOOLCHAIN_CTNG_LIBC
config BR2_TOOLCHAIN_CTNG_CONFIG
string "crosstool-NG configuration file to use"
- default "toolchain/toolchain-crosstool-ng/crosstool-ng.config-uClibc" if BR2_TOOLCHAIN_CTNG_uClibc
- default "toolchain/toolchain-crosstool-ng/crosstool-ng.config-eglibc" if BR2_TOOLCHAIN_CTNG_eglibc
- default "toolchain/toolchain-crosstool-ng/crosstool-ng.config-glibc" if BR2_TOOLCHAIN_CTNG_glibc
+ default ""
help
Enter here the crosstool-NG's .config file to use.
To fine-tune your toolchain, you can also call:
make ctng-menuconfig
- If unsure, keep the default value.
+ If left empty, a default configuration file is used.
if BR2_TOOLCHAIN_CTNG_uClibc
diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
index f8dc88a..4b1faca 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
@@ -9,9 +9,11 @@
# Internal variables
CTNG_DIR := $(BUILD_DIR)/build-toolchain
+CTNG_LIBC = $(call qstrip,$(BR2_TOOLCHAIN_CTNG_LIBC))
CTNG_UCLIBC_CONFIG_FILE := $(TOPDIR)/toolchain/uClibc/uClibc-0.9.33.config
-CTNG_CONFIG_FILE:=$(call qstrip,$(BR2_TOOLCHAIN_CTNG_CONFIG))
+CTNG_CONFIG = $(call qstrip,$(BR2_TOOLCHAIN_CTNG_CONFIG))
+CTNG_CONFIG_FILE = $(or $(wildcard $(CTNG_CONFIG)),toolchain/toolchain-crosstool-ng/crosstool-ng.config-$(CTNG_LIBC))
# Hack! ct-ng is in fact a Makefile script. As such, it accepts all
# make options, such as -C, which makes it uneeded to chdir prior
@@ -50,7 +52,7 @@ CTNG_LIBS_eglibc := $(CTNG_LIBS_glibc)
#--------------
# All that we need in /lib
-CTNG_LIBS_LIB += $(CTNG_LIBS_$(call qstrip,$(BR2_TOOLCHAIN_CTNG_LIBC)))
+CTNG_LIBS_LIB += $(CTNG_LIBS_$(CTNG_LIBC))
#--------------
# All that we need in /usr/lib
@@ -348,7 +350,7 @@ define ctng-oldconfig
$(call ctng,CT_IS_A_BACKEND=y \
CT_BACKEND_ARCH=$(CTNG_ARCH) \
CT_BACKEND_KERNEL=linux \
- CT_BACKEND_LIBC=$(BR2_TOOLCHAIN_CTNG_LIBC) \
+ CT_BACKEND_LIBC=$(CTNG_LIBC) \
oldconfig )
$(call ctng-fix-dot-config,$(1),$(CTNG_FIX_DOT_CONFIG_PATHS_SED))
endef
@@ -372,9 +374,9 @@ $(CTNG_DIR)/.config: $(CTNG_CONFIG_FILE) $(CONFIG_DIR)/.config
$(Q)if [ ! -f $@ ]; then \
mkdir -p "$(CTNG_DIR)"; \
libc="$$(awk -F '"' '$$1=="CT_LIBC=" { print $$2; }' "$<")"; \
- if [ "$${libc}" != "$(BR2_TOOLCHAIN_CTNG_LIBC)" ]; then \
+ if [ "$${libc}" != "$(CTNG_LIBC)" ]; then \
echo "* Inconsistency in crosstool-NG config file '$<'"; \
- echo "* - buildroot configured for '$(BR2_TOOLCHAIN_CTNG_LIBC)'"; \
+ echo "* - buildroot configured for '$(CTNG_LIBC)'"; \
echo "* - given config file for '$${libc}'"; \
exit 1; \
fi; \
@@ -392,7 +394,7 @@ ctng-menuconfig: $(CTNG_DIR)/.config
$(Q)$(call ctng,CT_IS_A_BACKEND=y \
CT_BACKEND_ARCH=$(CTNG_ARCH) \
CT_BACKEND_KERNEL=linux \
- CT_BACKEND_LIBC=$(BR2_TOOLCHAIN_CTNG_LIBC) \
+ CT_BACKEND_LIBC=$(CTNG_LIBC) \
menuconfig )
$(call ctng-oldconfig,$<)
$(call ctng-check-config-changed,$<,$<.timestamp)
@@ -401,6 +403,6 @@ ctng-menuconfig: $(CTNG_DIR)/.config
ctng-update-config: $(CTNG_DIR)/.config
cp -f $< $(CTNG_CONFIG_FILE)
-ifneq ($(CTNG_CONFIG_FILE),)
+ifneq ($(CTNG_CONFIG),)
UPDATE_ALL_CONFIGS_TARGETS += ctng-update-config
endif
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH v3 09/10] uClibc: update-all-configs shouldn't update default uClibc config
2012-11-08 8:36 [Buildroot] [PATCH v3 01/10] manual: add section about storing the configuration Arnout Vandecappelle
` (6 preceding siblings ...)
2012-11-08 8:36 ` [Buildroot] [PATCH v3 08/10] crosstool-ng: update-all-configs shouldn't update default crosstool-ng config Arnout Vandecappelle
@ 2012-11-08 8:36 ` Arnout Vandecappelle
2012-11-08 8:36 ` [Buildroot] [PATCH v3 10/10] Make savedefconfig save to a configured file Arnout Vandecappelle
8 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-11-08 8:36 UTC (permalink / raw)
To: buildroot
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
The new update-all-configs starget will update the uClibc config file
if BR2_UCLIBC_CONFIG is set, even if it is set to the default value
in toolchain/uClibc/uClibc-xxx.config.
To avoid this, set the default BR2_UCLIBC_CONFIG to empty, and select
a default to use in the .mk file.
Note that uclibc-update-config will still overwrite the default file
in toolchain/uClibc/uClibc-xxx.config - presumably it's intentional.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
v3: update-all-config -> update-all-configs
---
toolchain/uClibc/Config.in | 7 ++-----
toolchain/uClibc/uclibc.mk | 23 +++++++++++------------
2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/toolchain/uClibc/Config.in b/toolchain/uClibc/Config.in
index f46a415..9cce05d 100644
--- a/toolchain/uClibc/Config.in
+++ b/toolchain/uClibc/Config.in
@@ -42,15 +42,12 @@ config BR2_UCLIBC_VERSION_STRING
config BR2_UCLIBC_CONFIG
string "uClibc configuration file to use?"
- default "toolchain/uClibc/uClibc-0.9.31.config" if BR2_UCLIBC_VERSION_0_9_31
- default "toolchain/uClibc/uClibc-0.9.32.config" if BR2_UCLIBC_VERSION_0_9_32
- default "toolchain/uClibc/uClibc-0.9.33.config" if BR2_UCLIBC_VERSION_0_9_33
- default "toolchain/uClibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_SNAPSHOT
+ default ""
help
Some people may wish to use their own modified uClibc configuration
file and will specify their config file location with this option.
See also docs/README in this package.
- If unsure, use the default.
+ If left empty, a default configuration will be used.
config BR2_PTHREAD_DEBUG
bool "Thread library debugging"
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index c6ee491..634966f 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -6,22 +6,21 @@
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
-# specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config
-# setting.
-ifndef UCLIBC_CONFIG_FILE
-UCLIBC_CONFIG_FILE=$(call qstrip,$(BR2_UCLIBC_CONFIG))
-endif
-
-UCLIBC_VERSION:=$(call qstrip,$(BR2_UCLIBC_VERSION_STRING))
+UCLIBC_VERSION = $(call qstrip,$(BR2_UCLIBC_VERSION_STRING))
ifeq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y)
-UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots
-UCLIBC_DIR:=$(TOOLCHAIN_DIR)/uClibc
+UCLIBC_SITE = http://www.uclibc.org/downloads/snapshots
+UCLIBC_DIR = $(TOOLCHAIN_DIR)/uClibc
+UCLIBC_CONFIG_VERSION = snapshot
else
-UCLIBC_SITE:=http://www.uclibc.org/downloads
-UCLIBC_DIR:=$(TOOLCHAIN_DIR)/uClibc-$(UCLIBC_VERSION)
+UCLIBC_SITE = http://www.uclibc.org/downloads
+UCLIBC_DIR = $(TOOLCHAIN_DIR)/uClibc-$(UCLIBC_VERSION)
+UCLIBC_CONFIG_VERSION = $(subst $(space),.,$(wordlist 1,3,$(subst .,$(space),$(UCLIBC_VERSION))))
endif
+UCLIBC_CONFIG = $(call qstrip,$(BR2_UCLIBC_CONFIG))
+UCLIBC_CONFIG_FILE = $(or $(wildcard $(UCLIBC_CONFIG)),toolchain/uClibc/uClibc-$(UCLIBC_CONFIG_VERSION).config)
+
UCLIBC_PATCH_DIR:=toolchain/uClibc/
UCLIBC_SOURCE:=uClibc-$(UCLIBC_VERSION).tar.bz2
@@ -508,7 +507,7 @@ uclibc-oldconfig: $(UCLIBC_DIR)/.oldconfig
uclibc-update-config: uclibc-config
cp -f $(UCLIBC_DIR)/.config $(UCLIBC_CONFIG_FILE)
-ifneq ($(UCLIBC_CONFIG_FILE),)
+ifneq ($(UCLIBC_CONFIG),)
UPDATE_ALL_CONFIGS_TARGETS += uclibc-update-config
endif
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH v3 10/10] Make savedefconfig save to a configured file.
2012-11-08 8:36 [Buildroot] [PATCH v3 01/10] manual: add section about storing the configuration Arnout Vandecappelle
` (7 preceding siblings ...)
2012-11-08 8:36 ` [Buildroot] [PATCH v3 09/10] uClibc: update-all-configs shouldn't update default uClibc config Arnout Vandecappelle
@ 2012-11-08 8:36 ` Arnout Vandecappelle
8 siblings, 0 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2012-11-08 8:36 UTC (permalink / raw)
To: buildroot
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
Store BR2_DEFCONFIG in .config, and use it to update the original input
defconfig file after updating the configuration. When a config is
created by using the BR2_DEFCONFIG=... option, this is saved in the
.config file; later runs of savedefconfig will update that same location.
It is also possible to configure this place in the interactive
configuration.
The BR2_DEFCONFIG value itself is not saved into the generated
defconfig, since Kconfig considers it at its default. This is
intentional, to avoid hard-coding an absolute path in the defconfig.
It will anyway be set again when the defconfig is used with the
'make BR2_DEFCONFIG=... defconfig' command.
As a side-effect of this change, the *config options have been moved out
of the BR2_HAVE_DOT_CONFIG condition. This doesn't make any functional
difference, because the .config is still not read for the *config targets.
However, the defconfig and savedefconfig targets do need to include
.config now, which makes them slightly slower.
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
---
v3: replaced foo_defconfig documentation with BR2_DEFCONFIG.
---
Config.in | 12 ++++++++++++
Makefile | 17 +++++++++++++----
docs/manual/customize-store.txt | 10 ++++++----
3 files changed, 31 insertions(+), 8 deletions(-)
diff --git a/Config.in b/Config.in
index 68190a5..27afbd1 100644
--- a/Config.in
+++ b/Config.in
@@ -16,6 +16,18 @@ config BR2_HOSTARCH
source "arch/Config.in"
+config BR2_DEFCONFIG_FROM_ENV
+ string
+ option env="BR2_DEFCONFIG"
+
+config BR2_DEFCONFIG
+ string "Location to save buildroot config"
+ default BR2_DEFCONFIG_FROM_ENV if BR2_DEFCONFIG_FROM_ENV != ""
+ default "$(CONFIG_DIR)/defconfig"
+ help
+ When running 'make savedefconfig', the defconfig file will be saved
+ in this location.
+
menu "Build options"
menu "Commands"
diff --git a/Makefile b/Makefile
index 0e9ae92..a1b0742 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,7 @@ DATE:=$(shell date +%Y%m%d)
export BR2_VERSION_FULL:=$(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
noconfig_targets:=menuconfig nconfig gconfig xconfig config oldconfig randconfig \
- defconfig %_defconfig savedefconfig allyesconfig allnoconfig silentoldconfig release \
+ %_defconfig allyesconfig allnoconfig silentoldconfig release \
randpackageconfig allyespackageconfig allnopackageconfig \
source-check print-version
@@ -557,6 +557,8 @@ else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
all: menuconfig
+endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
+
# configuration
# ---------------------------------------------------------------------------
@@ -567,7 +569,12 @@ $(BUILD_DIR)/buildroot-config/%onf:
mkdir -p $(@D)/lxdialog
$(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
+DEFCONFIG = $(call qstrip,$(BR2_DEFCONFIG))
+
+# We don't want to fully expand BR2_DEFCONFIG here, so Kconfig will
+# recognize that if it's still at its default $(CONFIG_DIR)/defconfig
COMMON_CONFIG_ENV = \
+ BR2_DEFCONFIG='$(call qstrip,$(value BR2_DEFCONFIG))' \
KCONFIG_AUTOCONFIG=$(BUILD_DIR)/buildroot-config/auto.conf \
KCONFIG_AUTOHEADER=$(BUILD_DIR)/buildroot-config/autoconf.h \
KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
@@ -639,7 +646,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$(if $(BR2_DEFCONFIG),=$(BR2_DEFCONFIG)) $(CONFIG_CONFIG_IN)
+ @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
@@ -647,13 +654,15 @@ defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
- @$(COMMON_CONFIG_ENV) $< --savedefconfig=$(CONFIG_DIR)/defconfig $(CONFIG_CONFIG_IN)
+ @$(COMMON_CONFIG_ENV) $< \
+ --savedefconfig=$(if $(DEFCONFIG),$(DEFCONFIG),$(CONFIG_DIR)/defconfig) \
+ $(CONFIG_CONFIG_IN)
# check if download URLs are outdated
source-check:
$(MAKE) DL_MODE=SOURCE_CHECK $(EXTRAMAKEARGS) source
-endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
+.PHONY: defconfig savedefconfig
#############################################################
#
diff --git a/docs/manual/customize-store.txt b/docs/manual/customize-store.txt
index e1bce3a..c175606 100644
--- a/docs/manual/customize-store.txt
+++ b/docs/manual/customize-store.txt
@@ -18,13 +18,15 @@ Buildroot configuration
^^^^^^^^^^^^^^^^^^^^^^^
For storing the buildroot configuration itself, buildroot offers the
-following command: +make savedefconfig+
+following command: +make savedefconfig+.
This strips the buildroot configuration down by removing configuration
options that are@their default value. The result is stored in a file
-called +defconfig+. Copy this file to +foo_defconfig+ in the +configs+
-directory. The configuration can then be rebuilt by running
-+make foo_defconfig+
+called +defconfig+. If you want to save it in another place, update set
+the +BR2_DEFCONFIG+ option, or call make with +make savedefconfig
+BR2_DEFCONFIG=<path-to-defconfig>+. The usual place is
++configs/<boardname>_defconfig+. The configuration can then be rebuilt by
+running +make <boardname>_defconfig+.
Alternatively, you can copy the file to any other place and rebuild with
+make defconfig BR2_DEFCONFIG=<path-to-defconfig-file>+.
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread