blob: ca78a57a19a06ade4792da6d2435cbc4fa07de62 [file] [log] [blame]
Mathieu Othacehe9b832ad2023-12-29 12:02:18 +01001#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0+
3#
4# Script to check whether the file exists in mkimage cfg files for the i.MX9.
5#
6# usage: $0 <file.cfg>
7
8file=$1
9
10blobs=`awk '/^APPEND/ {print $2} /^IMAGE/ || /^DATA/ {print $3}' $file`
11for f in $blobs; do
12 tmp=$srctree/$f
13 if [ $f = "u-boot-spl-ddr.bin" ]; then
14 continue
15 fi
16
17 if [ -f $f ]; then
18 continue
19 fi
20
21 if [ ! -f $tmp ]; then
Mathieu Othacehe12ef7442024-02-26 18:37:19 +010022 echo "WARNING '$tmp' not found, resulting binary may be not-functional" >&2
Mathieu Othacehe9b832ad2023-12-29 12:02:18 +010023
24 # Comment-out the lines for un-existing files. This way,
25 # mkimage can keep working. This allows CI tests to pass even
26 # if the resulting binary won't boot.
27 sed -in "/$f/ s/./#&/" $file
28 fi
29done
30
31exit 0