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.

DM8148 SD card boot mode issue

Other Parts Discussed in Thread: CCSTUDIO

Hello,

I have a customize board based on DM8148.

I am providing sd card boot mode for bare board nand flashing using boot.scr script.

Currently I am facing one issue that

I have prepared boot-able sd card using ./mksd-ti81xx.sh script and copied uboot, uImage, ubifs and boot.scr(which contains image flashing command).

Now when I connect sd card on board, at second stage it is not showing ubifs.

please find following log

TI8148_EVM#
TI8148_EVM#fatls mmc 0
    85256   mlo
   197880   u-boot.bin
     1271   boot.scr
   109676   uboot_min_nand
   198048   nand_uboot.bin
  2794396   uimage
Invalid FAT entry
 -2140142848   ðåðå
 -473956321   `pxv4
 -450953124   80å.
 -444588032
                @â.
                   Ð@
 -509550580   .

 -443686908   ð á.äÐ
ðiá.à  0087   ?ã
 -352321141  .h

14 file(s), 0 dir(s)

TI8148_EVM#
TI8148_EVM#
TI8148_EVM#

because of this I am not able to flash ubifs on nand.

Please help on this.

  • Vaibhav,

    Are you using EZSDK 5.05.02.00?

    Vaibhav Dhingani said:
    I have prepared boot-able sd card using ./mksd-ti81xx.sh script

    Actually, the script is mksdboot.sh, see the EZSDK user guide:

    ti-ezsdk_dm814x-evm_5_05_02_00/docs/DM814x_EZ_Software_Developers_Guide.pdf

    6.6 How to create an SD card

    host $ sudo ${EZSDK}/bin/mksdboot.sh --device /dev/sdb --sdk ${EZSDK}


    Best Regards,
    Pavel

  • Hello Pavel,

    I am using DVR RDK4.1.

  • Vaibhav,

    Is it possible that your SD card get corrupted, can you try with other SD card?

    Meanwhile I will notify our DVR RDK expert for help.

    Regards,
    Pavel

  • Hello Pavel,

    I have done with the last issue. But now I am seeing one more here as follow.

    I have selected sd card boot mode on TI8148 evm.

    On sd card I have

    1] mlo,

    2] uboot_sd.bin,

    3] uboot_mini_nand

    4] uboot_nand.bin

    5] uImage

    6] ubifs

    7] boot.scr

    boot.scr do the following.

    1] Flash uboot_mini_nand

    2] Flash uboot_nand.bin

    3] Flash uImage

    4] Flash ubifs

    5] Set bootargs, bootcmd and save it.

    Upto this works fine.

    But now when I set nand boot mode on TI8148 evm.

    1] First stage booting completes with last flashed uboot_nand_mini

    2] Second stage booting completes with last flashed uboot_nand.bin

    But now it is not getting bootargs & bootcmd that I have saved in last sd card boot mode via boot.scr script.

    Here why last saved bootarg & bootcmd got vanished??

    What I have to do now??

  • Hi Vaibhav,

    Vaibhav Dhingani said:
    But now it is not getting bootargs & bootcmd that I have saved in last sd card boot mode via boot.scr script.

    I suspect that your bootargs and bootcmd are saved in the MMC/SD card, not in NAND.

    See the below wiki page:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_UBOOT_User_Guide#Building_U-Boot

    U-Boot supports saving environment variables to NAND, SPI, NOR or MMC. The media to be used for saving the ENV variables needs to be decided before building U-Boot. The environment variables will be saved in the media for which the second stage u-boot is built.

    Regards,
    Pavel

  • Thanks Pawel,

    So is there any way to save bootargs & bootcmd to nand, when I have selected SdCard boot mode??

  • Vaibhav,

    1. You can try building the 2nd stage boot-loader (u-boot.bin) for NAND (not for MMC/SD) and still use it for SD boot

    2. Otherwise you should set the bootargs & bootcmd to NAND, only when boot the 2nd stage boot-loader (u-boot.bin) from NAND (not from MMC/SD)

    Regards,
    Pavel

  • Hello Pavel,

    I have done sd card boot mode with DM8148 evm. It works for me.

    Now,

    We have a customize board of DM8148 and on that I have set following boot sequence.
    "NAND-> NANDI2C->MMC->UART"


    On this board nand is erased and I have prepared sd card with MLO.

    SD Card is "8GB microSDHC UHS-1 Class10".


    But our customize board go to UART mode only.

    It not detecting SD card( or MLO), sd card interface is working fine, we have tested it.

    Please help on this, why this is happening??

    When I set boot switch setting for SD card then what will be the booting sequence set on DM8148 EVM?

    Is there any way to set only SDCard boot mode on DM8148 SOC??
     

  • Vaibhav,

    You should first try with the MMC/SD boot as 1st option. The boot order depends on the sysboot pins (btmode[4:0]), see the DM814x TRM, chapter 4 ROM Code

    4.5 Booting

    On the DM8148 EVM, the boot from MMC/SD card you should set the BOOT MODE SEL pins as:

    This correspond to BTMODE[4:0] = 10111:

    BTMODE4 = 1, BTMODE3 = 0, BTMODE2 = 1, BTMODE1 = 1, BTMODE0 = 1

    On a DM814x custom board, this corresponds to physical pins V26/PINCNTL93, W27/PINCNTL92, V27/PINCNTL91, Y28/PINCNTL90 and U26/PINCNTL89

    From the Table 4-8. BTMode[4-0] Configuration Pins, BTMODE[4:0] = 10111 corresponds to boot order:

    MMC/SD -> SPI -> UART -> EMAC

    Also, are you using MMC1/SD1 instance of the MMC/SD controller for booting the custom board? The DM814x ROM Code support booting only from MMC1

    Regards,
    Pavel

  • Thanks Pavel,

    What will be maximum size supported for MLO(u-boot.min.sd)??

  • Vaibhav,

    The pre-built MLO/u-boot.min.sd is 67.2KB. The max size that MLO/u-boot.min.sd is less than 110KB.

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_UBOOT_User_Guide#Two_stage_U-Boot_design

    The size of the internal RAM in TI814X is 128KB out of which 18KB at the end is used by the ROM code. This placed a limit of 110KB on the size of the U-Boot binary which the ROM code can transfer to the internal RAM.

    U-Boot also requires some space for the stack, heap and global data during executing and this region currently needs to be setup before the TEXT_BASE of U-Boot.

    Since it is not possible to squeeze in all the functionality that is normally expected from U-Boot in < 110KB (after setting aside some space for stack, heap etc) a two stage approach has been adopted.

    Regards,
    Pavel

  • Thanks Pavel,

    Yes, we are using MMC1/SD1 instance of the MMC/SD controller for booting the custom board.

    Our MLO size is higher than 110kb, but I have also tried with default MLO of EVM. But still our board is not able to load MLO.

    What will be maximum supported size of MicroSD Card??

  • Vaibhav,

    I am not sure what is the max size, but we have 8GB support at least:

    6.6 How to create an SD card

    This section explains the procedure required for creating SD card image for DM814x and the steps has been
    verified on 2GB, 4GB and 8GB SD cards.

    If your SD card works for the DM814x EVM, then it should be fine.

    Regards,
    Pavel

  • Pavel.

    On EVM, I have tested with Mini SdCard that come with evm only and it is of 8GB.

    On my Customize board, I have micro sd card slot. On that I am testing with 8GB Micro SdCard slot.

    Once I flash the board using UART boot mode than on uboot terminal I am getting mmc 0, but sd boot is not working.

    So, Is there any specific change we have to make on hardware for sd card booting (other then boot mode setting)??

  • Vaibhav,

    Vaibhav Dhingani said:
    Once I flash the board using UART boot mode than on uboot terminal I am getting mmc 0, but sd boot is not working.

    So, on your custom board, you can load the 1st stage bootloader (u-boot.min.uart) from the UART successful, and the same 1st stage bootloader (u-boot.min.sd/MLO) can not be load from the SD1, is that correct?

    If yes, then the problem is in the MMC/SD HW design or software implementation. For HW design, please refer to the EVM schematics and diagnostic SW (sdmmc_card). For the SW implementation, refer to the MMC.rtf file:

    4336.MMC.rtf

    Also the below wiki page might be in help:

    http://processors.wiki.ti.com/index.php/TI81xx_PSP_Porting_Guide#MMC.2FSD_Driver

    Also, you can try with other bootable MMC/SD card.

    Regards,
    Pavel

  • Vaibhav Dhingani said:
    On my Customize board, I have micro sd card slot.

    On my DM8148 EVM, I am using Micro SDHC card, ADATA, 4GB (plugged into ADATA Micro SD adapter).

    Regards,
    Pavel

  • Pavel,

    Yes, I am able to load 1st stage bootloader (u-boot.min.uart) from the UART successfully, but same 1st stage bootloader (u-boot.min.sd/MLO) is not loading.

     

    I have made the same boot configuration as the TI DM8148 EVM has on our customize hardware. BTMODE[4:0] = 10111: MMC/SD -> SPI -> UART -> EMAC.

     

    In this case when I insert sd card, our customize board gives nothing (We can say that it stops at mmc boot but is not able to load MLO). When I remove sd card, it shifted to UART(I am getting "CCCCCC").

     

    I have also tested with other sd card(of 512MB) as well.



    Is there any specific changes we have to make for MLO loading for our customize hardware?

     

  • Vaibhav,

    I suspect this is hardware problem of the MMC/SD slot of your custom board.

    Other thing you can try is to attach JTAG and see (in CCStudio) at which stage exactly the ROM Code hangs.

    Regards,
    Pavel