Upgrade up mkimage_fit_atf.sh

- Accept BL32/BL33 from command line
- Actually use variables in size checks

Change-Id: I465145970fd96e9c58951fb8235c72340dff75df
diff --git a/iMX8M/mkimage_fit_atf.sh b/iMX8M/mkimage_fit_atf.sh
index e1ba1e3..16276c5 100755
--- a/iMX8M/mkimage_fit_atf.sh
+++ b/iMX8M/mkimage_fit_atf.sh
@@ -19,26 +19,25 @@
 	exit 0
 else
 	echo "bl31.bin size: " >&2
-	ls -lct bl31.bin | awk '{print $5}' >&2
+	ls -lct $BL31 | awk '{print $5}' >&2
 fi
 
-BL32="tee.bin"
+[ -z "$BL32" ] && BL32="tee.bin"
 
 if [ ! -f $BL32 ]; then
 	BL32=/dev/null
 else
 	echo "Building with TEE support, make sure your bl31 is compiled with spd. If you do not want tee, please delete tee.bin" >&2
 	echo "tee.bin size: " >&2
-	ls -lct tee.bin | awk '{print $5}' >&2
+	ls -lct $BL32 | awk '{print $5}' >&2
 fi
 
-BL33="u-boot-nodtb.bin"
+[ -z "$BL33" ] && BL33="u-boot-nodtb.bin"
 
 if [ ! -f $BL33 ]; then
 	echo "ERROR: $BL33 file NOT found" >&2
 	exit 0
 else
-	
 	echo "u-boot-nodtb.bin size: " >&2
 	ls -lct u-boot-nodtb.bin | awk '{print $5}' >&2
 fi