User experience with 1109 binaries: "Warning - bad CRC or MMC"

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

User experience with 1109 binaries: "Warning - bad CRC or MMC"

1,726 Views
JohnReed
Contributor I


On my machine:

  - /dev/sdc is  where my 4GB microSD card is inserted.   The device is NOT mounted.

  - <INSTALL_PATH> is /home/IMX53.   For instance, the full path to my rootfs would be:

                                   /home/IMX53/ltib/rootfs


To get the binaries, goto:

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX53QSB&fpsp=1&tab=Design_Tools_Tab

Then click on:          "Board Support Packages (7)"

Then click on the "Download" button for:    L2.6.35_MX53_ER_1109_IMAGE_

 

 

All binaries are from the "L2.6.35_11.09.01_ER_images_MX5X" directory.


     -  u-boot comes from L2.6.35_11.09.01_ER_images_MX5X/u-boot-mx53-loco.bin
     -  rootfs comes from L2.6.35_11.09.01_ER_images_MX5X/rootfs.ext2
     -  kernel comes from:

              L2.6.35_11.09.01_ER_images_MX5X/kernel_2.6.35.3-imx_11.09.01_armel.deb




     1.  Mount rootfs.ext2 on the loop device, and then copy to <INSTALL_PATH>/ltib/rootfs:


             mkdir /mnt/rootfs

             mount -o loop -t ext2 rootfs.ext2 /mnt/rootfs

             rsync -av /mnt/rootfs <INSTALL_PATH>/ltib

 

     2.  Extract files out of the .deb file, and copy the boot directory to the just created rootfs:

             ar xv kernel_2.6.35.3-imx_11.09.01_armel.deb

             gunzip data.tar.gz

             tar xvf data.tar

             rsync -av boot <INSTALL_PATH>/ltib/rootfs


     3.  Copy u-boot-mx53-loco.bin to rootfs, and note the destination name change:

             cp u-boot-mx53-loco.bin <INSTALL_PATH>/ltib/rootfs/boot/u-boot.bin



FYI only, Here's an 'ls -CF' listing of <INSTALL_PATH>/ltib/rootfs:

root@ubserver:<INSTALL_PATH>/ltib/rootfs# ls -CF
bin/      dev/   home/   lost+found/   opt/     root/    sys/     unit_tests/    var/
boot/    etc/   lib/         mnt/              proc/   sbin/    tmp/    usr/



     4.  Now use the flash_ltib.sh script to write everything.   flash_ltib.sh is found at this link:

http://imxcommunity.org/group/imx53quickstartboard/forum/topics/flashing-helper-script-for-the

 
             export LTIB_PATH=<INSTALL_PATH>/ltib

             flash_ltib.sh /dev/sdc

 

After flash_ltib.sh completes, you can remove the microSD card, place it into QSB, and Power Up!!

 

 

The kernel comes up, the Matchbox window manager shows on the display!!

I can login as root from the serial port, and I can ssh into QSB just fine!!

 

The worrisome part is a message that is displayed early on in the boot process:

 

 

U-Boot 2009.08-00358-g57b8640 (Sep 26 2011 - 09:49:07)

CPU: Freescale i.MX53 family 2.1V at 800 MHz
mx53 pll1: 800MHz
mx53 pll2: 400MHz
mx53 pll3: 432MHz
mx53 pll4: 455MHz
ipg clock : 66666666Hz
ipg per clock : 33333333Hz
uart clock : 66666666Hz
cspi clock : 108000000Hz
ahb clock : 133333333Hz
axi_a clock : 400000000Hz
axi_b clock : 200000000Hz
emi_slow clock: 133333333Hz
ddr clock : 400000000Hz
esdhc1 clock : 80000000Hz
esdhc2 clock : 80000000Hz
esdhc3 clock : 80000000Hz
esdhc4 clock : 80000000Hz
nfc clock : 26666666Hz
Board: MX53-LOCO 1.0 Rev. A
Boot Reason: [POR]
Boot Device: SD
I2C: ready
DRAM: 1 GB
MMC: FSL_ESDHC: 0,FSL_ESDHC: 1
*** Warning - bad CRC or MMC, using default environment

