aboutsummaryrefslogtreecommitdiff
path: root/boot/uboot/uboot.mk
diff options
context:
space:
mode:
Diffstat (limited to 'boot/uboot/uboot.mk')
-rw-r--r--boot/uboot/uboot.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 58dd906a27..b7032d5901 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -191,8 +191,12 @@ UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_LOCAL_PATCHES
# This is equivalent to upstream commit
# http://git.denx.de/?p=u-boot.git;a=commitdiff;h=e0d20dc1521e74b82dbd69be53a048847798a90a. It
# fixes a build failure when libfdt-devel is installed system-wide.
+# This only works when scripts/dtc/libfdt exists (E.G. versions containing
+# http://git.denx.de/?p=u-boot.git;a=commitdiff;h=c0e032e0090d6541549b19cc47e06ccd1f302893)
define UBOOT_FIXUP_LIBFDT_INCLUDE
- $(SED) 's%-I$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%' $(@D)/tools/Makefile
+ if [ -d $(@D)/scripts/dtc/libfdt ]; then \
+ $(SED) 's%-I$$(srctree)/lib/libfdt%-I$$(srctree)/scripts/dtc/libfdt%' $(@D)/tools/Makefile; \
+ fi
endef
UBOOT_POST_PATCH_HOOKS += UBOOT_FIXUP_LIBFDT_INCLUDE