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.

U-Boot Failure on Board: DRA7xx

Other Parts Discussed in Thread: DRA752

Code hangs in u-boot after these messages

OMAP SD/MMC: 0<CR><LF>
reading u-boot.img<CR><LF>
reading u-boot.img<CR><LF>
<CR><LF>
<CR><LF>
U-Boot 2013.04 (Jun 25 2015 - 19:30:24)<CR><LF>
<CR><LF>
CPU : DRA752 ES1.1<CR><LF>
Board: DRA7xx<CR><LF>
I2C: ready<CR><LF>
DRAM: 1.5 GiB<CR><LF>
WARNING: Caches not enabled<CR><LF>
MMOMAP SD/MMC: 0, OMAP SD/MMC: 1<CR><LF>
Using default environment<CR><LF>
<CR><LF>


The same u-boot code is working fine with VAYU EVM. After debugging u-boot code i have found that after printing puts("Using default environment\n\n");

it hangs in the function

himport_r(&env_htab, (char *)default_environment, sizeof(default_environment), '\0', flags, 0, NULL).

Within the himport_r (/*hashtable.c*/) function hangs after

if (!drop_var_from_set(name, nvars, localvars))
continue;


What can be the possible reasons and soluions?

We have designed prototype board similar to the VAYU EVM. We are using the GLSDK .

Thanks & Regards,

