IMX53 QSB: ERROR: can't get kernel image!

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

IMX53 QSB: ERROR: can't get kernel image!

3,461 Views
Swamy
Contributor III

Hello,

 

I have built uboot, kernel and rootfs using LTIB for IMX53 QSB. I am using kernel 2.6.35. I am getting error as cannot get kernel image.

Please suggest.

My built kernel under /ltib/rootfs/boot is 3184904 bytes, but the u-boot command show 3184840 bytes....Is something wrong here?

 

I used following commands to flash u-boot and uImage respectively (It is a 8GB microsdcard)

 

$sudo dd if=u-boot.bin of=/dev/sdb bs=512 && sync && sync

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

 

MMC read: dev # 0, block # 2048, count 6144 partition # 0 ...
6144 blocks read: OK
## Booting kernel from Legacy Image at 70800000 ...
Image Name:   Linux-2.6.35.3-744-g27fdf7b
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3184840 Bytes =  3 MB
Load Address: 70008000
Entry Point:  70008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!

MX53-LOCO U-Boot >

Labels (1)
0 Kudos
7 Replies

1,384 Views
Swamy
Contributor III

Thanks Paul for the help.. It helped me to resolve the issue.

Regards,

Swamy

0 Kudos

1,384 Views
PaulRobertson
Contributor I

At this juncture, I sugest you find the pre-built kernel image (based on the 2.6.35.3) that was distributed with the BSP and use it to re-program the microSD card (instead of the kernel image you built).  Then you can boot it up and make sure your u-boot environment variable are set sufficiently OK.

 

When you are sure you can boot, then take another shot at building a kernel image, re-program the card and boot it up.

 

It appeared, at first anyway, that the kernel you initially built was just a little biger than the size providied for in the boot command (agrigated from the environment variables).  And you did have success getting the image to pass the checksum.  But it didn't boot.  I can't tell anything else from the output you have provided.

0 Kudos

1,384 Views
Swamy
Contributor III

I changed the environment variables as you suggested....I did the following changes...Penguin logo comes but it fails to get the root prompt....Pleae suggest.

set bootargs_mmc set bootargs ${bootargs} root=/dev/mmcblk0p1 rw rootwait
saveenv
set bootargs_base setenv bootargs console=ttymxc0,115200 ${vga}
saveenv
set bootcmd_mmc=run bootargs_base bootargs_mmc; mmc read 0 ${loadaddr} 0x800 0x1900;bootm

 

ROOT PROMPT NOT COMING.......

regulator_init_complete: incomplete constraints, leaving DA9052_LDO2 on
regulator_init_complete: incomplete constraints, leaving DA9052_LDO1 on
mxc_rtc mxc_rtc.0: setting system clock to 1970-01-01 00:00:01 UTC (1)
usb 1-1: new high speed USB device using fsl-ehci and address 2
Waiting for root device ...
usb 1-1: device v1390 p0005 is not supported
generic-usb 0003:1390:0005.0001: hiddev96,hidraw0: USB HID v1.11 Device [TomTom
International Composite ADC/VDC/HIDC Gadget] on usb-fsl-ehci.0-1/input2
2:4:1: endpoint lacks sample rate attribute bit, cannot set.
2:5:1: endpoint lacks sample rate attribute bit, cannot set.

?

0 Kudos

1,384 Views
PaulRobertson
Contributor I

Well, we are guessing you need to make that 0x1800 bigger so that u-boot will load the entire kernel image (so the CRC check will pass).  You can try entering the following 2 commands at the u-boot prompt (do the "press any key...).  NOTICE the single ticks (') instead of quotes=ation marks.  {Hopefully you can just past the lines, one at a time, into your serial terminal window.}

 

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

   boot

If this works, reboot and press any key again, re-enter the 1st command and then enter

 

   saveenv

 

{this will save the config info into non-volitile memory (eeprom I presume) so that the next time you power-up and boot, the environment variables wll still be as per these commands.

0 Kudos

1,384 Views
KrishnaPavan
Contributor II

If you are booting from SD Card, then you may need to change your environment variables... I guess.

I mean, there is no wrong with your partition scheme. 8192 will be o.k

0 Kudos

1,384 Views
Swamy
Contributor III

Thanks for the reply. Please see my printenv output...Please suggest what I should do, for partitions of rootfs, i have selected 8192 as offset.

My u-boot is of 162284 bytes, uImage(3184904 bytes)..


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_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
ethact=FEC0
bootfile=uImage
bootcmd_mmc=run bootargs_base bootargs_mmc;mmc read 0 ${loadaddr} 0x800 0x1800;b
ootm
bootcmd=run bootcmd_mmc
bootargs_mmc=set bootargs console=ttymxc0,115200 root=/dev/mmcblk0p1 rootwait rw
 video=mxcdi1fb:BGR24,XGA di1_primary tve root=/dev/mmcblk0p1 rw rootwait
bootargs_base=setenv bootargs console=ttymxc0,115200
stdin=serial
stdout=serial
stderr=serial
bootargs=console=ttymxc0,115200 root=/dev/mmcblk0p1 rootwait rw video=mxcdi1fb:B
GR24,XGA di1_primary tve root=/dev/mmcblk0p1 rw rootwait

Environment size: 832/131068 bytes
MX53-LOCO U-Boot >

0 Kudos

1,384 Views
PaulRobertson
Contributor I

It looks like you probably need to tweak the bootcmd u-boot environment variable.  (press any key to serial port before u-boot starts loading the kernel image).  Here is a typical setting of an environment variable used to load an image from SD card:

 

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

 

Here, the 0x1800 tells u-uboot the {maximum} size of the image, in 512-byte sectors.  (i.e., 0x1800 = 6144 decimal)

 

This would imply your image file is bigger than what was used in the example I copied that line from (ref i.MX53 START Linux User’s Guide, Rev 11.01.00)

 

I could probably just make that number bigger, but I don't know how much room you left at the beginning of the SD card when you created the 1st partition for the root file system... 

 

So, you might consider interrupting the u-boot on the serial interface, dumping the environment variable setings and post the output here.  Mine looks something like this:

 

    Hit any key to stop autoboot:  0
    MX53-LOCO U-Boot > printenv
    bootdelay=3
    baudrate=115200
    loadaddr=0x70800000
    netdev=eth0
    ethprime=FEC0
    uboot=u-boot.bin

        :

        :
kernel=uImage
bootargs_nfs=setenv bootargs ${bootargs} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroo                     t},v3,tcp
bootcmd_net=run bootargs_base bootargs_nfs; tftpboot ${loadaddr} ${kernel}; bootm

0 Kudos