imx91: boot via serial downloader hangs

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

imx91: boot via serial downloader hangs

ソリューションへジャンプ
112件の閲覧回数
stoejs
Contributor I

Hello all,

i followed the imx linux user guide UG10163, chapter 4.5.13 to create a flash.bin. However, trying to boot from that with uuu hangs at 21%:

uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.233-0-g79ce7d2

Success 0 Failure 0


1:1057-DEBFA 1/ 1 [=======> 21% ] SDPS: boot -f ./flash.bin

which eventually after a few seconds results in 

1:1057-DEBFA 1/ 1 [HID(W): LIBUSB_ERROR_TIMEOUT (-7) ] SDPS: boot -f ./flash.bin

I am able to boot imx-boot-imx91-11x11-lpddr4-evk-sd.bin-flash_singleboot, so the issue comes from my file. Output from make:

make SOC=iMX91 flash_singleboot
include autobuild.mak
./../mkimage_imx8 -soc IMX9 -append mx91a0-ahab-container.img -c -ap u-boot-spl-ddr.bin a55 0x204A0000 -out flash.bin
SOC: IMX9
New Container:  0
AP:     u-boot-spl-ddr.bin      core: a55 addr: 0x204a0000
Output: flash.bin
CONTAINER FUSE VERSION: 0x00
CONTAINER SW VERSION:   0x0000
Platform:       i.MX9
ivt_offset:     1024
header tag missmatched 0
container image offset (aligned):19800
csf_off         0x19c00
flags: 0x10
Hash of the images =
1+0 records in
1+0 records out
198656 bytes (199 kB, 194 KiB) copied, 0.00212711 s, 93.4 MB/s
387+1 records in
387+1 records out
198504 bytes (199 kB, 194 KiB) copied, 0.00235459 s, 84.3 MB/s
AP file_offset = 0x19800 size = 0x30800
CST: CONTAINER 0 offset: 0x400
CST: CONTAINER 0: Signature Block: offset is at 0x490
        Offsets =       0x400   0x490
DONE.
Note: Please copy image to offset: IVT_OFFSET + IMAGE_OFFSET
append u-boot-atf-container.img at 296 KB, psize=1024
1011+0 records in
1011+0 records out
1035264 bytes (1.0 MB, 1011 KiB) copied, 0.0123241 s, 84.0 MB/s

Can you give me some ways to debug this?

0 件の賞賛
返信
1 解決策
34件の閲覧回数
DavidFlir
Contributor III

Each time I build a new image, I replaced the files

u-boot.bin
u-boot-spl.bin

in iMX91-dir.

So I assume there must be something wrong with your u-boot build.

Maybe try replacing it with the ones from the yocto build

(for me they are located in -> build_fsl-imx-xwayland/tmp/deploy/images/imx91evk/)


to eventually pinpoint what makes your flashing abort.

元の投稿で解決策を見る

9 返答(返信)
34件の閲覧回数
DavidFlir
Contributor III
Did you try to get more info with the verbose flag on when executing uuu?

-v -V verbose mode, -V enable libusb error\warning info
0 件の賞賛
返信
86件の閲覧回数
DavidFlir
Contributor III

I am going to post you the output I get...

SOC: IMX9 
New Container:  0
AP:     bl31.bin        core: a55 addr: 0x204c0000
AP:     u-boot-hash.bin core: a55 addr: 0x80200000
Output: u-boot-atf-container.img
CONTAINER FUSE VERSION: 0x00
CONTAINER SW VERSION:   0x0000
Platform:       i.MX9
ivt_offset:     1024
container image offset (aligned):2000
csf_off         0x2400
flags: 0x10
Hash of the images = 
1+0 records in
1+0 records out
44032 bytes (44 kB, 43 KiB) copied, 0.000113082 s, 389 MB/s
84+1 records in
84+1 records out
43175 bytes (43 kB, 42 KiB) copied, 0.000445619 s, 96.9 MB/s
AP file_offset = 0x2000 size = 0xac00
Hash of the images = 
1+0 records in
1+0 records out
1061888 bytes (1.1 MB, 1.0 MiB) copied, 0.000716917 s, 1.5 GB/s
2073+1 records in
2073+1 records out
1061841 bytes (1.1 MB, 1.0 MiB) copied, 0.00246038 s, 432 MB/s
AP file_offset = 0xcc00 size = 0x103400
CST: CONTAINER 0 offset: 0x0
CST: CONTAINER 0: Signature Block: offset is at 0x110
        Offsets =       0x0     0x110
