Skip to content

Commit ef2811e

Browse files
stefanb2jacmet
authored andcommitted
uboot: fix build for older uboot source trees
The change in commit bf73334 only works for newer uboot source trees. Add a check that scripts/dtc/libfdt directory exists before making this change. [Peter: add comment explaining why] Signed-off-by: Stefan Becker <[email protected]> Signed-off-by: Peter Korsgaard <[email protected]> (cherry picked from commit f437bf5) Signed-off-by: Peter Korsgaard <[email protected]>
1 parent 0bf3676 commit ef2811e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

boot/uboot/uboot.mk

+5-1
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,12 @@ UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_LOCAL_PATCHES
191191
# This is equivalent to upstream commit
192192
# http://git.denx.de/?p=u-boot.git;a=commitdiff;h=e0d20dc1521e74b82dbd69be53a048847798a90a. It
193193
# fixes a build failure when libfdt-devel is installed system-wide.
194+
# This only works when scripts/dtc/libfdt exists (E.G. versions containing
195+
# http://git.denx.de/?p=u-boot.git;a=commitdiff;h=c0e032e0090d6541549b19cc47e06ccd1f302893)
194196
define UBOOT_FIXUP_LIBFDT_INCLUDE
195-
$(SED) 's%-I$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%' $(@D)/tools/Makefile
197+
if [ -d $(@D)/scripts/dtc/libfdt ]; then \
198+
$(SED) 's%-I$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%' $(@D)/tools/Makefile; \
199+
fi
196200
endef
197201
UBOOT_POST_PATCH_HOOKS += UBOOT_FIXUP_LIBFDT_INCLUDE
198202

0 commit comments

Comments
 (0)