RidgeRun UBoot 'nand erase' not erasing

RidgeRun UBoot 'nand erase' not erasing

This question is not answered

Hello,

I posted earlier about getting uboot up and running on the leopardboard using RidgeRun SDK.  I have successfully loaded uboot!  Thanks!

But, now I am attempting to launch the RidgeRun linux SDK.  I am able to communicate to the leopardboard with the 'sudo make install' and other commands.  The problem I am seeing is that the kernel is not being correctly loaded into NAND flash.  I believe the 'nand erase' is not working properly.

I am able to go to the uboot prompt and type 'nand erase KERNEL' and then dump the memory location 'md KERNEL' and the memory is not FF's...

Are there any issues with 'nand erase' ??

Here is some useful info:

Here is the output of the 'sudo make installkernel':

tliebau@baboon:~/DM355SDK738407/logs$ cat install.log
dummy_command
Unknown command 'dummy_command' - try 'help'
Leopard Board # nand info

Device 0: NAND 256MiB 3,3V 8-bit, sector size 128 KiB
Leopard Board # printenv mtdparts
mtdparts=mtdparts=nand_davinci.0:4096k(UBOOT),128k(UBOOT_ENV),3200k(KERNEL),20480k(FS)
Leopard Board # printenv kernelmd5sum
kernelmd5sum=e8f53d57c9820c154dca146232b057ce
Leopard Board # nand erase KERNEL

NAND erase: device 0 offset 0x420000, size 0x320000
Erasing at 0x720000 -- 100% complete.
OK
Leopard Board # nand write 0x82000000 KERNEL 2A0000

NAND write: device 0 offset 0x420000, size 0x2a0000
 2752512 bytes written: OK
Leopard Board # setenv kernelloadaddr 0x82000000
Leopard Board # setenv kernelsaveaddr 0x420000
Leopard Board # setenv kerneloffset 0x420000
Leopard Board # setenv ksize 0x2A0000
Leopard Board # setenv kernelmd5sum e8f53d57c9820c154dca146232b057ce
Leopard Board # saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
Leopard Board #

 

 

Leopard Board # mtdparts

device nand0 <nand_davinci.0>, # parts = 4
 #: name                        size            offset          mask_flags
 0: UBOOT               0x00400000      0x00000000      0
 1: UBOOT_ENV           0x00020000      0x00400000      0
 2: KERNEL              0x00320000      0x00420000      0
 3: FS                  0x01400000      0x00740000      0

active partition: nand0,0 - (UBOOT) 0x00400000 @ 0x00000000

defaults:
mtdids  : nand0=nand_davinci.0
mtdparts: mtdparts=nand_davinci.0:640k(UBOOT),128k(UBOOT_ENV),896k(SPLASH),3200k(KERNEL),15m(FS)
Leopard Board #

 

 

All Replies
  • Got it! :-)

    The script for 'make installkernel' does not have a 'nand unlock' command.  Debugged from uboot prompt doing all these steps...unlocked, downloaded kernel image, wrote to nand...rebooted and I see the kernel!  Now...I have to get the file system up... :-/

  • tliebau,

     

    I added

    send_uboot_cmd("nand unlock  $KERNEL_LOAD_ADDRESS $KSIZE_ALIGNED\n");  right after nand_write command in the save_kernel after  line 738,

    however it didn't work for me.

    Also tried

    # nand unlock 0x00420000 340000

    to unlock the area where kernel is written after running $make installkernel on the ubuntu.

     

    Your posts are very informative,

    and It'd be great if I'm able to load and run the SDK kernel image.

    Thanks

     

    tunca

    ps: editted to add nand unlock on the u-boot command prompt

     

  • The ridgerun blog says something about "No support for NAND flashing from uboot. Recommended boot modes are NFS and SD card."

    www.ridgerun.com/blog

    -chris