[Buildroot] make -C <buildroot_directory> failed

Cameron Hutchison lists at xdna.net
Tue Feb 23 22:00:16 UTC 2010


"Matthew Davison" <matt.davison at lantronix.com> writes:

>Attempting to invoke the top level buildroot makefile from a higher
>level Makefile or simply with make -C <buildroot_directory> fails during
>the kernel build. This is even true if 'make -C .' is invoked from the
>top level buildroot directory, as long as a kernel build is enabled. It
>appears that the problem has something to do with make's
>"Entering/Leaving directory" messages, as the output below suggests.
>When I passed the --no-print-directory option to make, I was able to
>build without problems.

I think I see the problem. See if this patch fixes it. I haven't tested
this, but this looks right.

>From 5dbf2e25bbd7d4f4586888384b3c207dd1a6afca Mon Sep 17 00:00:00 2001
From: Cameron Hutchison <cam at camh.ch>
Date: Wed, 24 Feb 2010 08:52:44 +1100
Subject: [PATCH] Fix probing of kernel version

Probing the kernel version uses command substitution to capture the
result of a make command. If the top-level make is run with -C, the
sub-make will print entering/leaving directory messages, mucking up the
output we're trying to capture.

Invoke the sub-make with --no-print-directory so we get clean output.

Signed-off-by: Cameron Hutchison <cam at camh.ch>
---
 target/linux/Makefile.in.advanced |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target/linux/Makefile.in.advanced b/target/linux/Makefile.in.advanced
index b4774ca..7679d1e 100644
--- a/target/linux/Makefile.in.advanced
+++ b/target/linux/Makefile.in.advanced
@@ -41,7 +41,7 @@ endif
 endif
 
 # Ask the kernel what version number it will use when installing modules
-LINUX26_VERSION_PROBED = `$(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) -s kernelrelease`
+LINUX26_VERSION_PROBED = `$(MAKE) $(LINUX26_MAKE_FLAGS) -C $(LINUX26_DIR) --no-print-directory -s kernelrelease`
 
 ifeq ($(BOARD_PATH),)
 BOARD_PATH:=$(call qstrip,$(BR2_BOARD_PATH))
-- 
1.6.3.3




More information about the buildroot mailing list