AnsweredAssumed Answered

imx_usb_loader: sending an env to the mfg u-boot

Question asked by colinhelliwell on Jan 26, 2018
Latest reply on Jan 28, 2018 by igorpadykov

[Apologies for not formatting this well - I haven't yet figured out how to turn text into a code block...]

I'm trying to migrate from MfgTool on Windows to imx_usb_loader (+ utp_com) on Linux.

My board uses a i.MX6 Solo SOM, with the u-boot supplied (and modified!) by the SOM manufacturer. I have though got this working with MfgTool (even with a signed u-boot and a secured cpu). So I'm pretty confident that my images are all 'good'.

I've got as far as the mfg u-boot booting, but it seems to rely on having its environment downloaded too - the MfgTool xml includes the entry:

 

<CMD state="BootStrap" type="load" file="mfg.env" address="0x10500000" loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading mfg U-Boot parameters.</CMD>

 

I've added this to the .conf file for imx_loader, which so far has:

 

mx6_qsb
hid,1024,0x910000,0x10000000,1G,0x00907000,0x31000

firmware/mfg.env: load 0x10500000

firmware/u-boot-tx6s-8035_mfg.bin:clear_dcd,load,plug,jump header, load 0x14f0000

 

As I say, u-boot starts, but crashes when trying to write the env. With MfgTool it shows:

## Warning: defaulting to text format
## Info: input data size = 1575 = 0x627
Saving Environment to MMC...

whereas with imx_usb_loader I'm getting:

## Warning: defaulting to text format
## Info: input data size = 787451 = 0xC03FB

then one of a few errors/crashes.

Note that, even with a power-cycle, it seems to consistently come up with 787451

 

I've enabled some debug, which for this stage shows:

== work item
filename firmware/mfg.env
load_size 0 bytes
load_addr 0x10500000
dcd 0
clear_dcd 0
plug 0
jump_mode 0
jump_addr 0x00000000
== end work item
load_addr=10500000

loading binary file(firmware/mfg.env) to 10500000, skip=0, fsize=2b3 type=0

<<<691, 1024 bytes>>>
succeeded (status 0x88888888)

 

Am I correct in using that 'load' entry to send the env?

What's the significance of the fist line of the conf ("mx6_qsb") - not sure if I should change this?

Any suggestions please on what could be wrong?

Thanks.

Outcomes