Subbaiah.N.V

  • Hello Subbaiah,

    Could you define your board specifics in /u-boot/include/configs/dra7xx_evm.h?

    I suggest you taking a look on following patches:

    http://lists.denx.de/pipermail/u-boot/2011-March/088763.html

    u-boot.10912.n7.nabble.com/PATCH-env-don-t-add-an-empty-key-to-the-env-hashtable-td153524.html

    www.denx.de/.../UBootCrashAfterRelocation

    Setting U-Boot environment using uEnv.txt

    U-Boot environment variables can be modified using a plain text file named uEnv.txt. The scripts can be used to modify and even over-ride the various parameters like bootargs, TFTP serverip etc. If a command named uenvcmd is defined in the file it will be executed. uEnv.txt can be loaded from SD card and tftp server.

    Example text file named uEnv.txt

    IMPORTANT

    *The uEnv.txt file should be in unix format. Also make sure that there is an empty line at the end of the file.
    See what contains your uenv.txt

    mmcargs=setenv bootargs 'console=ttyO0,115200n8 elevator=noop root=/dev/mmcblk1p2 rw rootwait earlyprintk fixrtc omapdrm.num_crtc=2 consoleblank=0 cma=64M rootfstype=ext4'
    fdtfile=dra7-evm-lcd10.dtb

    Best regards,

    Yanko

  • Hello Subbaiah,

    Could you explain what is eMMC device used on your board?

    I would point you:

    eMMC functionality is supported fully by MMC2 only. The other MMC modules are capable of eMMC functionality, but are not timing-optimized for eMMC. For more information about timing limitations, see the data manual of the device

    In your previous post you have:

    Code hangs in u-boot after these messages

    OMAP SD/MMC: 0<CR><LF>

    reading u-boot.img<CR><LF>

    reading u-boot.img<CR><LF>

    <CR><LF>

    <CR><LF>

    U-Boot 2013.04 (Jun 25 2015 - 19:30:24)<CR><LF>

    <CR><LF>

    CPU : DRA752 ES1.1<CR><LF>

    Take a look on threads:

    http://lists.denx.de/pipermail/u-boot/2013-December/168522.html

    lists.denx.de/.../168522.html

    Best regards,

    Yanko

  • Hi Yanko,

    I am using the same dra7xx_evm.h in the SDK, not changed anything. I am using MMC3 for eMMC.


    Thanks & Regards,
    Subbaiah.N.V
  • Hello Subbaiah,

    Could you take a look on a post, which already discussed your issue with MMC3 - e2e.ti.com/.../1261478

    e2e.ti.com/.../1125985

    Best regards,
    Yanko
  • Hello Yanko,

    Thanks for quick response, MMC3 i am using for eMMC, that i will test later with the help of above posts.
    But now i am using SD Card for booting, which is on MMC1, facing problems in u-boot stage.
    Please look at this issue, it is very important now for our board testing

    Patch :

    u-boot.10912.n7.nabble.com/PATCH-env-don-t-add-an-empty-key-to-the-env-hashtable-td153524.html
     In the above patch
     #define CONFIG_EXTRA_ENV_SETTINGS \
                    "key" "\0" "=value" "\0"
    had an error so the U-Boot will enter in an infinite loop.

    But in my case ,  no such value in the CONFIG_EXTRA_ENV_SETTINGS macro, but still u-boot hangs here, and the same u-boot code is working fine with VAYU EVM
    please look at the macro

    CONFIG_EXTRA_ENV_SETTINGS="loadaddr=0x82000000\0console=ttyO2,115200n8\0fdt_high=0xffffffff\0fdtaddr=0x80f80000\0bootpart=0:2\0bootdir=/boot\0bootfile=zImage\0usbtty=cdc_acm\0vram=16M\0partitions=" PARTS_DEFAULT "\0optargs=\0mmcdev=0\0mmcroot=/dev/mmcblk0p2 rw\0mmcrootfstype=ext4 rootwait\0mmcargs=setenv bootargs console=${console} ${optargs} vram=${vram} root=${mmcroot} rootfstype=${mmcrootfstype}\0loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}\0loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}\0loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript; else if run loadbootenv; then run importbootenv; fi;if test -n ${uenvcmd}; then echo Running uenvcmd ...;run uenvcmd;fi;fi;if run loadimage; then run loadfdt; run mmcargs; bootz ${loadaddr} - ${fdtaddr};fi; fi;\0findfdt=if test $board_name = omap5_uevm; then setenv fdtfile omap5-uevm.dtb; fi;\0 loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0"

    Note: We have mentioned in earlier post file name and function name exactly where the U-Boot execution stops. It will be helpful if you give solution specific to that point.


    Thanks & Regards,
    Subbaiah.N.V

  • Hello Yanko,

    Thanks for quick response, MMC3 i am using for eMMC, that i will test later with the help of above posts.
    But now i am using SD Card for booting, which is on MMC1, facing problems in u-boot stage.
    Please look at this issue, it is very important now for our board testing

    Patch :

    u-boot.10912.n7.nabble.com/PATCH-env-don-t-add-an-empty-key-to-the-env-hashtable-td153524.html
    In the above patch
    #define CONFIG_EXTRA_ENV_SETTINGS \
    "key" "\0" "=value" "\0"
    had an error so the U-Boot will enter in an infinite loop.

    But in my case , no such value in the CONFIG_EXTRA_ENV_SETTINGS macro, but still u-boot hangs here, and the same u-boot code is working fine with VAYU EVM
    please look at the macro

    CONFIG_EXTRA_ENV_SETTINGS="loadaddr=0x82000000\0console=ttyO2,115200n8\0fdt_high=0xffffffff\0fdtaddr=0x80f80000\0bootpart=0:2\0bootdir=/boot\0bootfile=zImage\0usbtty=cdc_acm\0vram=16M\0partitions=" PARTS_DEFAULT "\0optargs=\0mmcdev=0\0mmcroot=/dev/mmcblk0p2 rw\0mmcrootfstype=ext4 rootwait\0mmcargs=setenv bootargs console=${console} ${optargs} vram=${vram} root=${mmcroot} rootfstype=${mmcrootfstype}\0loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}\0loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}\0loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript; else if run loadbootenv; then run importbootenv; fi;if test -n ${uenvcmd}; then echo Running uenvcmd ...;run uenvcmd;fi;fi;if run loadimage; then run loadfdt; run mmcargs; bootz ${loadaddr} - ${fdtaddr};fi; fi;\0findfdt=if test $board_name = omap5_uevm; then setenv fdtfile omap5-uevm.dtb; fi;\0 loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile};\0"

    Note: We have mentioned in earlier post file name and function name exactly where the U-Boot execution stops. It will be helpful if you give solution specific to that point.


    Thanks & Regards,
    Subbaiah.N.V
  • Hello Subbaiah,

    It seems that your board has differences to DRA7xx. Hence you must apply your board configurations in /u-boot/include/configs/dra7xx_evm.h

    Let's starts with:

    /* MMC ENV related defines */
    #ifdef CONFIG_ENV_IS_IN_MMC
    #define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */

    You can see the patch - patchwork.ozlabs.org/.../311987

    Best regards,
    Yanko