summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tasks/uboot.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/tasks/uboot.mk b/tasks/uboot.mk
index 8bbbc57..afa5a42 100644
--- a/tasks/uboot.mk
+++ b/tasks/uboot.mk
@@ -1,3 +1,7 @@
+ifneq ($(UBOOT_TOOLS_PREFIX),)
+UBOOT_TCDIR = $(realpath $(shell dirname $(UBOOT_TOOLS_PREFIX)))
+UBOOT_TCPREFIX = $(shell basename $(UBOOT_TOOLS_PREFIX))
+else
ifneq ($(findstring prebuilt,$(TARGET_TOOLS_PREFIX)),)
# The AOSP prebuilt toolchain is too old to compile
# current u-boot, so we fall back to a system compiler
@@ -9,6 +13,7 @@ UBOOT_TCDIR = $(realpath $(shell dirname $(TARGET_TOOLS_PREFIX)))
# built with the bare metal toolchain if it is available
UBOOT_TCPREFIX = $(shell if [ -e $(UBOOT_TCDIR)/arm-eabi-gcc ]; then echo arm-eabi-; else basename $(TARGET_TOOLS_PREFIX); fi)
endif
+endif
# u-boot can't be built with gold - so we force BFD LD into the
# PATH ahead of everything else