problem in booting from SD card

cancel
Showing results for 
Search instead for 
Did you mean: 

problem in booting from SD card

2,286 Views
Gokul
Contributor I

We are using eMMC  instead of NAND flash in our own imx25 custom board. We flashed u-boot , u-image into SD Card.  And boot configuration is also changed to boot from SD card.  When we try to boot we are getting following error repeatedly. Is there any configuration required in u-boot?

U-Boot 2009.08 (May 21 2012 - 23:55:16)

CPU:   Freescale i.MX25 at 398 MHz

mx25 cpu clock: 398MHz

ipg clock     : 66498560Hz

Board: i.MX25 MAX PDK (3DS)

I2C:   ready

DRAM:  64 MB

NAND:  No NAND device found!!!

0 MiB

MMC:   FSL_ESDHC: 0

U-Boot 2009.08 (May 21 2012 - 23:55:16)

CPU:   Freescale i.MX25 at 398 MHz

mx25 cpu clock: 398MHz

ipg clock     : 66498560Hz

Board: i.MX25 MAX PDK (3DS)

I2C:   ready

DRAM:  64 MB

NAND:  No NAND device found!!!

0 MiB

MMC:   FSL_ESDHC: 0

U-Boot 2009.08 (May 21 2012 - 23:55:16)

CPU:   Freescale i.MX25 at 398 MHz

mx25 cpu clock: 398MHz

ipg clock     : 66498560Hz

Board: i.MX25 MAX PDK (3DS)

I2C:   ready

DRAM:  64 MB

NAND:  No NAND device found!!!

0 MiB

MMC:   FSL_ESDHC: 0

Labels (2)
0 Kudos
8 Replies

373 Views
Gokul
Contributor I

Hi,

I changed statement if(gd->env_valid == 1) in env_common.c file. Now its booting fine..

But now I am having other issues in rootfs I am not able to mount rootfs.

Please check attachment for log

and also when i enter command saveenv in u-boot, its trying to save in NAND. please tell me how to change it to MMC

Thanks

Gokul


0 Kudos

373 Views
Gokul
Contributor I

i found problem in env_common.c under common directory

here in statement if (gd->env_valid == 0) is failed and trying to call functio env_relocate_spec ()

this function env_relocate_spec() is not been called. i need to know what this if statement and this env_relocate function doing.

Thanks

Gokul

0 Kudos

373 Views
VladanJovanovic
NXP Employee
NXP Employee

Are you using u-boot binary from Freescale binary release on a custom HW?

You will most probably have to rebuild u-boot to correspond to your HW, as it's probably different from i.MX25PDK .

Might make sense to check in sources what u-boot does if it's configured to read init script from NAND and NAND is not found - resets may be coming from that or the fact you're using u-boot that is not customized for your HW.

Vladan

0 Kudos

373 Views
Gokul
Contributor I

Hi Vladan,

u-boot is working fine in our custom board when we use NAND. But when we connect SD card to the board and booting from SD card also working fine. But when we try to bood from SD card without NAND is failed. i am getting above error.

Thanks

Gokul

0 Kudos

373 Views
JorgeRama_rezRi
NXP Employee
NXP Employee

Hi Gokul,

From your answers, seems like your u-boot is looking for a NAND device. I had a SW mate help me remove all NAND functionality from u-boot and compiled it for you. Could you please check if the attached works on your system?

Best regards.

Jorge.

0 Kudos

373 Views
Gokul
Contributor I

HI Jorge,

i tried your image it booting completely. But it failed to saveenv and also if i run run bootcmd_mmc i am getting following error

MX25 U-Boot > run bootcmd_mmc

MMC read: dev # 0, block # -2139095040, count 2048 ... MMC: block number 0x80800800 exceeds max(0x3af000)

0 blocks read: ERROR

Wrong Image Format for bootm command

ERROR: can't get kernel image!



Please verify my environment setting is correct or not

MX25 U-Boot > printenv

bootdelay=3

baudrate=115200

loadaddr=0x80800000

netdev=eth0

ethprime=smc911x-0

uboot=u-boot.bin

uboot_addr=0xa0000000

kernel=uImage

bootargs_base=setenv bootargs console=ttymxc0,115200

bootargs_nfs=setenv bootargs $(bootargs) root=/dev/nfs ip=dhcp nfsroot=$(serverip):$(nfsrootfs),v3,tcp

bootcmd=run bootcmd_net

bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm

load_uboot=tftpboot ${loadaddr} ${uboot}

splashimage=0x80800000

stdin=serial

stdout=serial

stderr=serial

ethact=FEC0

bootargs_mmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rootfstype=jffs2

bootcmd_mmc=run bootargs_base bootargs_mmc;mmc read 0 ${loadaddr} 0x800 0x1000;bootm

bootargs=console=ttymxc0,115200 root=/dev/mmcblk0p1 rootfstype=jffs2

Environment size: 743/262140 bytes

Regards

Gokul

0 Kudos

373 Views
JorgeRama_rezRi
NXP Employee
NXP Employee

Hi Gokul,

- You should be compiling mx25_uboot.h instead of mx25_uboot_mfg.h. Is this correct in your system?

- How are you configuring your bootargs? I'm attaching the reference manual with instructions o how to do it in order to boot from SD.

- Did you copy the same legend 3 times? Or is your system resetting?

- Are you able to boot from SD using the MX25 PDK?

Best regards.

Jorge.

0 Kudos

373 Views
Gokul
Contributor I

Hi Jorge,

Thanks for your reply.. please check below answer for your question

- You should be compiling mx25_uboot.h instead of mx25_uboot_mfg.h. Is this correct in your system?

          I dont know about this. please tell me where to check

- How are you configuring your bootargs? I'm attaching the reference manual with instructions o how to do it in order to boot from SD.

         I not able to get into command line to put all this environmental variables

- Did you copy the same legend 3 times? Or is your system resetting?

         its continuously print this message repeatedly

- Are you able to boot from SD using the MX25 PDK?

          Yes.

Thanks

Gokul


0 Kudos