18c2ecf20Sopenharmony_ci#!/bin/bash 28c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci# 58c2ecf20Sopenharmony_ci# Build U-Boot image when `mkimage' tool is available. 68c2ecf20Sopenharmony_ci# 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ciMKIMAGE=$(type -path "${CROSS_COMPILE}mkimage") 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciif [ -z "${MKIMAGE}" ]; then 118c2ecf20Sopenharmony_ci MKIMAGE=$(type -path mkimage) 128c2ecf20Sopenharmony_ci if [ -z "${MKIMAGE}" ]; then 138c2ecf20Sopenharmony_ci # Doesn't exist 148c2ecf20Sopenharmony_ci echo '"mkimage" command not found - U-Boot images will not be built' >&2 158c2ecf20Sopenharmony_ci exit 1; 168c2ecf20Sopenharmony_ci fi 178c2ecf20Sopenharmony_cifi 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci# Call "mkimage" to create U-Boot image 208c2ecf20Sopenharmony_ci${MKIMAGE} "$@" 21