In: serial
Out: serial
Err: serial
da9052_i2c_is_connected - i2c write success....
Serial reinitilized!
Net: got MAC address from IIM: 00:04:9f:01:e1:8d

 

***Note that I highlighted the text in red, it doesn't show that way on the serial console

 

I get that Warning message for any builds from LTIB that I do, so I decided NOT to do a build, and just use the supplied binaries.    But even with the binaries I'm getting that message.

 

Note also I was getting the same result ("bad CRC or MMC") when using an 8GB card.  (So I went out this morning and bought a 4GB card to see if I got the same results.  $14.99 at Target BTW!)

 

My next step is to debug u-boot and see exactly why that message is popping up.  Just glancing at the code, looks like it's from one of about 4 or 5 different possibilites.

 

More to come......

 

JR


Labels (1)
0 Kudos
16 Replies

1,283 Views
KrishnaPavan
Contributor II

Hi Carl,

What did you actually do / follow to flash your SD card?

0 Kudos

1,283 Views
CarlIgelstram
Contributor I

Hi,

I have the same problem, did you resolve this ?

Best regards



Konstantinos Tsimpoukas said:

hi i had build the SD card in the way that you described here and for one time the QSB booted (without stoping the boot) and i was playing with the Matchbox environment. After a while I  tried to boot and provide the commands that are described in the "i.MX53_START_Linux_BSP_UserGuide.pdf".

1.setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
2.setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rootwait rw video=mxcdi1fb:BGR24,XGA di1_primary tve'
3.setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 ${loadaddr} 0x800 0x1800;bootm'
4.setenv bootcmd 'run bootcmd_mmc'
5.saveenv
6.run bootcmd

 

but then i had these error messages :

 

Hit any key to stop autoboot:  0
MX53-LOCO U-Boot > setenv bootargs_mmc 'setenv bootargs ${bootargs} console=tty1 root=/dev/mmcblk0p1 rootwait rw'
MX53-LOCO U-Boot > setenv loadk 'mmc read 0 ${loadaddr} 0x800 0x1800'
MX53-LOCO U-Boot > setenv bootcmd_mmc 'run bootargs_base bootargs_mmc; run loadk; bootm'
MX53-LOCO U-Boot > setenv bootcmd 'run bootcmd_mmc'
MX53-LOCO U-Boot > saveenv
Saving Environment to MMC...
Writing to MMC(0)... done
MX53-LOCO U-Boot > run bootcmd

MMC read: dev # 0, block # 1887436800, count 2048 ... MMC: block number 0x70800800 exceeds max(0x75c000)
0 blocks read: ERROR
Wrong Image Format for bootm command
ERROR: can't get kernel image!
MX53-LOCO U-Boot >

 

Is there any idea of how to correct this error?

I am sure that the image in the SD card is good.

Thanks

 

0 Kudos

1,283 Views
KrishnaPavan
Contributor II

Hi Henry,

I used the settings for i.MX51 EVK

setenv serverip aaa.bbb.ccc.ddd
setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
setenv bootargs_mmc 'setenv bootargs ${bootargs} console=tty0 root=/dev/mmcblk0p1 rootwait rw'
setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 ${loadaddr} 0x800 0x1800;bootm'
setenv bootcmd 'run bootcmd_mmc'

Similar settings can be found for i.MX53

Regards Krishna Pavan

0 Kudos

1,283 Views
HenryChiang
Contributor I

Hi Krishna

Thanks for great help

I set some environment setting as below

U-boot.bin ,uImage and Rootfs comes from L2.6.35_11.01.00_ER_images_MX5X.tar.gz

Below is the result

MX53-LOCO U-Boot > setenv bootfile uImage
MX53-LOCO U-Boot > mmc write 1 0x70800000 0x800 0x1800

MMC write: dev # 1, block # 2048, count 6144, partition # 0 ...
6144 blocks written: OK
MX53-LOCO U-Boot > setenv bootargs console=tty,115200 root=/dev/mmcblk1p1 @{vga}

