Accidentally wiped nand flash, and I am having trouble restoring u-boot.

Accidentally wiped nand flash, and I am having trouble restoring u-boot.

This question is not answered

I bumped the enter key after typing "nand erase" in u-boot, and this wipes everything clean.  I'm trying to get u-boot loaded again by following the second procedure documented at https://www.ridgerun.com/developer/wiki/index.php/RidgeRun_SDK_Technical_FAQ#No_icache_command_at_uboot.

The Leo368 boots from the SD card, and I have an active RR shell.  Unfortunately, the instructions state "Let the system boot and follow the indicated steps at the LeopardBoard console" but this never happens.  I'm just sitting at a console.  Any ideas?

All Replies
  • Since my build machine and my desktop are separate, I used socat to create a network serial port, and try the serial method.  I ran "make installbootloader PORT=/tmp/vmodem0".  It appeared to work:  http://pastebin.com/sxY8iRsn.

    However, flipping the dip switch back to nand boot  produces no u-boot console.  Can I make "make installbootloader" more verbose so I can see if there are any uncaught errors?

     

    Also, the tftp logs show that the files were transferred:

     

     

    Sep  7 10:47:11 build tftpd[27736]: tftpd: trying to get file: bootloader.davinci.LeopardBoardDM365sdkEVAL2011Q2.leopard

    Sep  7 10:47:11 build tftpd[27736]: tftpd: serving file from /home/davinci/tftpboot

    Sep  7 10:47:18 build tftpd[27777]: tftpd: trying to get file: ubl_nand.nandbin.davinci.LeopardBoardDM365sdkEVAL2011Q2.leopard

    Sep  7 10:47:18 build tftpd[27777]: tftpd: serving file from /home/davinci/tftpboot

    Sep  7 10:47:19 build tftpd[27780]: tftpd: trying to get file: bootloader.nandbin.davinci.LeopardBoardDM365sdkEVAL2011Q2.leopard

    Sep  7 10:47:19 build tftpd[27780]: tftpd: serving file from /home/davinci/tftpboot

     

  • Hi,

    "The Let the system boot and follow the indicated steps at the LeopardBoard Console" is for the installer SD, the installer SD will install:

    Bootloader

    Kernel

    File System

    If your using the correct installer SD you will see this following information at the LeopardBoard Console: http://pastebin.com/57iYM6qW

    After pressing Enter the installer SD will install kernel file system and bootloader, part of the information displayed will be: http://pastebin.com/wDUY2rn8

    And finally the steps indicated by the LeopardBoard console are: http://pastebin.com/NhnAYgfx

     

    The installer SD can be downloaded at http://www.ridgerun.com/downloadcenter.shtml there's a short registration process

    Carlos Aguero
    Embedded Software Engineer
    RidgeRun

  • Carlos,

    Clearly I have a different SD image.  I fetched mine from the link I received in the registration email.  The filename is Leo365Eval2011Q2_SD.zip and the md5 sum is 9e2f45bbb523d9296d49ccef769a30de.

    Is the appropriate SD image hosted elsewhere?

    -M

  • In the download directory, there are 3 images:

    Leo365Eval2011Q2_JFFS2.zip

    Leo365Eval2011Q2_RTSP.zip

    Leo365Eval2011Q2_SD.zip

    I think that the SD installer image is missing.

  • Hi,

    Sorry about the problem with the names, your looking for the: Leo365Eval2011Q2_JFFS2.zip

    JFFS2 because it will install a JFFS2 file system, also kernel and bootloader

    Regards

    Carlos Aguero
    Embedded Software Engineer
    RidgeRun

  • Carlos,

    I grabbed the jffs2 image, wrote it to the SD card and booted from it.  Here's what I see: http://pastebin.com/FqpcaCEV

    This fails in the same way the other methods have failed.  I noticed that the Leopardboard 365 has a Samsung flash chip and the Leopardboard 368 has a larger Micron chip.  Is it possible that the Micron MT29F2G08AA requires unlocking of flash?

  • The flash chip is not write protected -- I verified by toggling gpio59 and attempting to erase.  However, u-boot may be using the davinci_nand driver, which supports the samsung chip only.  Is there more current source available?  I don't think that the u-boot source I have matches what was originally on the board.

    The original u-boot environment says that the version was "ver=U-Boot 1.3.4-svn31 (May 25 2010 - 20:23:33)"

    Help?

  • Hi,

    About the uboot version, that shouldnt be a problem, I have used the Installer SD in the Leopard DM365 and DM368, actually I just used the Installer SD to add uboot at a DM368 with a Micron chip, this is the console:

     

    U-Boot 2010.12-rc2 (Jul 07 2011 - 16:42:20)

    Cores: ARM 297 MHz
    DDR:   243 MHz
    I2C:   ready
    DRAM:  128 MiB
    NAND:  256 MiB
    MMC:   davinci: 0, davinci: 1
    *** Warning - booting from SD, using default environment

    Net:   Ethernet PHY: GENERIC @ 0x00
    DaVinci-EMAC
    Hit any key to stop autoboot:  0
    reading uEnv.txt

    98 bytes read
    Importing environment from mmc ...
    Running Installer...
    reading installer.scr

    2325 bytes read
    ## Executing script at 82000000





      __________ .__     .___               __________
      \______   \|__|  __| _/  ____    ____ \______   \ __ __   ____
       |       _/|  | / __ |  / ___\ _/ __ \ |       _/|  |  \ /    \
       |    |   \|  |/ /_/ | / /_/  >\  ___/ |    |   \|  |  /|   |  \
       |____|_  /|__|\____ | \___  /  \___  >|____|_  /|____/ |___|  /
              \/          \//_____/       \/        \/             \/

    Embedded Linux Solutions


    SDCard Installer Script Generated by RidgeRun SDK

    Target Platform: Leopard Board DM365

      Press any key to continue...


    ====== Installing UBL...

    reading ubl_nand.nandbin

    16384 bytes read

    NAND erase: device 0 offset 0x20000, size 0x20000
    Erasing at 0x20000 -- 100% complete.
    OK

    NAND write: device 0 offset 0x20000, size 0x20000
     131072 bytes written: OK

    ====== Installing U-boot...

    reading bootloader.nandbin

    325632 bytes read

    NAND erase: device 0 offset 0x320000, size 0x60000
    Erasing at 0x360000 -- 100% complete.
    OK

    NAND write: device 0 offset 0x320000, size 0x60000
     393216 bytes written: OK

    ====== Installing Kernel...

    reading kernel.uImage

    4395232 bytes read

    NAND erase: device 0 offset 0x400000, size 0x4a0000
    Erasing at 0x880000 -- 100% complete.
    OK

    NAND write: device 0 offset 0x400000, size 0x4a0000
     4849664 bytes written: OK

    ====== Installing File System...

    reading fsimage.uImage

    35389440 bytes read

    NAND erase: device 0 offset 0x8a0000, size 0xc800000
    Skipping bad block at  0x08180000                                         
    Skipping bad block at  0x0c7a0000                                         
    Erasing at 0xd080000 -- 100% complete.
    OK

    NAND write: device 0 offset 0x8a0000, size 0x21c0000
     35389440 bytes written: OK

    ====== Installing Boot Settings...

    Saving Environment to NAND...
    Erasing Nand...
    Erasing at 0x3e0000 -- 100% complete.
    Writing to Nand... done

    ======= Installation Complete!

    You may restart your board by
      - turning off power,
      - removing the SD card,
      - setting hardware to boot from NAND, and
      - powering on the board.


    DM365 LEOPARD #

    Carlos Aguero
    Embedded Software Engineer
    RidgeRun

  • Hi Carlos, I did the nand recover with DM365_JFFS2.img and I got the same results as you but the following:

    ====== Installing File System...                                                

    reading fsimage.uImage                                                          

    35389440 bytes read                                                            

    NAND erase: Size exceeds partition or device limit                              

    NAND write: device 0 offset 0x8a0000, size 0x21c0000                            

    35389440 bytes written: OK

    then when I reboot I got this error:

    Root-NFS: No NFS server available, giving up.                                  

    VFS: Unable to mount root fs via NFS, trying floppy.                            

    List of all partitions:                                                        

    1f00            4096 mtdblock0 (driver?)                                        

    1f01            4736 mtdblock1 (driver?)                                        

    No filesystem could mount root, tried:  jffs2                                  

    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

    The flash memory is a Micron MT29F1G (1Gb)

    do you know the problem?

    many thanks in advance!