i.MX53 U-Boot Issues

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

i.MX53 U-Boot Issues

5,252 Views
DonaldR_PooleJr
Contributor I

Hello All,

I'm having trouble getting u-boot to boot on my i.MX53 QSB.  I have followed the directions for flashing the u-boot to the microSD card in the i.MX53 START Linux BSP User Guide, but when I power up the board i get nothing on the serial terminal.  The lights are blue like they are suppose to be when powered on, but I don't get anything on serial (i've configured my serial as 115200,8-N-1).  I'm at a complete loss for what I need to do to get u-boot to boot.  Do I have to do anything else special to the microSD card or flash procedure?  I'm using uboot-2011.06 compiled with buildroot if that helps.  Thanks in advance.

 

Donald Poole

0 Kudos
20 Replies

1,939 Views
HenryChiang
Contributor I

HI Donald

The u-boot you use is "2009.08". You can check it when it boot up.

I also tried this version. It works fine.

Thanks

Henry

Donald R. Poole, Jr. said:

Hello Henry,

I'm u-boot rel_imx_2.6.35_11.01.00 which I downloaded from the freescale kernel/uboot github.  I'm not sure which version of u-boot the freescale team used when they released that version.  I do use the "u-boot.bin" binary and the procedure documented in the i.MX53 START Linux BSP User Guide and everything works fine. 

0 Kudos

1,939 Views
DonaldR_PooleJr
Contributor I

Hello Henry,

I'm u-boot rel_imx_2.6.35_11.01.00 which I downloaded from the freescale kernel/uboot github.  I'm not sure which version of u-boot the freescale team used when they released that version.  I do use the "u-boot.bin" binary and the procedure documented in the i.MX53 START Linux BSP User Guide and everything works fine. 

0 Kudos

1,939 Views
HenryChiang
Contributor I

Hi Donald

We use U-Boot 2011.09
It seems like the same with you.

But if we use "u-boot.bin" would that be fine?

Because I have tried it from 2011.09. it seems like we need to use u-boot.imx

Thanks

Henry

Donald R. Poole, Jr. said:

Hello Henry,

Great! I'm glad you and your boss were able to get your board up and running. But, the read command you used is different from what I was expecting.  I guess u-boot changed the mmc read parameters a bit.  Which version of u-boot are you using?

Henry Chiang said:

HI Donald

Much appreciate your help.

My boss try and figure it out.

If we use"MMC read 0x70800000 0x800 0x1800" and it works.

Thanks for great help

0 Kudos

1,939 Views
DonaldR_PooleJr
Contributor I

Hello Henry,

Great! I'm glad you and your boss were able to get your board up and running. But, the read command you used is different from what I was expecting.  I guess u-boot changed the mmc read parameters a bit.  Which version of u-boot are you using?

Henry Chiang said:

HI Donald

Much appreciate your help.

My boss try and figure it out.

If we use"MMC read 0x70800000 0x800 0x1800" and it works.

Thanks for great help

0 Kudos

1,939 Views
HenryChiang
Contributor I

HI Donald

Much appreciate your help.

My boss try and figure it out.

If we use"MMC read 0x70800000 0x800 0x1800" and it works.

Thanks for great help

0 Kudos

1,939 Views
DonaldR_PooleJr
Contributor I

Sorry for the delay, but would you mind pasting your environment variables again?  I want to make sure everything is correct.

Henry Chiang said:

Hi Donald

Much appreciate your great help.

I have tried it.

But it will come out error as following.

MMC read: dev # 0, block # 1887436800, count 2048 ... MMC: block number 0x708008
00 exceeds max(0x75c000)
0 blocks read: ERROR
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Thanks

Henry


Donald R. Poole, Jr. said:

Hi Henry,

It looks like your bootcmd_mmc is incorrect.  Instead of

  • setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 0x800 0x1800;bootm 0x70800000'

It should read:

  • setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 0x70800000 0x800 0x1800;bootm'

Note that I have moved the load address from after the bootm command to after the 0 in the mmc read command.


Henry Chiang said:

Hi Krishna

Thanks.

But I want to boot from microSD only.

So I didn't set any network or nfs.

Would you please show how to boot from microSD?

much appreciate

Henry

0 Kudos

1,939 Views
HenryChiang
Contributor I

Hi Donald

Much appreciate your great help.

I have tried it.

But it will come out error as following.

MMC read: dev # 0, block # 1887436800, count 2048 ... MMC: block number 0x708008
00 exceeds max(0x75c000)
0 blocks read: ERROR
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Thanks

Henry


Donald R. Poole, Jr. said:

Hi Henry,

It looks like your bootcmd_mmc is incorrect.  Instead of

  • setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 0x800 0x1800;bootm 0x70800000'

It should read:

  • setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 0x70800000 0x800 0x1800;bootm'

Note that I have moved the load address from after the bootm command to after the 0 in the mmc read command.


Henry Chiang said:

Hi Krishna

Thanks.

But I want to boot from microSD only.

So I didn't set any network or nfs.

Would you please show how to boot from microSD?

much appreciate

Henry

0 Kudos

1,939 Views
DonaldR_PooleJr
Contributor I

Hi Henry,

It looks like your bootcmd_mmc is incorrect.  Instead of

  • setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 0x800 0x1800;bootm 0x70800000'

It should read:

  • setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 0x70800000 0x800 0x1800;bootm'

Note that I have moved the load address from after the bootm command to after the 0 in the mmc read command.


Henry Chiang said:

Hi Krishna

Thanks.

But I want to boot from microSD only.

So I didn't set any network or nfs.

Would you please show how to boot from microSD?

much appreciate

Henry

0 Kudos

1,939 Views
HenryChiang
Contributor I

Hi Krishna

Thanks.

But I want to boot from microSD only.

So I didn't set any network or nfs.

Would you please show how to boot from microSD?

much appreciate

Henry

0 Kudos

1,939 Views
KrishnaPavan
Contributor II

Hi Henry Chiang,

for "Warning: failed to set MAC address" , you have to use "setenv serverip ab:cd:ef:gh", which is missing.

Try this and see.

Regards :: Krishna Pavan

0 Kudos

1,939 Views
HenryChiang
Contributor I

Hi Krishna

Many thanks for great help and guidence.

But I still don't understand.

Would you please show the error I made wrong?

Thanks

1.I use u-boot 2011-12 as my bootloader. So I write it to microSD as "sudo dd if=u-boot.imx of=/dev/sdc bs=512 seek=2"

2.I use demo kernel image and rootfs as my kernel and rootfs. I write kernel image as "sudo dd if=uImage of=/dev/sdc bs=512 seek=2048" I follow "i.MX53 start linux user's guide page 7-2" to copy demo rootfs into microSD partition 1

3.I set environment variable by the following

setenv mmcpart
setenv mmcroot
setenv loaduimage
setenv bootcmd
setenv bootdcript
setenv loadbootscript
setenv mmcargs
setenv mmcboot
setenv mmcdev
setenv mmcrootfstype
setenv netargs
setenv netboot
setenv script
setenv uimage
setenv loadaddr
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rw rootwait ${vga}'
setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 0x800 0x1800;bootm 0x70800000'
setenv bootcmd 'run bootcmd_mmc'
saveenv
run bootcmd

The result come out is

U-Boot 2011.12 (Jan 10 2012 - 12:04:05)

CPU:   Freescale i.MX53 family rev2.1 at 800 MHz
Reset cause: WDOG
Board: MX53 LOCO
DRAM:  1 GiB
WARNING: Caches not enabled
MMC:   FSL_ESDHC: 0, FSL_ESDHC: 1
In:    serial
Out:   serial
Err:   serial
Net:   FEC
Warning: failed to set MAC address

Hit any key to stop autoboot:  0

MMC read: dev # 0, block # 2048, count 6144 ...

and system will hang and stop.

Please give the advice.

Much appreciate

Henry

0 Kudos

1,939 Views
KrishnaPavan
Contributor II

Hi Henry Chiang,

It is clear that you have not set the env variables properly. It happens.

First, you have set you env. to nfs, and you were corrected, and directed to use MMCblock.

Second, you have not placed your image properly on SD Card, address violations.

First of all, create the MBR again. So, create any partition you want.
And don´t forget SDCard is (for linux booting):
first 512 -> MBR
at 1K -> bootloarder
at 1M -> uImage  is what I have used.

FYI, a graphic work by Daiane, will help you I hope.

510-sdcard.bmp

Regards :::  Krishna Pavan

0 Kudos

1,939 Views
HenryChiang
Contributor I

HI Donald

Much appreciate your great help.

But it still fail to boot.

Would you please help me?

Here are my stpes

1.I use "sudo dd if=uImage of=/dev/sdc bs=512 seek=2048" to write kernel image

2.I create partition as i.MX53 START Linux BSP User Guide page 7-2

3.I put microSD into slot and boot.

4.I change environment as below

setenv mmcpart
setenv mmcroot
setenv loaduimage
setenv bootcmd
setenv bootdcript
setenv loadbootscript
setenv mmcargs
setenv mmcboot
setenv mmcdev
setenv mmcrootfstype
setenv netargs
setenv netboot
setenv script
setenv uimage
setenv loadaddr
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rw rootwait ${vga}'
setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 0x800 0x1800;bootm 0x70800000'
setenv bootcmd 'run bootcmd_mmc'
saveenv
run bootcmd

It will come out as following

U-Boot 2011.12 (Jan 10 2012 - 12:04:05)

CPU:   Freescale i.MX53 family rev2.1 at 800 MHz
Reset cause: WDOG
Board: MX53 LOCO
DRAM:  1 GiB
WARNING: Caches not enabled
MMC:   FSL_ESDHC: 0, FSL_ESDHC: 1
In:    serial
Out:   serial
Err:   serial
Net:   FEC
Warning: failed to set MAC address

Hit any key to stop autoboot:  0

MMC read: dev # 0, block # 2048, count 6144 ...

and system will hang and stop.

Please give the advice.

Much appreciate

Henry



Donald R. Poole, Jr. said:

Hello Henry,

Since you said that you have followed the instruction in i.MX53 START Linux BSP User Guide, I assume that you used this dd command to write the uImage to your sd card:

  • sudo dd if= uImage of=/dev/sdb bs=512 seek=2048 && sync && sync


If so, then then your boot command should read

  • setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 ${loadaddr} 0x800 0x1800;bootm'


Since 0x800 = 2048, the read start address of the read command should equal the seek offset.  I bumped the read count size to 0x1800 since the read start address was increased the same amount.  Also, make sure you follow the rest of the instructions carefully pertaining to creating the partitions.

If you are following the i.MX53 START Linux BSP User Guide to create the root filesystem parition as well, make sure your change the bootargs_mmc environment variable as well.  Because the i.MX53 START Linux BSP User Guide only creates one parition, which holds the root filesystem contents, your bootargs_mmc command should read as follows:

  • setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rootwait rw video=mxcdi1fb:BGR24,XGA di1_primary tve'


Note, I changed the root parameter from /dev/mmcblk0p2 to /dev/mmcblk0pso the kernel will look in the 1st and only partition for the root filesystem on the sd card, if created with the i.MX53 START Linux BSP User Guide.  Although your mmc boot command dosen't use the mmcpart and mmcroot environment variables, you probably want to change them so they match the i.MX53 START Linux BSP User Guide instuctions anyway.  So, they should read:

  • mmcpart=1
  • mmcroot=/dev/mmcblk0p1 rw


I hope this helps and you are able to get you build up and running!

Cheers,

Donald

0 Kudos

1,939 Views
DonaldR_PooleJr
Contributor I

Hello Henry,

Since you said that you have followed the instruction in i.MX53 START Linux BSP User Guide, I assume that you used this dd command to write the uImage to your sd card:

  • sudo dd if= uImage of=/dev/sdb bs=512 seek=2048 && sync && sync


If so, then then your boot command should read

  • setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 ${loadaddr} 0x800 0x1800;bootm'


Since 0x800 = 2048, the read start address of the read command should equal the seek offset.  I bumped the read count size to 0x1800 since the read start address was increased the same amount.  Also, make sure you follow the rest of the instructions carefully pertaining to creating the partitions.

If you are following the i.MX53 START Linux BSP User Guide to create the root filesystem parition as well, make sure your change the bootargs_mmc environment variable as well.  Because the i.MX53 START Linux BSP User Guide only creates one parition, which holds the root filesystem contents, your bootargs_mmc command should read as follows:

  • setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rootwait rw video=mxcdi1fb:BGR24,XGA di1_primary tve'


Note, I changed the root parameter from /dev/mmcblk0p2 to /dev/mmcblk0pso the kernel will look in the 1st and only partition for the root filesystem on the sd card, if created with the i.MX53 START Linux BSP User Guide.  Although your mmc boot command dosen't use the mmcpart and mmcroot environment variables, you probably want to change them so they match the i.MX53 START Linux BSP User Guide instuctions anyway.  So, they should read:

  • mmcpart=1
  • mmcroot=/dev/mmcblk0p1 rw


I hope this helps and you are able to get you build up and running!

Cheers,

Donald

0 Kudos

1,939 Views
HenryChiang
Contributor I

By the way

It will show the error message after 3 sec without hit any key during boot process.

MMC read: dev # 0, block # 1887436800, count 1024 ... MMC: block number 0x708004
00 exceeds max(0x75c000)
0 blocks read: ERROR
Wrong Image Format for bootm command
ERROR: can't get kernel image!

0 Kudos

1,939 Views
HenryChiang
Contributor I

HI Donald

Many thanks for great help.

I have tried your suggestion. But it doesn't work.

I have followed "i.MX53 START Linux BSP User Guide" to put uImage and it still can't get.

Would you please help it? Thanks

Here is my default environment variable

U-Boot 2011.06 (Jan 10 2012 - 14:18:45)

CPU:   Freescale i.MX53 family rev2.1 at 800 MHz
Reset cause: POR
Board: MX53 LOCO
DRAM:  1 GiB
MMC:   FSL_ESDHC: 0, FSL_ESDHC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   got MAC address from fuse: 00:04:9f:01:b4:f9
FEC
Hit any key to stop autoboot:  0
MX53LOCO U-Boot > printenv
baudrate=115200
bootcmd=if mmc rescan ${mmcdev}; then if run loadbootscript; then run bootscript
; else if run loaduimage; then run mmcboot; else run netboot; fi; fi; else run n
etboot; fi
bootdelay=3
bootscript=echo Running bootscript from mmc ...; source
ethact=FEC
loadaddr=0x70800000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}
mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot} rootfstype=$
{mmcrootfstype}
mmcboot=echo Booting from mmc ...; run mmcargs; bootm
mmcdev=0
mmcpart=2
mmcroot=/dev/mmcblk0p3 rw
mmcrootfstype=ext3 rootwait
netargs=setenv bootargs console=ttymxc0,${baudrate} root=/dev/nfs ip=dhcp nfsroo
t=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; dhcp ${uimage}; bootm
script=boot.scr
stderr=serial
stdin=serial
stdout=serial
uimage=uImage

