public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] kbuild: Fix a false error of generic board support
@ 2014-12-16 20:56 mgerlach
  2014-12-16 23:56 ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: mgerlach @ 2014-12-16 20:56 UTC (permalink / raw)
  To: u-boot


Hello Masahiro Yamada,

Even the with this patch, we encountered a false error of generic board
support.  The problem was very interrmittent for us, but we were able 
to debug the problem to performing builds on EXT3 file systems which
have a time stamp resolution of one second.  To reproduce the problem,
touch ./include/config/auto.conf and .config on a configured uboot tree on
an EXT3 file system.

The patch below fixes the problem for us.  

Thanks,

Matthew Gerlach

---
 Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 99097e1..84de2f9 100644
--- a/Makefile
+++ b/Makefile
@@ -493,8 +493,12 @@ include/config/%.conf: $(KCONFIG_CONFIG) 
include/config/auto.conf.cmd
 # is up-to-date. When we switch to a different board configuration, old 
CONFIG
 # macros are still remaining in include/config/auto.conf. Without the 
following
 # gimmick, wrong config.mk would be included leading nasty 
warnings/errors.
-autoconf_is_current := $(if $(wildcard $(KCONFIG_CONFIG)),$(shell find . 
\
-		-path ./include/config/auto.conf -newer 
$(KCONFIG_CONFIG)))
+# We use if not (not -newer) so that we include config.mk in the event 
that the
+# file timestamps are exacty equal which can happen on EXT3 filesystems.
+autoconf_is_current := $(if $(wildcard $(KCONFIG_CONFIG)),\
+		$(if $(shell find . -path ./include/config/auto.conf \
+		\! -newer $(KCONFIG_CONFIG)),,./include/config/auto.conf))
+
 ifneq ($(autoconf_is_current),)
 include $(srctree)/config.mk
 endif
-- 
1.8.2.

> Before this commit, make terminated with an error
> where it shouldn't under some condition.
>
> This bug happened when we built a board unsupporting
> generic board right after building with generic board.
>
> For example, the following sequence failed.
> (harmony uses generic board but microblaze-generic does not
> support it)
>
>   $ make harmony_config
>   Configuring for harmony board...
>   $ make CROSS_COMPILE=arm-linux-gnueabi-
>     [ Build succeed ]
>   $ make microblaze-generic_config
>   Configuring for microblaze-generic board...
>   $ make CROSS_COMPILE=microblaze-linux-
>   Makefile:488: *** Your architecture does not support generic board.
>   Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file.
> Stop.
>
> We had to do "make mrproper" before building the microblaze board.
>
> This commit fixes this unconvenience.
>
> Move generic board sanity check to "prepare1" target,
> which is run after generation of include/autoconf.mk.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> ---
~                                  

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [U-Boot] [PATCH 0/2] Kbuild: Fix a false error of sanity check
@ 2014-02-24 13:11 Masahiro Yamada
  2014-02-24 13:11 ` [U-Boot] [PATCH 1/2] kbuild: Fix a false error of generic board support Masahiro Yamada
  0 siblings, 1 reply; 9+ messages in thread
From: Masahiro Yamada @ 2014-02-24 13:11 UTC (permalink / raw)
  To: u-boot




Masahiro Yamada (2):
  kbuild: Fix a false error of generic board support
  kbuild: Move linker sciript check to prepare1

 Makefile | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-12-19 20:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-16 20:56 [U-Boot] [PATCH 1/2] kbuild: Fix a false error of generic board support mgerlach
2014-12-16 23:56 ` Tom Rini
2014-12-17  1:04   ` Marek Vasut
2014-12-17 15:52     ` Tom Rini
2014-12-18 10:54       ` Masahiro Yamada
2014-12-18 10:42   ` Masahiro Yamada
2014-12-19 20:32     ` mgerlach
  -- strict thread matches above, loose matches on Subject: below --
2014-02-24 13:11 [U-Boot] [PATCH 0/2] Kbuild: Fix a false error of sanity check Masahiro Yamada
2014-02-24 13:11 ` [U-Boot] [PATCH 1/2] kbuild: Fix a false error of generic board support Masahiro Yamada
2014-02-24 23:59   ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox