Mathieu Othacehe | 9b832ad | 2023-12-29 12:02:18 +0100 | [diff] [blame] | 1 | #!/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 | |
| 8 | file=$1 |
| 9 | |
| 10 | blobs=`awk '/^APPEND/ {print $2} /^IMAGE/ || /^DATA/ {print $3}' $file` |
| 11 | for 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 | |
Alice Guo | cd759f3 | 2025-04-28 18:37:40 +0800 | [diff] [blame^] | 21 | if [ $f = "m33-oei-ddrfw.bin" ]; then |
| 22 | continue |
| 23 | fi |
| 24 | |
| 25 | if [ $f = "u-boot.bin" ]; then |
| 26 | continue |
| 27 | fi |
| 28 | |
Mathieu Othacehe | 9b832ad | 2023-12-29 12:02:18 +0100 | [diff] [blame] | 29 | if [ ! -f $tmp ]; then |
Mathieu Othacehe | 12ef744 | 2024-02-26 18:37:19 +0100 | [diff] [blame] | 30 | echo "WARNING '$tmp' not found, resulting binary may be not-functional" >&2 |
Mathieu Othacehe | 9b832ad | 2023-12-29 12:02:18 +0100 | [diff] [blame] | 31 | |
| 32 | # Comment-out the lines for un-existing files. This way, |
| 33 | # mkimage can keep working. This allows CI tests to pass even |
| 34 | # if the resulting binary won't boot. |
| 35 | sed -in "/$f/ s/./#&/" $file |
| 36 | fi |
| 37 | done |
| 38 | |
| 39 | exit 0 |