DONE.
Note: Please copy image to offset: IVT_OFFSET + IMAGE_OFFSET
./../mkimage_imx8 -soc IMX9 -append mx91a0-ahab-container.img -c -ap u-boot-spl-ddr.bin a55 0x204A0000 -out flash.bin
SOC: IMX9 
New Container:  0
AP:     u-boot-spl-ddr.bin      core: a55 addr: 0x204a0000
Output: flash.bin
CONTAINER FUSE VERSION: 0x00
CONTAINER SW VERSION:   0x0000
Platform:       i.MX9
ivt_offset:     1024
mx91a0-ahab-container.img i is 1, 1, 19400


header tag missmatched 0
container image offset (aligned):19400
csf_off         0x19800
flags: 0x10
Hash of the images = 
1+0 records in
1+0 records out
168960 bytes (169 kB, 165 KiB) copied, 0.000163948 s, 1.0 GB/s
328+1 records in
328+1 records out
168224 bytes (168 kB, 164 KiB) copied, 0.000472016 s, 356 MB/s
AP file_offset = 0x19400 size = 0x29400
CST: CONTAINER 0 offset: 0x400
CST: CONTAINER 0: Signature Block: offset is at 0x490
        Offsets =       0x400   0x490
DONE.


I believe there are some offset at different places...

+

Did you manually copy following files the the imx91 dir?

bl31.bin
u-boot.bin
u-boot-spl.bin
imx91-11x11-evk.dtb
0 件の賞賛
返信
81件の閲覧回数
stoejs
Contributor I

Thank you for your reply. I was missing the device tree blob for my board, not sure if this is relevant.

After running the append command 

./../mkimage_imx8 -soc IMX9 -append mx91a0-ahab-container.img -c -ap u-boot-spl-ddr.bin a55 0x204A0000 -out flash.bin

the uuu sdps boot command runs to 100%, but uuu does not continue with the next command.

❯ uuu my.lst
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.233-0-g79ce7d2

Success 0    Failure 0


❯ echo $?
1

 

Append command output:

❯ ./../mkimage_imx8 -soc IMX9 -append mx91a0-ahab-container.img -c -ap u-boot-spl-ddr.bin a55 0x204A0000 -out flash.bin
SOC: IMX9
New Container:  0
AP:     u-boot-spl-ddr.bin      core: a55 addr: 0x204a0000
Output: flash.bin
CONTAINER FUSE VERSION: 0x00
CONTAINER SW VERSION:   0x0000
Platform:       i.MX9
ivt_offset:     1024
header tag missmatched 0
container image offset (aligned):19800
csf_off         0x19c00
flags: 0x10
Hash of the images =
1+0 records in
1+0 records out
198656 bytes (199 kB, 194 KiB) copied, 0.00213353 s, 93.1 MB/s
387+1 records in
387+1 records out
198504 bytes (199 kB, 194 KiB) copied, 0.00249109 s, 79.7 MB/s
AP file_offset = 0x19800 size = 0x30800
CST: CONTAINER 0 offset: 0x400
CST: CONTAINER 0: Signature Block: offset is at 0x490
        Offsets =       0x400   0x490
DONE.
Note: Please copy image to offset: IVT_OFFSET + IMAGE_OFFSET

 

