i.MX8M Error print file size by mkimage_fit_atf.sh

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX8M Error print file size by mkimage_fit_atf.sh

841件の閲覧回数
synchronic_ma
Contributor I

Hi,

I use https://github.com/nxp-imx/imx-mkimage.git with branch "lf-6.1.55_2.2.0".

However, during make process of iMX8M, I have the next bug : the file sizes of "bl31.bin", "u-boot-nodtb.bin" and "evk.dtb" printed by mkimage_fit_atf.sh are wrong, like this :

Padding bl31.bin to 43232 bytes
./../scripts/pad_image.sh u-boot-nodtb.bin evk.dtb
BL32=tee.bin DEK_BLOB_LOAD_ADDR=0x40400000 TEE_LOAD_ADDR=0x7e000000 ATF_LOAD_ADDR=0x00920000 ../iMX8M/mkimage_fit_atf.sh evk.dtb > u-boot.its
bl31.bin size:
du
u-boot-nodtb.bin size:
du
evk.dtb size:
du
./mkimage_uboot -E -p 0x5000 -f u-boot.its u-boot.itb

These errors are due to a wrong size reading due to this command of mkimage_fit_atf.sh :

ls -lct $BL31 | awk '{print $5}' >&2

Because, in my case, my group contains spaces which shifts the position of the parameters like this :

ls -lct bl31.bin
-rwxr-xr-x 1 u_ma@synchronic2.local utilisateurs du domaine@synchronic2.local 43232 Jan 15 10:35 bl31.bin

Here, the 5th parameter is "du" and not the file size.

To prevent this, I suggest using "stat -c %s" instead of "ls" like this :

stat -c %s $BL31 >&2

I join a patch for with my suggest to pacth plateform iMX8M.
The others plateform are the same bug.

0 件の賞賛
返信
1 返信

820件の閲覧回数
Chavira
NXP TechSupport
NXP TechSupport

Hi @synchronic_ma!
Thank you for contacting NXP Support!

Thanks for your community assistance.

I will inform my team to take your proposition to this problem.

Best Regards!
Alejandro