AnsweredAssumed Answered

Uboot does not boot when it is put at 400 offset

Question asked by mrigendra chaubey on Jun 28, 2018
Latest reply on Jun 30, 2018 by mrigendra chaubey

Hi All,

my board is i.MX 6QuadPlus sabresd

 

1. I have this question that if I have a pluging image as uboot that is flash_header.S then how can I create a uboot.imx file out of it?

For sabreauto board in board/freescale/sabreauto directory I see these files

imximage.cfg

plugin.S

mx6qsabreauto.c

and some more .cfg files.

CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6qp.cfg,MX6QP"

 

 

 

But for my board I only see these

flash_header.S

board_header.h

CONFIG_SYS_EXTRA_OPTIONS=""

but nothing as .cfg file.

 

 

 

 

2. Some observations of mine when I uses plugin image and uboot.img 

 

When I compile the uboot as uboot.img I see this from the hexdump

 

00000000 27 05 19 56 0c 00 3d 7b 5b 2e 96 e1 00 08 00 00 |'..V..={[.......|
00000010 17 80 00 00 00 00 00 00 b3 6a 65 64 11 02 05 00 |.........jed....|
00000020 55 2d 42 6f 6f 74 20 32 30 31 36 2e 30 33 2d 67 |U-Boot 2016.03-g|
00000030 64 61 34 64 37 64 32 20 66 6f 72 20 6d 78 36 71 |da4d7d2 for mx6q|
00000040 2e 07 00 ea 55 55 55 55 55 55 55 55 55 55 55 55 |....UUUUUUUUUUUU|
00000050 55 55 55 55 00 00 00 00 00 00 00 00 00 00 00 00 |UUUU............|
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*

00000440 d1 00 20 40 xx xx xx xx xx xx xx xx xx     |.. @Xt..........|

 

 

If I flash this image to the board

 

sudo dd if=u-boot.img of=/dev/sdX bs=1M count=1 

 

the board does not bootup

But if I strip first 64 byte header and make it like this,

 

00000000 2e 07 00 ea 55 55 55 55 55 55 55 55 55 55 55 55 |....UUUUUUUUUUUU| 
00000010 55 55 55 55 00 00 00 00 00 00 00 00 00 00 00 00 |UUUU............|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

*

00000400 d1 00 20 40 xx xx xx xx xx xx xx xx xx     |.. @Xt..........|

 

the board boots up.

from 0000000 to 00000020 is start of the assembly code in flash_header.S and at 440 some more assembly instructions inside flash_header.S

 

I read TRM and I read this 

 

Boot Device Type                        Image Vector Table Offset              Initial Load Region Size

SD/MMC/eSD/eMMC/SDXC          1 Kbyte = 0x400 bytes                  4 Kbyte

 

Exp1: NXP sabre board uses these images to boot up

U-Boot image: u-boot.imx 
boot image: boot.img
Android system image: system.img
Recovery image: recovery.img
GPT table image: partition-table.img
Vendor image: vendor.img

I took my uboot image's where I have stripped uboot.img's first 64 bytes, and put in sabresd board, sabresd boots up.

Same sabresd boots with nxp android images where I checked with hexdump, the code does not start same as mine. So how ROM code undestand location of uboot in both kind of images?

Can anybody point me in right direction. My goal is to use this uboot and boot android images using nxp flashing tool.

Outcomes