[Buildroot] [git commit] busybox: copy config file from configure iso extract step

Peter Korsgaard peter at korsgaard.com
Fri Feb 14 20:36:37 UTC 2014


commit: http://git.buildroot.net/buildroot/commit/?id=eedfc7121cf5b9a8dee8546c85b3bd36e9a743a4
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The three typical packages that use .config files in buildroot copy the
config file at different times in the build process:

    busybox copies its .config from the post-extract hook.
    linux copies its .config in the configure_cmds.
    uclibc copies its .config from the post-patch hook.

Copying the .config file from the configure step is the only way to properly
support an OVERRIDE_SRCDIR that does not yet have the .config file, because
the extract and patch steps are skipped in that case.

For example, when setting a BUSYBOX_OVERRIDE_SRCDIR to a cleanly extracted
busybox tarball:

$ make busybox-dirclean busybox
rm -Rf [..]/output/build/busybox-custom
>>> busybox custom Syncing from source dir
>>> /home/tdescham/repo/contrib/busybox-1.21.1
rsync -au --exclude .svn --exclude .git --exclude .hg --exclude .bzr
            --exclude CVS /home/tdescham/repo/contrib/busybox-1.21.1/
            [..]/output/build/busybox-custom
>>> busybox custom Configuring
/bin/sed -i -e "/\\<CONFIG_NOMMU\\>/d"
                            [..]/output/build/busybox-custom/.config
/bin/sed: can't read [..]/output/build/busybox-custom/.config:
                                            No such file or directory
make: *** [[..]/output/build/busybox-custom/.stamp_configured] Error 2

This patch modifies busybox.mk to copy the config file from the configure
step instead, as linux is doing, and fixing the described scenario.

This fixes bug #5030: https://bugs.busybox.net/show_bug.cgi?id=5030

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/busybox/busybox.mk |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 2a8e616..793ffb9 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -180,10 +180,8 @@ define BUSYBOX_INSTALL_WATCHDOG_SCRIPT
 endef
 endif
 
-# We do this here to avoid busting a modified .config in configure
-BUSYBOX_POST_EXTRACT_HOOKS += BUSYBOX_COPY_CONFIG
-
 define BUSYBOX_CONFIGURE_CMDS
+	$(BUSYBOX_COPY_CONFIG)
 	$(BUSYBOX_SET_MMU)
 	$(BUSYBOX_SET_LARGEFILE)
 	$(BUSYBOX_SET_IPV6)


More information about the buildroot mailing list