blob: 4b1fe09e9042b6251f080638f246f92c69329565 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#!/bin/bash
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01002# SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
4#
5# Build U-Boot image when `mkimage' tool is available.
6#
7
Uwe kleine-Königf03e1662007-03-28 16:55:55 +02008MKIMAGE=$(type -path "${CROSS_COMPILE}mkimage")
Linus Torvalds1da177e2005-04-16 15:20:36 -07009
10if [ -z "${MKIMAGE}" ]; then
Mike Frysinger8c7e4492007-02-14 00:32:54 -080011 MKIMAGE=$(type -path mkimage)
12 if [ -z "${MKIMAGE}" ]; then
13 # Doesn't exist
14 echo '"mkimage" command not found - U-Boot images will not be built' >&2
Roland Stiggebc91c9f2010-12-17 17:19:17 +010015 exit 1;
Mike Frysinger8c7e4492007-02-14 00:32:54 -080016 fi
Linus Torvalds1da177e2005-04-16 15:20:36 -070017fi
18
19# Call "mkimage" to create U-Boot image
20${MKIMAGE} "$@"