MX53-LOCO U-Boot > setenv boot_mmc 'mmc read 1 ox70800000 0x800 0x1800;bootm 0x7
0800000'
MX53-LOCO U-Boot > setenv bootcmd run boot_mmc
MX53-LOCO U-Boot > saveenv
Saving Environment to MMC...
Writing to MMC(1)... done


MX53-LOCO U-Boot > reset
resetting ...
M

After reset. It will hang.

Would you please help it?

Much appreciate.

Henry

.


Krishna Pavan said:

Hi Henry, You have to set the environment variables.

As you can see,it is trying to boot from NFS, change that to [ from ] SD. refer user guide, steps are given in detail.

Other thing you can do is to check the imxcommunity for the same, if not using userguide.

i. Hit any key to stop auto-boot

ii. U-boot prompt comes up

iii.Then change the env variables accordingly, as per the Linux_EVK_BSP_Guide


Regards Krishna Pavan

0 Kudos

1,283 Views
KrishnaPavan
Contributor II

Hi Henry, You have to set the environment variables.

As you can see,it is trying to boot from NFS, change that to [ from ] SD. refer user guide, steps are given in detail.

Other thing you can do is to check the imxcommunity for the same, if not using userguide.

i. Hit any key to stop auto-boot

ii. U-boot prompt comes up

iii.Then change the env variables accordingly, as per the Linux_EVK_BSP_Guide


Regards Krishna Pavan

0 Kudos

1,283 Views
HenryChiang
Contributor I

Hi Krishna

Thanks for great help.

But when I plug MMC plus card into slot and printenv.

It show as below.

MX53-LOCO U-Boot > printenv
bootdelay=3
baudrate=115200
loadaddr=0x70800000
netdev=eth0
ethprime=FEC0
uboot=u-boot.bin
kernel=uImage
nfsroot=/opt/eldk/arm
bootargs_base=setenv bootargs console=ttymxc0,115200
bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serveri
p}:${nfsroot},v3,tcp
bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; boot
m
bootargs_mmc=setenv bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p2 rootwait
bootcmd_mmc=run bootargs_base bootargs_mmc; bootm
bootcmd=run bootcmd_net
stdin=serial
stdout=serial
stderr=serial
ethact=FEC0

Environment size: 568/131068 bytes

It will has error as below.

Would you please help that?

Thanks

