Peng Fan | 844b9f3 | 2018-10-25 08:32:40 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # SPDX-License-Identifier: GPL-2.0+ |
| 3 | # |
| 4 | # script to check whether the file exists in imximage.cfg for i.MX8 |
| 5 | # |
| 6 | # usage: $0 <imximage.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 |
Martin Husemann | 2d1c5de | 2018-11-09 14:30:14 +0100 | [diff] [blame] | 13 | if [ $f = "u-boot-dtb.bin" ]; then |
Peng Fan | 844b9f3 | 2018-10-25 08:32:40 +0000 | [diff] [blame] | 14 | continue |
| 15 | fi |
| 16 | |
| 17 | if [ -f $f ]; then |
| 18 | continue |
| 19 | fi |
| 20 | |
| 21 | if [ ! -f $tmp ]; then |
| 22 | echo "WARNING '$tmp' not found, resulting binary is not-functional" >&2 |
| 23 | exit 1 |
| 24 | fi |
| 25 | |
| 26 | sed -in "s;$f;$tmp;" $file |
| 27 | done |
| 28 | |
| 29 | exit 0 |