This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Uboot environment conflicts

Hai I'm sekra

I'm developing the custom board from the beagleboard xm.I develop 5 boards.In the uboot i modified the u-boot environments using the function setenv.

Using setenv,i set the bootcmd parameter as " setenv bootcmd mmc rescan; run loaduimage; run mmcboot" as i setenv.In the 5 boards i used the above bootloader but 1 board doesn't bootsup after uboot.That board alone shows " Bad kernel image so doesn't shows /boot/uImage"it stops at uboot,doesn't boot the kernel image but other four boards were done.

In the printenv ,it works when type as run loaduimage.it gets boot up and load the kernel.  run loaduimagefat doesn't boot.

What is the reason?what is the difference between loaduimage and loaduimagefat?

Printenv Below for my board::::

*************************************************************************************************************************************************

omap_beagleboardXM# pri

baudrate=115200
beaglerev=xMA
bootargs=console=ttyO2,115200n8 mpurate=auto buddy=none camera=none vram=12M omapfb.mode=dvi:1024x600MR-32@60 omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait
bootcmd=mmc rescan; run loaduimage; run mmcboot
bootdelay=5
bootenv=uEnv.txt
bootfile=uImage.beagle
buddy=none
camera=none
console=ttyO2,115200n8
defaultdisplay=dvi
dieid#=69f400029ff80000015499740700b019
dvimode=1024x600MR-32@60
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
kloadaddr=0x80007fc0
loadaddr=0x80200000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}
loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz
loaduimage=ext2load mmc ${mmcdev}:2 ${kloadaddr} /boot/uImage
loaduimagefat=fatload mmc ${mmcdev} ${kloadaddr} uImage
mmcargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=${buddy} camera=${camera} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_disp=${defaultdisplay} root=${mmcroot} rootfstype=${mmcrootfstype}
mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${kloadaddr}
mmcdev=0
mmcroot=/dev/mmcblk0p2 rw
mmcrootfstype=ext3 rootwait
mpurate=auto
nandargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=${buddy} camera=${camera} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_disp=${defaultdisplay} root=${nandroot} rootfstype=${nandrootfstype}
nandboot=echo Booting from nand ...; run mmcargs; bootm ${kloadaddr}
nandroot=/dev/mtdblock4 rw
nandrootfstype=jffs2
ramargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=${buddy} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_disp=${defaultdisplay} root=${ramroot} rootfstype=${ramrootfstype}
ramboot=echo Booting from ramdisk ...; run ramargs; bootm ${kloadaddr}
ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=0x81000000,64M
ramrootfstype=ext2
rdaddr=0x81000000
silent=1
usbethaddr=de:ad:be:ef
usbtty=cdc_acm
vram=12M

Environment size: 2022/131068 bytes

*********************************************************************************************************************************************************

Thanks in advance

  • Hi Sekra,

    Sekra Invos said:
    what is the difference between loaduimage and loaduimagefat?

    Judging from the above environment, "loaduimagefat" will try to read uImage from the first, FAT partition (normally - the boot partion); while "loaduimage" will eventually try to ext2load the uImage from potential other partition on the MMC/SD card, i.e. if the uImage that you want to use is stored on the first (FAT) partition you could try to use "loaduimagefat". What are the exact u-boot commands you are running and what are the exact u-boot error prints?

    Thanks.

    BR
    Vladimir

  • Hai Vladdmir

    I saw lot of your posts.Thanks for your reply to my post.I'm glad to get your reply.

    I had 5 boards based on beagleboard xm.

    Actual boot command is => mmc rescan; run loaduimage; run mmcboot (it works fine other than that 2 boards)

    But 2 board showing this error as follows,

    OMAP_BeagleboardXM#

    OMAP_BeagleboardXM# setenv bootcmd mmcrescan; run loaduimage; run mmcboot;

    ** Bad partition 2 **
    Booting from mmc ...
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!
    Hello world

    Stops at this place.Never boot the kernel.

    Note: In my MMC card, there are 2 partitions BOOT(FAT file system),Rootfs(ext3 file system).if loaduimagefat is right then how the other 3 boards were working fine.

    I'm waiting for your reply.Thanks in advance Vladimir

  • Sekra,

    Loading uImage with "ext2load" from the rootfs, respecting the "ext2load" command restrictions, also could be possible since you have an uImage stored on the rootfs as well; of course the two uImages could differ from each other, depending on what you have flashed, so keep that in mind.

    That one board could not work for various reasons, I cannot tell from distance, maybe there is something different in this one: the partition number, the partition type, the partition could be corrupted, etc. Double check is everything how it is expected to be. You could try to compare the outputs of commands like these:

    mmc part

    mmc list

    mmc dev

    I think that it is possible to get this error: "** Bad partition 2 **", when that number:

    loaduimage=ext2load mmc ${mmcdev}:2 ${kloadaddr} /boot/uImage

    doesn't correspond correctly or that partition does not exists, or it's format is wrong, or it is corrupted, etc.

    Or it may very well be something else, again I cannot tell from distance.

    You could check whether or not the "fatload" is working.

    I hope that you will figure it out.

    Thank you.

    BR
    Vladimir