imx6: problem uploading uboot image in serial downloader mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6: problem uploading uboot image in serial downloader mode

2,443 Views
kinlee
Contributor II

Hi NXP Community,

We have developed a board using a iMX6DL and we've run into problems uploading a u-boot.imx image when in serial downloader mode. However when we create a SD card image using our buildroot environment (buildroot-2017.02.9 with uboot-rel_imx_4.1.15_2.0.0_ga based on sabre_sd), uboot loads ok and we can boot the Linux kernel successfully.

We are using imx_usb_load to transfer u-boot.imx to our board we have observed/tried:

  • when uploading on our board no output is received via UART. Using the same u-boot.imx and same upload method on a different 3rd party purchased iMX6DL development board works.
  • using imx_usb_load -v u-boot.imx to verify the uploaded contents shows the following data mismatch between the image file and memory (this is probably why u-boot can't start):

    loading binary file(u-boot.imx) to 177ff400, skip=0, fsize=74c00 type=aa

    <<<478208, 478208 bytes>>>
    succeeded (status 0x88888888)
    !!!!mismatch
    00000be0: 00000000 00000000 00000000 00000000  00000000 00000000 00000000 00000000
    177fffe0: 00000000 00000000 00000000 00000000  00000000 00000000 00000000 00300000
                                                                                ^
    00000c20: 17800060 178000c0 17800120 17800180  178001e0 17800240 178002a0 deadbeef
    17800020: 17800060 178000c0 17800120 17800180  178001e0 17800240 178002a0 17adbeef
                                                                              v-
    00000c60: e51fd028 e58de000 e14fe000 e58de004  e3a0d013 e169f00d e1a0e00f e1b0f00e
    17800060: e51fd028 e58de000 e14fe000 e58de004  e3a0d013 e169f00d e1a0e00f e5b0f00e
                                                                               ^
    00000d20: e51fd0e8 e58de000 e14fe000 e58de004  e3a0d013 e169f00d e1a0e00f e1b0f00e
    17800120: e51fd0e8 e58de000 e14fe000 e58de004  e3a0d013 e169f00d e1a0e00f e5b0f00e
                                                                               ^
    00000de0: e51fd1a8 e58de000 e14fe000 e58de004  e3a0d013 e169f00d e1a0e00f e1b0f00e
    178001e0: e51fd1a8 e58de000 e14fe000 e58de004  e3a0d013 e169f00d e1a0e00f e5b0f00e
                                                                               ^
    DoIRomDownload failed, err=-1
    HAB security state: development mode (0x56787856)
  • We've run DDR_Tester, and updated write level, read DQS, read and write calibrations, to the relevant .cfg file (which holds the DCD data) in u-boot. However the problem persists. The data mismatch is always the same (same position same incorrect values). Since we can run the DDR_Tester I think our USB connection is okay.
  • As previously stated booting the same image via SD card is okay - uboot and linux work.

The serial upload data mismatch suggest our DDR is not configured properly however booting our board using an SD card image works perfectly, which suggest our DCD values are okay.

Any suggestions/solutions would be really appreciated.

Thanks in advance!

Wei

Labels (1)
Tags (2)
0 Kudos
7 Replies

1,917 Views
igorpadykov
NXP Employee
NXP Employee

Hi Wei

sd card uboot images are images with offset, as
for other external boot devices. For usb
load one needs the same image, but without offset.

Other reason may be big uboot size, if loaded to internal OCRAM.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,917 Views
kinlee
Contributor II

Hi Igor

Thanks for your reply.

We have a 'ready made' development board that we also tested in serial download mode. In this case using the same u-boot.imx image the system was able to enter into uboot, whilst our newly developed board just hangs and there is data mismatch. So I believe the size is okay and the offset's aren't the issue.

From what I understand the generated *.imx files include DCD and some locations to indicate to the CPU from which location to start uboot. I believe imx_usb_download (GitHub - boundarydevices/imx_usb_loader: USB & UART loader for i.MX5/6/7 series ) seems to be able to parse these files correctly and write the DCD and uboot into the correct locations.

Best regards

Wei

0 Kudos

1,917 Views
igorpadykov
NXP Employee
NXP Employee

Hi Wei

newly developed board may not work with old image, for new board

it is necessary to run ddr test and update image with new calibration settings found

from test

i.MX6/7 DDR Stress Test Tool V2.80 

Best regards
igor

0 Kudos

1,917 Views
kinlee
Contributor II

Hi Igor

Thanks for the ddr stress test link. However we've already used this to update the DCD values but the situation hasn't improved.

best regards

Wei

0 Kudos

1,917 Views
igorpadykov
NXP Employee
NXP Employee

Hi Wei

please check sect.8.6.1 Image Vector Table and Boot Data

i.MX6SDL Reference Manual

http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6SDLRM.pdf

and try image without offset.

Best regards
igor

0 Kudos

1,917 Views
kinlee
Contributor II

Hi Igor

Thanks, will try without offset.

best regards

Wei

0 Kudos

1,917 Views
kinlee
Contributor II

Hi Igor

The boot loader (u-boot.imx) is already zero offset. Here's a hexdump of the first few lines. The IVT header (0x402000D1) can be seen in the first entry.

00000000  d1 00 20 40 00 00 80 17  00 00 00 00 2c f4 7f 17  |.. @........,...|
00000010  20 f4 7f 17 00 f4 7f 17  00 00 00 00 00 00 00 00  | ...............|
00000020  00 f0 7f 17 00 40 07 00  00 00 00 00 d2 02 f0 40  |.....@.........@|
00000030  cc 02 ec 04 02 0e 07 74  00 0c 00 00 02 0e 07 54  |.......t.......T|
00000040  00 00 00 00 02 0e 04 ac  00 00 00 30 02 0e 04 b0  |...........0....|
00000050  00 00 00 30 02 0e 04 64  00 00 00 30 02 0e 04 90  |...0...d...0....|

As a reminder I'm trying to upload u-boot.imx using imx_usb_loader; on a purchased development board this combination of u-boot.imx and imx_usb_loader works; and ddr stress test values have been applied to our DCD.

best regards

Wei

0 Kudos