summaryrefslogtreecommitdiff
path: root/scripts/mkuboot.sh
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
committerYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
commit8e4bff4cab0ddac6060645b0715210484d02ff40 (patch)
tree3a5c3024371a04692a3a6d9974d001cdff8ebf84 /scripts/mkuboot.sh
Initial file dump from open source releaseHEADmaster
Diffstat (limited to 'scripts/mkuboot.sh')
-rwxr-xr-xscripts/mkuboot.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/mkuboot.sh b/scripts/mkuboot.sh
new file mode 100755
index 00000000..446739c7
--- /dev/null
+++ b/scripts/mkuboot.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+#
+# Build U-Boot image when `mkimage' tool is available.
+#
+
+MKIMAGE=$(type -path "${CROSS_COMPILE}mkimage")
+
+if [ -z "${MKIMAGE}" ]; then
+ MKIMAGE=$(type -path mkimage)
+ if [ -z "${MKIMAGE}" ]; then
+ # Doesn't exist
+ echo '"mkimage" command not found - U-Boot images will not be built' >&2
+ exit 1;
+ fi
+fi
+
+# Call "mkimage" to create U-Boot image
+${MKIMAGE} "$@"