Environment size: 942/8188 bytes
MX53LOCO U-Boot >

The environment variable I set. Please correct me.

Much appreciate

setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p2 rootwait rw video=mxcdi1fb:BGR24,XGA di1_primary tve'
setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 ${loadaddr} 0x400 0x1400;bootm'
setenv bootcmd 'run bootcmd_mmc'
saveenv
run bootcmd

 

0 Kudos

1,939 Views
DonaldR_PooleJr
Contributor I

Hello Henry,

I'm glad that this discussion was able to help you and save you time with your build.  When I flash my sd card, I follow the commands documented in the i.MX53 START Linux BSP User Guide in section 7. Using a Linux Host to Set Up an SD/MMC Card.  The u-boot instructions in the README.imximage work too, but you have to make sure the address in the mmc bootcmd environment variable of u-boot matchs the address given README.imximage doc, which I believe is 0x400.  The address in the i.MX53 START Linux BSP User Guide instructions use a read address of 0x800 since they dd the uImage at an offset of 2048 bytes.  But, the u-boot doc puts the uImage at an offset of 1024. Hence, the offset of 0x400 specified in the README.imximage doc.  Hope this helps!


Henry Chiang said:

Hi Fabio and Donald

Thanks for your information.

It fix my boot issue too.

But may I know how to put uImag and rootfs into sd card.

