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.

BOOT from sd card

Other Parts Discussed in Thread: OMAP-L138, OMAPL138

Hi,

Board :LCDK (OMAP l-138)

booting the omap l138 from SD card as per WIKI:http://processors.wiki.ti.com/index.php/How_to_boot_OMAP-L138_LCDK_from_SD_card

But i got the output in minicom  like  this:(again and again)


U-Boot 2010.12 (Aug 29 2012 - 10:07:08)

I2C: ready
DRAM: 128 MiB
NAND: NAND device: Manufacturer ID: 0x01, Chip ID: 0xd3 (AMD NAND 1GiB 3,3V 8-)
NAND bus width 16 instead 8 bit
No NAND device found!!!
0 MiB
MMC: davinci: 0


U-Boot 2010.12 (Aug 29 2012 - 10:07:08)

I2C: ready
DRAM: 128 MiB
NAND: NAND device: Manufacturer ID: 0x01, Chip ID: 0xd3 (AMD NAND 1GiB 3,3V 8-)
NAND bus width 16 instead 8 bit
No NAND device found!!!
0 MiB
MMC: davinci: 0

kindly suggest me.What going wrong?

Regards,

vinothraj

  • It appears the version of uboot that you are using only has 8bit NAND flash support enabled. I would recommend you to use the uboot source from the linux sdk for LCDK which is pre-configured to support 16 bit NAND flash that is built into the LCDK platfom.

    Regards

    Rahul

  • Hi Rahul,

            Thanks for your reply.But i try to boot from the sd card.

             As per You said,i did that.But same output was displayed.

    U-Boot 2010.12 (Aug 29 2012 - 10:07:08) 

    I2C: ready 
    DRAM: 128 MiB 
    NAND: NAND device: Manufacturer ID: 0x01, Chip ID: 0xd3 (AMD NAND 1GiB 3,3V 8-)
    NAND bus width 16 instead 8 bit 
    No NAND device found!!! 
    0 MiB 
    MMC: davinci: 0 


    U-Boot 2010.12 (Aug 29 2012 - 10:07:08) 

    I2C: ready 
    DRAM: 128 MiB 
    NAND: NAND device: Manufacturer ID: 0x01, Chip ID: 0xd3 (AMD NAND 1GiB 3,3V 8-)
    NAND bus width 16 instead 8 bit 
    No NAND device found!!! 
    0 MiB 
    MMC: davinci: 0


  • Hi Rahul,

    One step i did not do yet.That is

    Setting Bootargs and Bootcmd

    Bootcmd should be set to copy and boot uImage from the first partition of the micro-SD card. The bootargs should be set to take root filesystem from the second partition of the micro-SD card.

    setenv bootargs 'mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait ip=off' setenv bootcmd 'mmc rescan 0;fatload mmc 0 0xc0700000 uImage; bootm c0700000;'

     i do not know how to do this step.where do i add this two lines.so suggest me to get success boot.

    Regards

    vinothraj

  • Hi Vinothraj,

    You input those commands in the U-boot prompt. So once you are booted into u-boot, type the following (pressing <enter> after each line):

    u-boot#setenv bootargs 'mem=32M console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait ip=off'

    u-boot#setenv bootcmd 'mmc rescan 0;fatload mmc 0 0xc0700000 uImage; bootm c0700000;'

    u-boot#saveenv

    Note that the last line saves the bootargs and bootcmd. You should receive a confirmation message that the environment was saved when you press <enter> after the 'saveenv' command.

    Thanks,

    Clinton

  • hi Clinton,

    Thank for  your response.I did not get the U-boot prompt still.

    i am  getting the  message like my last post and also it can't enter into u-boot terminal no response from uboot. 

    regards,

    vinothraj

  • Hi Vinothraj,

    Please follow the steps of reflashing the u-boot into OMAP-L138LCDK using prebuilt u-boot binaries from OMAP-L138 LCDK SDK (ti-sdk-omapl138-lcdk-01.00.00/board-support/prebuilt-images).

    http://processors.wiki.ti.com/index.php/OMAP-L138_LCDK_Linux_Software_Developer%27s_Guide#Restoring_U-Boot_on_a_bricked_LCDK

    Once the u-boot prompt appears, you can boot linux using the steps suggested by Clinton (i.e.,  boot via SD card).

     

    Regards,

    Shankari.

     

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • Hi Shankari G,

      As per your Instruction i followed the link:

    http://processors.wiki.ti.com/index.php/OMAP-L138_LCDK_Linux_Software_Developer%27s_Guide#Restoring_U-Boot_on_a_bricked_LCDK

    But My custom board (based on OMAP L 138 LCDK) has 128 MByte 8-bit wide NAND FLASH.

    C:\Users\precision.precision-PC\Desktop\OMAP-L138\GNU>sfh_OMAP-L138.exe -targett
    ype OMAPL138_LCDK -flashtype NAND -p COM20 -erase
    -----------------------------------------------------
    TI Serial Flasher Host Program for OMAP-L138
    (C) 2012, Texas Instruments, Inc.
    Ver. 1.67
    -----------------------------------------------------


    [TYPE] Global erase
    [TARGET] OMAPL138_LCDK
    [DEVICE] NAND
    [NAND Block] 1

    Attempting to connect to device COM20...
    Press any key to end this program at any time.

    (AIS Parse): Read magic word 0x41504954.
    (AIS Parse): Waiting for BOOTME... (power on or reset target now)
    (AIS Parse): BOOTME received!
    (AIS Parse): Performing Start-Word Sync...
    (AIS Parse): Performing Ping Opcode Sync...
    (AIS Parse): Processing command 0: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 14372-Byte section to address 0x80000000.
    (AIS Parse): Processing command 1: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 1324-Byte section to address 0x80003824.
    (AIS Parse): Processing command 2: 0x58535906.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Performing jump and close...
    (AIS Parse): AIS complete. Jump to address 0x80000000.
    (AIS Parse): Waiting for DONE...
    (AIS Parse): Boot completed successfully.

    Waiting for SFT on the OMAP-L138...

    Erasing flash
    100% [ ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ ]
    Erase complete


    Operation completed successfully.

    C:\Users\precision.precision-PC\Desktop\OMAP-L138\GNU>sfh_OMAP-L138.exe -targett
    ype OMAPL138_LCDK -flashtype NAND -p COM20 -flash_noubl u-boot-lcdk_ais.bin
    -----------------------------------------------------
    TI Serial Flasher Host Program for OMAP-L138
    (C) 2012, Texas Instruments, Inc.
    Ver. 1.67
    -----------------------------------------------------


    [TYPE] Single boot image
    [BOOT IMAGE] u-boot-lcdk_ais.bin
    [TARGET] OMAPL138_LCDK
    [DEVICE] NAND
    [NAND Block] 1

    Attempting to connect to device COM20...
    Press any key to end this program at any time.

    (AIS Parse): Read magic word 0x41504954.
    (AIS Parse): Waiting for BOOTME... (power on or reset target now)
    (AIS Parse): BOOTME received!
    (AIS Parse): Performing Start-Word Sync...
    (AIS Parse): Performing Ping Opcode Sync...
    (AIS Parse): Processing command 0: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 14372-Byte section to address 0x80000000.
    (AIS Parse): Processing command 1: 0x58535901.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Loading section...
    (AIS Parse): Loaded 1324-Byte section to address 0x80003824.
    (AIS Parse): Processing command 2: 0x58535906.
    (AIS Parse): Performing Opcode Sync...
    (AIS Parse): Performing jump and close...
    (AIS Parse): AIS complete. Jump to address 0x80000000.
    (AIS Parse): Waiting for DONE...
    (AIS Parse): Boot completed successfully.

    Waiting for SFT on the OMAP-L138...

    Flashing application u-boot-lcdk_ais.bin (358504 bytes)

    100% [ ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ ]
    Image data transmitted over UART.

    0% [ ------------------------------------------------------------ ]
    Programming application into flash...

    It stuck in this place. i tried the ubootais.bin for 8-bit wide NAND FLASH by setting (data width=8-bit) flash tab in AISgen for D800K008 utility.but i got same issues.

    Sometimes it stuck into this place: Waiting for SFT on the OMAP-L138..

    I tried another one 

    http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138#Modifications_for_Custom_Boards

    NAND Setting:OMAP-L138/Common/include/device_async_mem.h: Modify the #define DEVICE_ASYNC_MEM_NANDBOOT_BUSWIDTH to match the bus width(8) of my NAND 

    Simply Edited that header files and did it again,same issue is displayed.need to rebuild the flash and boot utils package?

    Or any other way..suggest any idea to boot kernel successfully.

    • Hi Vinothraj,

      If you have modified the serial flash utility source code, you will need to rebuild that utility. Navigate into the directory where the utility is installed (there will be a top level make file there) and perform the following commands:

      host $make clean

      host $make

      If the utility builds without error, the utility will then reflect the changes you have made.

      Thanks,

      Clinton

    • Hi Clinton,

      Thank Clinton.

      i modified the serial flash utility source code and rebuild that utility.Now the (8 bit bus width)NAND flash memory is Flashed Successfully.But  minicom displayed nothing.

      I set the switch mode to NAND mode.It can not boot itself.

      In my Custom board has Micron 256 Mega bite RAM.I think that problem may be in RAM.

      I need to change the DDR Configuration in this link:?

      http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138#Modifications_for_Custom_Boards

      or problem in capacity of Micron 256 Mega bite RAM(64 Mega Byte) is not enough? 

      or any other problem like it seems?

      Regards,

      Vinothraj.M

    • Hi,

      I changed  the DDR Configuration for my custom board.But i get nothing in minicom.

    • Hi,

      1: Are you using the same U-boot provided by the TI SDK with NO modifications ?

      2: What are the switch settings for NAND boot mode ? Please refer this link

         http://processors.wiki.ti.com/index.php/LCDK_User_Guide#Switches_.28SW1.29 to set it.

      3: How are you flashing the uboot ?

      Regards,

      --Prabhakar Lad

    • Hi Prabhakar Lad,

      i used same U-boot provided by the TI SDK with NO modifications but it could not flashed on the NAND flash memory.Our Board is based on  the OMAP L 138 LCDK with some changes. we are changed the NAND Flash memory (8 Bit Width) and 64 Mega Byte Micron RAM (MT47H64M16HR-25E:H).so it could not be flashed on the flash memory.so i changed NAND Setting as per below Link:

      http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility_for_OMAP-L138#Modifications_for_Custom_Boards

      U-BOOT is successfully flashed.BUT it did not boot itself and i used the switch settings for NAND  boot mode as per you said:http://processors.wiki.ti.com/index.php/LCDK_User_Guide#Switches_.28SW1.29

      and i tried boot from SD Card also.it did not show nothing.

      i made DDR configuration also and it also failed to boot

      Regards,

      vinothraj.M

    • Hi,

      what value did you set  DEVICE_ASYNC_MEM_NANDBOOT_BUSWIDTH  and where did you change it ?

      Dint you rebuild the U-boot and flash it again.

      Regards,

      --Prabhakar Lad

    • Hi,


      #if defined(OMAPL138_LCDK)
      #define DEVICE_ASYNC_MEM_NANDBOOT_BUSWIDTH (DEVICE_BUSWIDTH_8BIT)     // I changed this 
      #elif defined(C6748_LCDK)
      #define DEVICE_ASYNC_MEM_NANDBOOT_BUSWIDTH (DEVICE_BUSWIDTH_16BIT)
      #else
      #define DEVICE_ASYNC_MEM_NANDBOOT_BUSWIDTH (DEVICE_BUSWIDTH_8BIT)
      #endif

      then rebuilt it  and flashed  my 8 bit width NAND successfully.

      it did not boot itself

      Regards,

      Vinothraj.M

    • Hi,

      Can you point me to the uboot source from where you downloaded it ?

      Regards,

      --Prabhakar Lad

    • Hi,

      I downoload the linux SDK for OMAP L-138 LCDK from TI

      ti-sdk-omapl138-lcdk-01.00.00
      ├── bin                             (host utility scripts)
      ├── board-support                   (linux kernel, u-boot source packages and flashing utils)
      ├── docs                            (Linux SDK documentation, manifest and licenses)
      ├── dsp-tools                       (C674-side tools installers)
      ├── example-applications            (general Linux examples)
      ├── filesystem                      (ARMv5 root file system tarball for LCDK)
      ├── host-tools                      (additional host tools)
      ├── linux-devkit                    (linux development utilties)
      ├── Rules.make                      (top level SDK environment variable settings)
      └── setup.sh                        (top level set-up script helper utility)
      Regards,
      vinothraj.M
    • Hi,

      My board is booted Successfully.I debug U-BOOT code that where the code is restarted continuously. I find that line in the function void env_relocate() in  env_common.c (ti-sdk-omapl138-lcdk-01.00.00/board-support/u-boot-mmc/common) .so i wanted to edit that function like below:

      void env_relocate (void)
      {
      #if defined(CONFIG_NEEDS_MANUAL_RELOC)
      extern void env_reloc(void);
      env_reloc();
      #endif
      // if (gd->env_valid == 0) {
      #if defined(CONFIG_ENV_IS_NOWHERE) /* Environment not changable */
      set_default_env(NULL);
      #else
      show_boot_progress (-60);
      set_default_env("!bad CRC");
      #endif
      // } else {
      // env_relocate_spec (); 
      // }
      }

      Now  My board is booted successfully.

      But i need to know meaning of the below line:

      if (gd->env_valid == 0)

      Kindly clear my doubt.

      Regards,

      Vinothraj.M