I have no idea which offsets are meant in the above note. Something from this? 

build/tmp/work/imx91_11x11_lpddr4_evk-poky-linux/imx-boot/1.0/git/src/mkimage_common.h

There are severall offsets defined here, but nothing jumps the eye.

 

Also, when flashing the image provided by nxp, the uart on my custom board printed statements when running the boot command. Even with the appended flash.bin, nothing gets printed.

0 件の賞賛
返信
77件の閲覧回数
DavidFlir
Contributor III

I was looking at this container image offset (aligned):19800 , but that is probably just your `mx91a0-ahab-container.img` which is more recent than mine.


I wonder if you also see the creation of this ahab-container...

SOC: IMX9
New Container: 0
AP: bl31.bin core: a55 addr: 0x204c0000
AP: u-boot-hash.bin core: a55 addr: 0x80200000
Output: u-boot-atf-container.img

 
This is output I get before, check if you have these files in place

./../mkimage_imx8 -commit > head.hash
if [ -f tee.bin ]; then \
        if [  ]; then \
                ./../mkimage_imx8 -soc IMX9 -sw_version  -c \
                           -ap bl31.bin a55 0x204C0000 \
                           -ap u-boot-hash.bin a55 0x80200000 \
                           -ap tee.bin a55 0x96000000 \
                           -out u-boot-atf-container.img; \
        else \
                ./../mkimage_imx8 -soc IMX9 -c \
                           -ap bl31.bin a55 0x204C0000 \
                           -ap u-boot-hash.bin a55 0x80200000 \
                           -ap tee.bin a55 0x96000000 -out u-boot-atf-container.img; \
        fi; \
else \
        ./../mkimage_imx8 -soc IMX9 -c \
                   -ap bl31.bin a55 0x204C0000 \
                   -ap u-boot-hash.bin a55 0x80200000 \
                   -out u-boot-atf-container.img; \
fi
 



0 件の賞賛
返信
50件の閲覧回数
stoejs
Contributor I

I wonder if you also see the creation of this ahab-container...

Weird, I re-ran the make command and it produced a different output:

❯ make SOC=iMX91 flash_singleboot
include autobuild.mak
28794+0 records in
28794+0 records out
115176 bytes (115 kB, 112 KiB) copied, 0.137751 s, 836 kB/s
./../mkimage_imx8 -commit > head.hash
if [ -f tee.bin ]; then \
        if [  ]; then \
                ./../mkimage_imx8 -soc IMX9 -sw_version  -c \
                           -ap bl31.bin a55 0x204C0000 \
                           -ap u-boot-hash.bin a55 0x80200000 \
                           -ap tee.bin a55 0x96000000 \
                           -out u-boot-atf-container.img; \
        else \
                ./../mkimage_imx8 -soc IMX9 -c \
                           -ap bl31.bin a55 0x204C0000 \
                           -ap u-boot-hash.bin a55 0x80200000 \
                           -ap tee.bin a55 0x96000000 -out u-boot-atf-container.img; \
        fi; \
else \
        ./../mkimage_imx8 -soc IMX9 -c \
                   -ap bl31.bin a55 0x204C0000 \
                   -ap u-boot-hash.bin a55 0x80200000 \
                   -out u-boot-atf-container.img; \
fi
SOC: IMX9
New Container:  0
AP:     bl31.bin        core: a55 addr: 0x204c0000
AP:     u-boot-hash.bin core: a55 addr: 0x80200000
Output: u-boot-atf-container.img
CONTAINER FUSE VERSION: 0x00
CONTAINER SW VERSION:   0x0000
Platform:       i.MX9
ivt_offset:     1024
container image offset (aligned):2000
csf_off         0x2400
flags: 0x10
Hash of the images =
1+0 records in
1+0 records out
44032 bytes (44 kB, 43 KiB) copied, 0.000390443 s, 113 MB/s
84+1 records in
84+1 records out
43115 bytes (43 kB, 42 KiB) copied, 0.000638195 s, 67.6 MB/s
AP file_offset = 0x2000 size = 0xac00
Hash of the images =
1+0 records in
1+0 records out
983040 bytes (983 kB, 960 KiB) copied, 0.00452534 s, 217 MB/s
1918+1 records in
1918+1 records out
982041 bytes (982 kB, 959 KiB) copied, 0.0102085 s, 96.2 MB/s
AP file_offset = 0xcc00 size = 0xf0000
CST: CONTAINER 0 offset: 0x0
CST: CONTAINER 0: Signature Block: offset is at 0x110
        Offsets =       0x0     0x110
