summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2021-04-07 07:04:09 +0300
committerStefano Babic <sbabic@denx.de>2021-05-02 13:46:54 +0300
commit35fc3713a39e70af3c8a4ce606c758d4f9af0800 (patch)
tree62aaa922a5ed8ec0b09896dc74502c64722a8c2b /arch/arm/mach-imx
parentf94ce9eb0500825ee37cb2c0a5846e3fd11eaaef (diff)
downloadu-boot-35fc3713a39e70af3c8a4ce606c758d4f9af0800.tar.xz
imx: mkimage_fit_atf: fix file size reporting
instead using ls and awk to determine file size use stat instead. This fixes an invalid size reporting for user or group names that have spaces in them. This adds a dependency on the stat application which is part of the coreutils package which also includes ls. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'arch/arm/mach-imx')
-rwxr-xr-xarch/arm/mach-imx/mkimage_fit_atf.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-imx/mkimage_fit_atf.sh b/arch/arm/mach-imx/mkimage_fit_atf.sh
index fe12b7bb4b..2a17968794 100755
--- a/arch/arm/mach-imx/mkimage_fit_atf.sh
+++ b/arch/arm/mach-imx/mkimage_fit_atf.sh
@@ -16,7 +16,7 @@ if [ ! -f $BL31 ]; then
exit 0
else
echo "$BL31 size: " >&2
- ls -lct $BL31 | awk '{print $5}' >&2
+ stat -c %s $BL31 >&2
fi
BL32="tee.bin"
@@ -26,7 +26,7 @@ if [ ! -f $BL32 ]; then
else
echo "Building with TEE support, make sure your $BL31 is compiled with spd. If you do not want tee, please delete $BL31" >&2
echo "$BL32 size: " >&2
- ls -lct $BL32 | awk '{print $5}' >&2
+ stat -c %s $BL32 >&2
fi
BL33="u-boot-nodtb.bin"
@@ -36,13 +36,13 @@ if [ ! -f $BL33 ]; then
exit 0
else
echo "u-boot-nodtb.bin size: " >&2
- ls -lct u-boot-nodtb.bin | awk '{print $5}' >&2
+ stat -c %s u-boot-nodtb.bin >&2
fi
for dtname in $*
do
echo "$dtname size: " >&2
- ls -lct $dtname | awk '{print $5}' >&2
+ stat -c %s $dtname >&2
done