u-boot/tools/imx9_image.sh
Alice Guo 5f28a6599f tools: imx8image: add i.MX95 support
i.MX95 uses binman to invoke mkimage to create image container. 2 image
containers are needed currently. The first one is composed of
ahab-container.img, LPDDR firmware images, OEI images, System Manager
image and u-boot-spl.bin. The second one is consisted of ARM Trusted
firmware and u-boot.bin.

Because DDR OEI image and LPDDR firmware images have to be packaged
together and named as m33-oei-ddrfw.bin by binman, so imx9_image.sh does
not check if m33-oei-ddrfw.bin exists.

When using "make imx95_19x19_evk_defconfig; make", imx9_image.sh will
delete the line for u-boot.bin in container.cfg. In fact, binman is
always called after the u-boot.bin is built, so imx9_image.sh does not
check if u-boot.bin exists.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-05-03 16:55:32 -03:00

40 lines
835 B
Bash
Executable File

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0+
#
# Script to check whether the file exists in mkimage cfg files for the i.MX9.
#
# usage: $0 <file.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-spl-ddr.bin" ]; then
continue
fi
if [ -f $f ]; then
continue
fi
if [ $f = "m33-oei-ddrfw.bin" ]; then
continue
fi
if [ $f = "u-boot.bin" ]; then
continue
fi
if [ ! -f $tmp ]; then
echo "WARNING '$tmp' not found, resulting binary may be not-functional" >&2
# Comment-out the lines for un-existing files. This way,
# mkimage can keep working. This allows CI tests to pass even
# if the resulting binary won't boot.
sed -in "/$f/ s/./#&/" $file
fi
done
exit 0