Use u-boot's dtc binary in run_qemu.sh
We only use dtc when we have firmware (a.k.a. u-boot) built, so
it should be fine to use dtc from out/u-boot/
Test: script still works
Bug: 181212750
Change-Id: Idfe03b573d4620314e8f0af7faa5aede66782928
diff --git a/aarch64/run_qemu.sh b/aarch64/run_qemu.sh
index ceb499b..bce5d54 100755
--- a/aarch64/run_qemu.sh
+++ b/aarch64/run_qemu.sh
@@ -95,7 +95,7 @@
local size="$5"
# Convert input DTB back to source.
- dtc -I dtb -O dts -o "${tmp}" "${in}"
+ ${DTC} -I dtb -O dts -o "${tmp}" "${in}"
# Append an overlay describing the kernel payload.
cat <<EOF >> "${tmp}"
@@ -110,7 +110,7 @@
EOF
# Compile back to DTB.
- dtc -I dts -O dtb -o "${out}" "${tmp}"
+ ${DTC} -I dts -O dtb -o "${out}" "${tmp}"
}
CMD=()
diff --git a/common.inc b/common.inc
index 3c2598e..0387a8b 100644
--- a/common.inc
+++ b/common.inc
@@ -43,6 +43,8 @@
KUT_OUT="${OUT_DIR}/kvm-unit-tests"
KUT_TEST_DIR="${KUT_OUT}/tests"
+DTC="${OUT_DIR}/u-boot/scripts/dtc/dtc"
+
# Define a variable with a given default value. Also defines
# variable DEFAULT_<name> with the default value.
# Args: