diff options
author | Simon Glass <sjg@chromium.org> | 2017-05-27 07:38:23 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-06-02 10:17:50 -0600 |
commit | e38ffc42674fedc750ca895046be0bd983b56dd5 (patch) | |
tree | ad48702d5c9f5e12cbb352179cf70fd0414cc7a7 /scripts/Makefile.spl | |
parent | b4360206a4bc67404125b0478132aeaeea41683f (diff) | |
download | u-boot-e38ffc42674fedc750ca895046be0bd983b56dd5.tar.gz |
fdt: Makefile: Build python libfdt library if needed
This is needed by binman and dtoc, so if those are being used, check that
the library is present and complain if not. Make sure that any error
appears on stderr so that buildman notices it.
This means that the fallback library (which uses fdtget) will not be used
anymore and swig will need to be installed to use binman / dtoc.
This affects any board which uses binman (currently sunxi and x86) or dtoc
(anything that uses CONFIG_SPL_OF_PLATDATA, currently some rockchip
boards).
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts/Makefile.spl')
-rw-r--r-- | scripts/Makefile.spl | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 135706f21d..ac3c2c7f13 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -257,14 +257,12 @@ PHONY += dts_dir 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 @@ -357,6 +355,17 @@ ifneq ($(cmd_files),) 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: |