DONE.
Note: Please copy image to offset: IVT_OFFSET + IMAGE_OFFSET
./../mkimage_imx8 -soc IMX9 -append mx91a0-ahab-container.img -c -ap u-boot-spl-ddr.bin a55 0x204A0000 -out flash.bin
SOC: IMX9
New Container:  0
AP:     u-boot-spl-ddr.bin      core: a55 addr: 0x204a0000
Output: flash.bin
CONTAINER FUSE VERSION: 0x00
CONTAINER SW VERSION:   0x0000
Platform:       i.MX9
ivt_offset:     1024
header tag missmatched 0
container image offset (aligned):19800
csf_off         0x19c00
flags: 0x10
Hash of the images =
1+0 records in
1+0 records out
198656 bytes (199 kB, 194 KiB) copied, 0.00151629 s, 131 MB/s
387+1 records in
387+1 records out
198504 bytes (199 kB, 194 KiB) copied, 0.00238124 s, 83.4 MB/s
AP file_offset = 0x19800 size = 0x30800
CST: CONTAINER 0 offset: 0x400
CST: CONTAINER 0: Signature Block: offset is at 0x490
        Offsets =       0x400   0x490
DONE.
Note: Please copy image to offset: IVT_OFFSET + IMAGE_OFFSET
append u-boot-atf-container.img at 296 KB, psize=1024
1011+0 records in
1011+0 records out
1035264 bytes (1.0 MB, 1011 KiB) copied, 0.0123526 s, 83.8 MB/s

 

I ran this manually before:

        ./../mkimage_imx8 -soc IMX9 -c \
                   -ap bl31.bin a55 0x204C0000 \
                   -ap u-boot-hash.bin a55 0x80200000 \
                   -out u-boot-atf-container.img; \
0 件の賞賛
返信
60件の閲覧回数
stoejs
Contributor I
❯ ls
bl31.bin                lpddr4_dmem_1d_v202201.bin  scripts                   u-boot-hash.bin
boot-spl-container.img  lpddr4_dmem_2d_v202201.bin  signature.dts             u-boot-spl.bin
flash.bin               lpddr4_imem_1d_v202201.bin  soc.mak                   u-boot-spl-ddr.bin
head.hash               lpddr4_imem_2d_v202201.bin  u-boot-atf-container.img
imx91-myboard.dtb       mx91a0-ahab-container.img   u-boot.bin

tee.bin is missing. I was under the impression that optee is optional. Is that correct?

❯ cat head.hash
71b8c18a

 

0 件の賞賛
返信
35件の閲覧回数
DavidFlir
Contributor III

Each time I build a new image, I replaced the files

u-boot.bin
u-boot-spl.bin

in iMX91-dir.

So I assume there must be something wrong with your u-boot build.

Maybe try replacing it with the ones from the yocto build

(for me they are located in -> build_fsl-imx-xwayland/tmp/deploy/images/imx91evk/)


to eventually pinpoint what makes your flashing abort.

27件の閲覧回数
stoejs
Contributor I

That was it, thanks!

Now on to figuring on what broke my u-boot build.

46件の閲覧回数
DavidFlir
Contributor III
I can confirm that I do not have `tee.bin` either. So it must be optional.
0 件の賞賛
返信