version_h := include/generated/version_autogenerated.h
timestamp_h := include/generated/timestamp_autogenerated.h
defaultenv_h := include/generated/defaultenv_autogenerated.h
+dt_h := include/generated/dt.h
no-dot-config-targets := clean clobber mrproper distclean \
help %docs check% coccicheck \
# prepare2 creates a makefile if using a separate output directory
prepare2: prepare3 outputmakefile cfg
-prepare1: prepare2 $(version_h) $(timestamp_h) \
+prepare1: prepare2 $(version_h) $(timestamp_h) $(dt_h) \
include/config/auto.conf
ifeq ($(wildcard $(LDSCRIPT)),)
@echo >&2 " Could not find linker script."
xxd -i ; echo ", 0x00" ; )
endef
+define filechk_dt.h
+ (if test -n "$${DEVICE_TREE}"; then \
+ echo \#define DEVICE_TREE \"$(DEVICE_TREE)\"; \
+ else \
+ echo \#define DEVICE_TREE CONFIG_DEFAULT_DEVICE_TREE; \
+ fi)
+endef
+
$(version_h): include/config/uboot.release FORCE
$(call filechk,version.h)
$(timestamp_h): $(srctree)/Makefile FORCE
$(call filechk,timestamp.h)
+$(dt_h): $(srctree)/Makefile FORCE
+ $(call filechk,dt.h)
+
$(defaultenv_h): $(CONFIG_DEFAULT_ENV_FILE:"%"=%) FORCE
$(call filechk,defaultenv.h)
#include <debug_uart.h>
#include <hang.h>
#include <spl.h>
+#include <generated/dt.h>
#include <asm/io.h>
#include <asm/spl.h>
int board_fit_config_name_match(const char *name)
{
/* Just empty function now - can't decide what to choose */
- debug("%s: %s\n", __func__, name);
+ debug("%s: Check %s, default %s\n", __func__, name, DEVICE_TREE);
- return 0;
+ if (!strcmp(name, DEVICE_TREE))
+ return 0;
+
+ return -1;
}
#endif