How to setup MMC card to load the kernel

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

How to setup MMC card to load the kernel

2,968 Views
SyedRafiulHussa
Contributor II

Hi,

I wrote some wrong commands to load my custom built kernel image on MMC/SD card and it destroyed the partition of MMC/SD card. My u-boot is is working through which I can boot my kernel with NFS server. Now, I would like to know the procedure to set up MMC/SD card so that I can boot my kernel from MMC/SD.

Thanks.

Syed Rafiul Hussain

Labels (1)
0 Kudos
6 Replies

2,148 Views
KrishnaPavan
Contributor II

Hi Syed,

If your board has some Switches, then you have set them, so that the SD/MMC boot mode is enabled.

Find Configuration switch setup for SD boot, in your board related User_guide, as it differs from EVK/ARD/START etc.

From your log, it seems, the switch configuration for boot from SD/MMC is set.

Regarding the error :: MMC: block number 0x70800800 exceeds max(0x75c000), I think you need to check your environment variables with that given in the user_guide.

"printenv" as told by Mario Medina Arzate, will help the check.

Regards :: Krishna Pavan

0 Kudos

2,148 Views
zhaojiawei
Contributor I

Hi Krishna,

I got the similar problem.My board is I.MX6Quad.I try to loading zImage by the command "mmc read" from eMMc.And the following error shows to me:

MMC read: dev # 2, block # 4096, count 8192 ... MMC: block number 0x3000 exceeds max(0x2000)
0 blocks read: ERROR

Bad Linux ARM zImage magic!

My bootcmd is as follow:

#define CONFIG_BOOTCOMMAND \
   "setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} rootfstype=ext4 video=mxcfb0:dev=lcd,CLAA-WVGA@60,bpp=32,if=RGB24;" \
   "mmc dev ${mmcdev} ${mmcpart};"\
   "mmc read ${fdt_addr} 0x800 0x80;"\
   "mmc read ${loadaddr} 0x1000 0x2000;" \
   "bootz ${loadaddr} - ${fdt_addr};"

I have read the user_guide before,but there is nothing can help me.Could you tell me how to solve this problem?

Thanks 

Phoenix

0 Kudos

2,148 Views
MarioMedinaArza
Contributor I

Hi Syed,

can you please post the output of "printenv" when you are in u-boot login?

0 Kudos

2,148 Views
SyedRafiulHussa
Contributor II

Hi,

Thanks for your reply.

I followed every steps of the i.MX53_START_Linux_BSP_UserGuide.pdf to setup the SD/MMC card. However, when I tried to boot, the following error shows to me:

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!

@K. Pavan: Would you please be tell me more specifically about the Switch Configuration. I didn't do any switch configuration.

Thanks.

Syed Rafiul Hussain

0 Kudos

2,148 Views
KrishnaPavan
Contributor II

Hi Syed R H,

One thing you should remember is that there is a Switch Configuration also in the initial pages/sections.

Do follow the instructions as posted by Prabhu Sundararaj very clearly.

Regards :: Krishna Pavan

0 Kudos

2,148 Views
PrabhuSundarara
NXP Employee
NXP Employee

Download the Linux docs bundle from freescale website (http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX53QSB&fpsp=1&tab=Documentation_Tab).

Extract the archive

Open the PDF file doc\mx5\i.MX53_START_Linux_BSP_UserGuide.pdf

 

Follow the section 7 Using a Linux Host to Set Up an SD/MMC Card

This will guide you to flash u-boot, kernel, rootfs.

 

Follow the section 8.2 Run the Image from MMC/SD.

0 Kudos