aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Andreas Naumann <anaumann@ultratronik.de>2018-11-13 16:50:16 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-11-26 18:46:54 +0100
commit1353c0c8e26a190c27238360d7a917b945f02d52 (patch)
tree577091e86c091933fb916ce36bfed42ed161a43f
parent311f62435b1b3ae65578e680125858d42d2d41ce (diff)
downloadbuildroot-1353c0c8e26a190c27238360d7a917b945f02d52.tar.gz
buildroot-1353c0c8e26a190c27238360d7a917b945f02d52.tar.bz2
linux: Make dtc install step more reliable
Checking for the existence of the dtc binary built by the non-dependent dtc package may cause instable behaviour when giving more freedom on the order of how the packages are built (parallelization). In addidion, when moving to per-package host/target method, the check would always trigger in the isolated host, leading to linux-dtc always being installed as dtc. This in turn may lead to undesired overwriting of the real host-dtc binary when finally assembling the global host dir. Thus rework the linux-dtc install condition to be defined by configuration rather than compile time order. Signed-off-by: Andreas Naumann <anaumann@ultratronik.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit 860906ee05fad3fe503786ec7c656ea0f25851fc) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--linux/linux.mk4
1 files changed, 1 insertions, 3 deletions
diff --git a/linux/linux.mk b/linux/linux.mk
index f69aeb48bb..38a67edcd1 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -416,9 +416,7 @@ define LINUX_INSTALL_HOST_TOOLS
# Installing dtc (device tree compiler) as host tool, if selected
if grep -q "CONFIG_DTC=y" $(@D)/.config; then \
$(INSTALL) -D -m 0755 $(@D)/scripts/dtc/dtc $(HOST_DIR)/bin/linux-dtc ; \
- if [ ! -e $(HOST_DIR)/bin/dtc ]; then \
- ln -sf linux-dtc $(HOST_DIR)/bin/dtc ; \
- fi \
+ $(if $(BR2_PACKAGE_HOST_DTC),,ln -sf linux-dtc $(HOST_DIR)/bin/dtc;) \
fi
endef