diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/tools/imx_cntr_image.sh | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/tools/imx_cntr_image.sh')
-rwxr-xr-x | roms/u-boot/tools/imx_cntr_image.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/roms/u-boot/tools/imx_cntr_image.sh b/roms/u-boot/tools/imx_cntr_image.sh new file mode 100755 index 000000000..972b95ccb --- /dev/null +++ b/roms/u-boot/tools/imx_cntr_image.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0+ +# +# script to check whether the file exists in imximage.cfg for i.MX8 +# +# usage: $0 <imximage.cfg> + +file=$1 + +blobs=`awk '/^APPEND/ {print $2} /^IMAGE/ || /^DATA/ {print $3}' $file` +for f in $blobs; do + tmp=$srctree/$f + if [ $f = "u-boot-dtb.bin" ]; then + continue + fi + + if [ -f $f ]; then + continue + fi + + if [ ! -f $tmp ]; then + echo "WARNING '$tmp' not found, resulting binary is not-functional" >&2 + exit 1 + fi + + sed -in "s;$f;$tmp;" $file +done + +exit 0 |