[U-Boot] [PATCH v1 1/1] Fix autoconf_is_current make function

mgerlach mgerlach at opensource.altera.com
Wed Dec 10 17:52:11 CET 2014


Hi Everyone,

The patch below fixes the autoconf_is_current function in the u-boot build
system in the event that the file timestamps are identical.  This 
situation tends to occur when building u-boot on an EXT3 filesystem which
has 1 second resolution for timestamps.  In our case, the failure resulted
in the following message from the build system:

  Your architecture does not support generic board.
  Please undefine CONFIG_SYS_GENERIC_BOARD in your board config file.

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.1



More information about the U-Boot mailing list