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.

Unable to read uEnv.txt from eMMC nand

Other Parts Discussed in Thread: AM5728

Hello,

We are trying to boot from eMMC nand flash memory on a board based on AM5728. And the SDK we are presently using is ti-processor-sdk-linux-am57xx-evm-02.00.01.07. We followed the exact steps from the link  

U-boot by default looks for root file system in mmc 0:2 which is the SD card partition. So, to change it to eMMC nand, which is mmc 1:2, i need to change the argument "finduuid". To achieve this, am including the line  "finduuid=part uuid mmc 1:2 uuid" in my uEnv.txt. But unfortunately, while booting from NAND, this file is not read at all! Am using the same MLO and u-boot.img files in the NAND which i always use to boot from SD card. Same files while booting from SD card reads uEnv.txt. I have just copy pasted these two files from SD card to eMMC NAND memory. FYI, my partition table looks like this:

/dev/mmcblk1p1 * 2048 133119 131072 64M 6 FAT16
/dev/mmcblk1p2 133120 7553023 7419904 3.6G 83 Linux

And, am able to boot from Nand by giving the following command from u-boot: setenv finduuid part uuid mmc 1:2 uuid. I just want this one line to be read from uEnv.txt.

Best regards,

Sri

  • Hi,

    Can you share your environment settings defined in include/configs/ti_armv7_common.h, the bellow part:

       #define DEFAULT_MMC_TI_ARGS \

                "mmcdev=0\0" \

                "mmcrootfstype=ext4 rootwait\0" \

                "finduuid=part uuid mmc 0:2 uuid\0" \

               "args_mmc=run finduuid;setenv bootargs console=${console} " \

               "${optargs} " \

              "root=PARTUUID=${uuid} rw " \

              "rootfstype=${mmcrootfstype}\0" \

             "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \

             "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \

            "source ${loadaddr}\0" \

             "bootenvfile=uEnv.txt\0" \

            "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \

                      "env import -t ${loadaddr} ${filesize}\0" \

            "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \

               "envboot=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 " \

                            "echo Loaded env from ${bootenvfile};" \

                            "run importbootenv;" \

                  "fi;" \

                "if test -n $uenvcmd; then " \

                       "echo Running uenvcmd ...;" \

                          "run uenvcmd;" \

                "fi;" \

            "fi;" \

    "fi;\0" \

    Also have a look at the following guide for additional info:

     processors.wiki.ti.com/.../AM335x_U-Boot_User's_Guide

    Best Regards,

    Yordan

  • #define DEFAULT_MMC_TI_ARGS \

       "mmcdev=0\0" \

       "mmcrootfstype=ext4 rootwait\0" \

       "finduuid=part uuid mmc 0:2 uuid\0" \

       "args_mmc=run finduuid;setenv bootargs console=${console} " \

           "${optargs} " \

           "root=PARTUUID=${uuid} rw " \

           "rootfstype=${mmcrootfstype}\0" \

       "loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr\0" \

       "bootscript=echo Running bootscript from mmc${mmcdev} ...; " \

           "source ${loadaddr}\0" \

       "bootenvfile=uEnv.txt\0" \

       "importbootenv=echo Importing environment from mmc${mmcdev} ...; " \

           "env import -t ${loadaddr} ${filesize}\0" \

       "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}\0" \

       "envboot=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 " \

                       "echo Loaded env from ${bootenvfile};" \

                       "run importbootenv;" \

                   "fi;" \

                   "if test -n $uenvcmd; then " \

                       "echo Running uenvcmd ...;" \

                       "run uenvcmd;" \

                   "fi;" \

               "fi;" \

           "fi;\0" \

    As of now, we have modified the above line to "finduuid=part uuid mmc 1:2 uuid"  to boot from eMMC nand. But i know that's not the correct way. I should be able to read from uEnv.txt.

     

     

    Best Regards,

    Sri

  • Any leads?


    Thanks and Regards,
    Srinidhi S.
  • Hi,

    Try changing "mmcdev=0\0" \ to "mmcdev=1\0" \ and see if u-boot is able to read uEnv.txt.

    Best Regards,
    Yordan