Because from the readme (http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.imximage;h=c74...)

We need to flash SD card by "dd if=u-boot.imx of=/dev/sdc(our sd card) bs=512 seek=2"

From i.MX53 START Linux BSP User Guide,we can put uImag as "dd if=uImage of=/dev/sdc bs=512 seek=2048"

Would that be correct address? How to put uImage and rootfs into microSD in correct address?

Would you please help that?

Thanks



Fabio Estevam said:

If you use U-boot 2011.06 you should do the following:

- Export your toolchain

 

- make mx53loco_config

 

- make u-boot.imx

 

Then flash u-boot.imx into the SD card via dd as per the instructions at doc/README.imximage:

http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.imximage;h=c74...

 

0 Kudos

1,939 Views
HenryChiang
Contributor I

Hi Fabio and Donald

Thanks for your information.

It fix my boot issue too.

But may I know how to put uImag and rootfs into sd card.

Because from the readme (http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.imximage;h=c74...)

We need to flash SD card by "dd if=u-boot.imx of=/dev/sdc(our sd card) bs=512 seek=2"

From i.MX53 START Linux BSP User Guide,we can put uImag as "dd if=uImage of=/dev/sdc bs=512 seek=2048"

Would that be correct address? How to put uImage and rootfs into microSD in correct address?

Would you please help that?

Thanks



Fabio Estevam said:

If you use U-boot 2011.06 you should do the following:

- Export your toolchain

 

- make mx53loco_config

 

- make u-boot.imx

 

Then flash u-boot.imx into the SD card via dd as per the instructions at doc/README.imximage:

http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.imximage;h=c74...

 

0 Kudos

1,939 Views
DonaldR_PooleJr
Contributor I

Thanks a lot for your help Fabio!  I overlooked the documentation for u-boot somehow, but now everything is working and I can proceed. Thanks again!

Fabio Estevam said:

If you use U-boot 2011.06 you should do the following:

- Export your toolchain

 

- make mx53loco_config

 

- make u-boot.imx

 

Then flash u-boot.imx into the SD card via dd as per the instructions at doc/README.imximage:

http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.imximage;h=c74...

 

0 Kudos

1,939 Views
fabio_estevam
NXP Employee
NXP Employee

If you use U-boot 2011.06 you should do the following:

- Export your toolchain

 

- make mx53loco_config

 

- make u-boot.imx

 

Then flash u-boot.imx into the SD card via dd as per the instructions at doc/README.imximage:

http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.imximage;h=c74239d2ade911b76269b386caeac849a2c8...

0 Kudos