25edf5104c2c76bea5cc437f788462b16096fab0
[lede-git/.git] / package / boot / uboot-sunxi / patches / 210-Revert-fdt-Makefile-Build-python-libfdt-library-if-n.patch
1 From eed65e5c25cbc4b6e893f140e9d7898f4624c114 Mon Sep 17 00:00:00 2001
2 From: Hauke Mehrtens <hauke@hauke-m.de>
3 Date: Wed, 19 Jul 2017 23:12:38 +0200
4 Subject: [PATCH 210/213] Revert "fdt: Makefile: Build python libfdt library if
5  needed"
6
7 This reverts commit e38ffc42674fedc750ca895046be0bd983b56dd5.
8 ---
9  Makefile             | 17 ++---------------
10  scripts/Makefile.spl | 17 ++++-------------
11  2 files changed, 6 insertions(+), 28 deletions(-)
12
13 --- a/Makefile
14 +++ b/Makefile
15 @@ -1116,7 +1116,7 @@ cmd_ldr = $(LD) $(LDFLAGS_$(@F)) \
16  
17  u-boot.rom: u-boot-x86-16bit.bin u-boot.bin \
18                 $(if $(CONFIG_SPL_X86_16BIT_INIT),spl/u-boot-spl.bin) \
19 -               $(if $(CONFIG_HAVE_REFCODE),refcode.bin) checkbinman FORCE
20 +               $(if $(CONFIG_HAVE_REFCODE),refcode.bin) FORCE
21         $(call if_changed,binman)
22  
23  OBJCOPYFLAGS_u-boot-x86-16bit.bin := -O binary -j .start16 -j .resetvec
24 @@ -1125,8 +1125,7 @@ u-boot-x86-16bit.bin: u-boot FORCE
25  endif
26  
27  ifneq ($(CONFIG_ARCH_SUNXI),)
28 -u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb \
29 -               checkbinman FORCE
30 +u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.img u-boot.dtb FORCE
31         $(call if_changed,binman)
32  endif
33  
34 @@ -1355,18 +1354,6 @@ $(version_h): include/config/uboot.relea
35  $(timestamp_h): $(srctree)/Makefile FORCE
36         $(call filechk,timestamp.h)
37  
38 -checkbinman: tools
39 -       @if ! ( echo 'import libfdt' | ( PYTHONPATH=tools python )); then \
40 -               echo >&2; \
41 -               echo >&2 '*** binman needs the Python libfdt library.'; \
42 -               echo >&2 '*** Either install it on your system, or try:'; \
43 -               echo >&2 '***'; \
44 -               echo >&2 '*** sudo apt-get install swig libpython-dev'; \
45 -               echo >&2 '***'; \
46 -               echo >&2 '*** to have U-Boot build its own version.'; \
47 -               false; \
48 -       fi
49 -
50  # ---------------------------------------------------------------------------
51  quiet_cmd_cpp_lds = LDS     $@
52  cmd_cpp_lds = $(CPP) -Wp,-MD,$(depfile) $(cpp_flags) $(LDPPFLAGS) \
53 --- a/scripts/Makefile.spl
54 +++ b/scripts/Makefile.spl
55 @@ -257,12 +257,14 @@ PHONY += dts_dir
56  dts_dir:
57         $(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts)
58  
59 -include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir checkdtoc
60 +include/generated/dt-structs.h: $(obj)/$(SPL_BIN).dtb dts_dir dtoc
61         $(call if_changed,dtoch)
62  
63 -$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir checkdtoc
64 +$(obj)/dts/dt-platdata.c: $(obj)/$(SPL_BIN).dtb dts_dir dtoc
65         $(call if_changed,dtocc)
66  
67 +dtoc: #$(objtree)/tools/_libfdt.so
68 +
69  ifdef CONFIG_SAMSUNG
70  ifdef CONFIG_VAR_SIZE_SPL
71  VAR_SIZE_PARAM = --vs
72 @@ -355,17 +357,6 @@ ifneq ($(cmd_files),)
73    include $(cmd_files)
74  endif
75  
76 -checkdtoc: tools
77 -       @if ! ( echo 'import libfdt' | ( PYTHONPATH=tools python )); then \
78 -               echo '*** dtoc needs the Python libfdt library. Either '; \
79 -               echo '*** install it on your system, or try:'; \
80 -               echo '***'; \
81 -               echo '*** sudo apt-get install swig libpython-dev'; \
82 -               echo '***'; \
83 -               echo '*** to have U-Boot build its own version.'; \
84 -               false; \
85 -       fi
86 -
87  PHONY += FORCE
88  FORCE:
89