Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 2 | # SPDX-License-Identifier: GPL-2.0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
| 4 | # |
| 5 | # Build U-Boot image when `mkimage' tool is available. |
| 6 | # |
| 7 | |
Uwe kleine-König | f03e166 | 2007-03-28 16:55:55 +0200 | [diff] [blame] | 8 | MKIMAGE=$(type -path "${CROSS_COMPILE}mkimage") |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | |
| 10 | if [ -z "${MKIMAGE}" ]; then |
Mike Frysinger | 8c7e449 | 2007-02-14 00:32:54 -0800 | [diff] [blame] | 11 | 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 Stigge | bc91c9f | 2010-12-17 17:19:17 +0100 | [diff] [blame] | 15 | exit 1; |
Mike Frysinger | 8c7e449 | 2007-02-14 00:32:54 -0800 | [diff] [blame] | 16 | fi |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | fi |
| 18 | |
| 19 | # Call "mkimage" to create U-Boot image |
| 20 | ${MKIMAGE} "$@" |