imx_cntr_image.sh 505 B

1234567891011121314151617181920212223242526272829
  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. file=$1
  8. blobs=`awk '/^APPEND/ {print $2} /^IMAGE/ || /^DATA/ {print $3}' $file`
  9. for f in $blobs; do
  10. tmp=$srctree/$f
  11. if [ $f = "u-boot-dtb.bin" ]; then
  12. continue
  13. fi
  14. if [ -f $f ]; then
  15. continue
  16. fi
  17. if [ ! -f $tmp ]; then
  18. echo "WARNING '$tmp' not found, resulting binary is not-functional" >&2
  19. exit 1
  20. fi
  21. sed -in "s;$f;$tmp;" $file
  22. done
  23. exit 0