CPU:   Freescale i.MX53 family 2.0V at 1000 MHz
mx53 pll1: 1000MHz
mx53 pll2: 400MHz
mx53 pll3: 216MHz
mx53 pll4: 455MHz
ipg clock     : 66666666Hz
ipg per clock : 33333333Hz
uart clock    : 21600000Hz
cspi clock    : 54000000Hz
ahb clock     : 133333333Hz
axi_a clock   : 400000000Hz
axi_b clock   : 200000000Hz
emi_slow clock: 133333333Hz
ddr clock     : 400000000Hz
esdhc1 clock  : 80000000Hz
esdhc2 clock  : 80000000Hz
esdhc3 clock  : 80000000Hz
esdhc4 clock  : 80000000Hz
nfc clock     : 26666666Hz
Board: MX53-LOCO 1.0
Boot Reason: [WDOG]
Boot Device: MMC
I2C:   ready
DRAM:   1 GB
MMC:   FSL_ESDHC: 0, FSL_ESDHC: 1
*** Warning - bad CRC or MMC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   got MAC address from IIM: 00:04:9f:01:b4:f9
FEC0 [PRIME]
Hit any key to stop autoboot:  0
FEC: enable RMII gasket
PHY indentify @ 0x0 = 0x0007c0f1
*** ERROR: `serverip' not set
Wrong Image Format for bootm command
ERROR: can't get kernel image!
MX53-LOCO U-Boot >



Krishna Pavan said:

Hi Henry,

Yeah! that should be same, make sure you check the mmcblk0p0 or mmcblk0p1 when done, with the env. var. setup.

Rest is the same.

Regards Krishna Pavan

0 Kudos

1,283 Views
KrishnaPavan
Contributor II

Hi Henry,

Yeah! that should be same, make sure you check the mmcblk0p0 or mmcblk0p1 when done, with the env. var. setup.

Rest is the same.

Regards Krishna Pavan

0 Kudos

1,283 Views
HenryChiang
Contributor I

Hi Krishna Pavan

Thanks for help.

I found it in source file.

Now I need to boot from MMC Plus card.

Would that step be the same with MMC?

Thanks

Henry

0 Kudos

1,283 Views
KrishnaPavan
Contributor II

Hi Henry Chiang,

You can get the guide from the freescale website itself.

Browse through the Documentation/Downloads Section.

You will get many other documents with detailed explanation.

Regards  ::   Krishna Pavan

0 Kudos

1,283 Views
HenryChiang
Contributor I

Hi John

Would you please tell me where I can download "i.MX53_START_Linux_BSP_UserGuide.pdf".

I have same problem as you too. But i tried to boot from MMC plus card.

Now I clone whole microSD to MMC plus. It will show message as you show.

I tried to figure out it.

Thanks

Henry

0 Kudos

1,283 Views
KonstantinosTsi
Contributor I

hi i had build the SD card in the way that you described here and for one time the QSB booted (without stoping the boot) and i was playing with the Matchbox environment. After a while I  tried to boot and provide the commands that are described in the "i.MX53_START_Linux_BSP_UserGuide.pdf".

1.setenv bootargs_base 'setenv bootargs console=ttymxc0,115200'
2.setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rootwait rw video=mxcdi1fb:BGR24,XGA di1_primary tve'
3.setenv bootcmd_mmc 'run bootargs_base bootargs_mmc;mmc read 0 ${loadaddr} 0x800 0x1800;bootm'
4.setenv bootcmd 'run bootcmd_mmc'
5.saveenv
6.run bootcmd


but then i had these error messages :

 

Hit any key to stop autoboot:  0
MX53-LOCO U-Boot > setenv bootargs_mmc 'setenv bootargs ${bootargs} console=tty1 root=/dev/mmcblk0p1 rootwait rw'
MX53-LOCO U-Boot > setenv loadk 'mmc read 0 ${loadaddr} 0x800 0x1800'
MX53-LOCO U-Boot > setenv bootcmd_mmc 'run bootargs_base bootargs_mmc; run loadk; bootm'
MX53-LOCO U-Boot > setenv bootcmd 'run bootcmd_mmc'
MX53-LOCO U-Boot > saveenv
Saving Environment to MMC...
Writing to MMC(0)... done
MX53-LOCO U-Boot > run bootcmd

MMC read: dev # 0, block # 1887436800, count 2048 ... MMC: block number 0x70800800 exceeds max(0x75c000)
0 blocks read: ERROR
Wrong Image Format for bootm command
ERROR: can't get kernel image!
MX53-LOCO U-Boot >

 

Is there any idea of how to correct this error?

I am sure that the image in the SD card is good.

Thanks

0 Kudos

1,283 Views
CurtisWald
NXP Employee
NXP Employee

Hi John,

Here is a bit more detail on environment usage:

For any newly imaged system the environment space is not part of the creation process. The saveenv u-boot command is used to write the current u-boot environment variables (issue the printenv u-boot command to see what these are) and also a CRC to the save environment location. When u-boot starts execution at  the environment loading a CRC validation is performed and if a saveenv has never been issued the warning message you identified is shown. 

 

Background:

CONFIG_### C compiler pre-processor directives are used to setup the build features for u-boot.bin generation. The README found at the top level source directory of u-boot (./ltib -m prep -p u-boot to retrieve - then change dir to rpm/BUILD/u-boot -<ver>) provides an overview of variables and a description.

 

For environment variable related items  search the README for the string "ENV" and you will find CONFIG_### related to environment space: for example CONFIG_ENV_ADDR, CONFIG_ENV_OFFSET_REDUND, etc. Or just open and read all options.

 

For the i.MX53 QSB this is identified in U-Boot sources a mx53_loco which was derived from low cost board. Looking in rpm/BUILD/u-boot-<ver>/include/configs/mx53_loco.h there is #define CONFIG_EXTRA_ENV_SETTINGS which provides the default u-boot environment variables to use if the CRC check fails when retrieving the u-boot environment space during startup. Here you can adjust what you would like to use for the defaults.

In the 11.09 ltib distribution, looking at the bottom of the mx53_loco.h you will find various CONFIG's for the size of env space, offsets, location of env area, etc. For the run time processing for this case look in common/env_mmc.c and you will see where the Warning message is printed.

 

-Curtis

0 Kudos

1,283 Views
JohnReed
Contributor I

YES!!   Solved.

 

Initial installs of u-boot are going to give that Warning, and then you must break into u-boot and modify the environment variables.      Once the env vars have been modified AND saved, then subsequent boots will be OK.

 

I followed the directions in section 8.2 of "i.MX53_START_Linux_BSP_UserGuide.pdf"

 

More specifically, I needed to really only change 2 of the env variables:

 

    - bootargs_mmc

    - bootcmd_mmc

 

I changed them EXACTLY as specified in the document, and voila.......the Warning message is gone!!

 

Thank you Krishna!!

 

JR

0 Kudos

1,283 Views
KrishnaPavan
Contributor II



John Reed said:


FEC0 [PRIME]
Hit any key to stop autoboot: 3 2 1 0
mmc0 is current device

MMC read: dev # 0, block # 2048, count 6144 ... 6144 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.35.3-1129-g691c08a
Image Type: ARM Linux Kernel Image (uncompress..........

 

As you can see, that it is using a default environment, you can try to

 

i. Hit any key to stop aut0-boot

ii. U-boot prompt comes up

iii.Then change the env variables accordingly, as per the Linux_EVK_BSP_Guide

 

Regards  ::  Krishna Pavan

0 Kudos

1,283 Views
JohnReed
Contributor I

Krishna,

 

Thanks for the reply.    That warning message is coming out BEFORE I get a chance to break into u-boot, and so thus I haven't had a chance to set any env variables yet.    It's not trying to boot anything at the time of the warning message, it's just u-boot executing and doing all it's checks.

 

Here's a bit more text from the serial console:

 

U-Boot 2009.08-00358-g57b8640 (Sep 26 2011 - 09:49:07)

CPU: Freescale i.MX53 family 2.1V at 800 MHz
mx53 pll1: 800MHz
mx53 pll2: 400MHz
mx53 pll3: 432MHz
mx53 pll4: 455MHz
ipg clock : 66666666Hz
ipg per clock : 33333333Hz
uart clock : 66666666Hz
cspi clock : 108000000Hz
ahb clock : 133333333Hz
axi_a clock : 400000000Hz
axi_b clock : 200000000Hz
emi_slow clock: 133333333Hz
ddr clock : 400000000Hz
esdhc1 clock : 80000000Hz
esdhc2 clock : 80000000Hz
esdhc3 clock : 80000000Hz
esdhc4 clock : 80000000Hz
nfc clock : 26666666Hz
Board: MX53-LOCO 1.0 Rev. A
Boot Reason: [POR]
Boot Device: SD
I2C: ready
DRAM: 1 GB
MMC: FSL_ESDHC: 0,FSL_ESDHC: 1
*** Warning - bad CRC or MMC, using default environment

In: serial
Out: serial
Err: serial
da9052_i2c_is_connected - i2c write success....
Serial reinitilized!
Net: got MAC address from IIM: 00:04:9f:01:e1:8d
FEC0 [PRIME]
Hit any key to stop autoboot: 3 2 1 0
mmc0 is current device

MMC read: dev # 0, block # 2048, count 6144 ... 6144 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
Image Name: Linux-2.6.35.3-1129-g691c08a
Image Type: ARM Linux Kernel Image (uncompressed)

 

 

 

As you can see, the Warning message comes out a little bit before the "Hit any key to stop autoboot" message.

 

JR

0 Kudos

1,283 Views
KrishnaPavan
Contributor II

Hi John Reed,

 

Just Supply the necessary variables [boot args] to the environment.

 

Its not because of an SD Card, but it is trying to boot from another source.

Check with the setting the env variables .

 

Regards   ::     Krishna Pavan

0 Kudos