u-boot.rom: u-boot-x86-16bit.bin u-boot.bin \
$(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \
- $(if $(CONFIG_HAVE_REFCODE),refcode.bin) FORCE
+ $(if $(CONFIG_HAVE_REFCODE),refcode.bin) checkbinman FORCE
$(call if_changed,binman)
OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec
endif
ifneq ($(CONFIG_ARCH_SUNXI),)
-u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE
+u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb \
+ checkbinman FORCE
$(call if_changed,binman)
endif
$(timestamp_h): $(srctree)/Makefile FORCE
$(call filechk,timestamp.h)
+checkbinman: tools
+ @if ! ( echo 'import libfdt' | ( PYTHONPATH=tools python )); then \
+ echo >&2; \
+ echo >&2 '*** binman needs the Python libfdt library.'; \
+ echo >&2 '*** Either install it on your system, or try:'; \
+ echo >&2 '***'; \
+ echo >&2 '*** sudo apt-get install swig libpython-dev'; \
+ echo >&2 '***'; \
+ echo >&2 '*** to have U-Boot build its own version.'; \
+ false; \
+ fi
+
# ---------------------------------------------------------------------------
quiet_cmd_cpp_lds = LDS $@
cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) \
dts_dir:
$(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts)
-include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir dtoc
+include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir checkdtoc
$(call if_changed,dtoch)
-$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir dtoc
+$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir checkdtoc
$(call if_changed,dtocc)
-dtoc: #$(objtree)/tools/_libfdt.so
-
ifdef CONFIG_SAMSUNG
ifdef CONFIG_VAR_SIZE_SPL
VAR_SIZE_PARAM = --vs
include $(cmd_files)
endif
+checkdtoc: tools
+ @if ! ( echo 'import libfdt' | ( PYTHONPATH=tools python )); then \
+ echo '*** dtoc needs the Python libfdt library. Either '; \
+ echo '*** install it on your system, or try:'; \
+ echo '***'; \
+ echo '*** sudo apt-get install swig libpython-dev'; \
+ echo '***'; \
+ echo '*** to have U-Boot build its own version.'; \
+ false; \
+ fi
+
PHONY += FORCE
FORCE: