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.

AM3352: u-boot is not reading file from BOOT partition of eMMC

Part Number: AM3352


Hello,

We are verifying images of u-boot(from MLO) and zImage(from u-boot) while booting. And to achieve this we are reading signature files from MLO and u-boot.

Priorities as per boot pins are: eMMC(MMC1), MMC(MMC0)

So, when eMMC is flashed MLO always read signature file of u-boot from eMMC. But, if SD card is connected the u-boot should read signature file of zImage from SD card and if SD card is not connected, it should read from eMMC.

(The case when SD card is connected, it should read signature from SD card because zImage will also be loaded from the SD card.)

Following are my observations:

case 1(expected): eMMC is not flashed. using SD card.

If  I store signature files (signature1.bin and signarute2.bin) in BOOT partition in SD card. I am able to read file signature1.bin from MLO and file signature2.bin from u-boot.

case 2(not expected): eMMC is flased. SD card is not connected.

If I store signature file (signature1.bin and signarute2.bin) in BOOT partition in eMMC. I am able to read file signature1.bin from MLO but can not read file signature2.bin from u-boot.

error is: not able to find file signature2.bin

case 3(expected): eMMC is flased. SD card is connected and it has file signature2.bin in its BOOT partition.

I am able to read file signature1.bin from MLO and file signature2.bin from u-boot.

case 4(expected): eMMC is flashed. SD card is connected and file signature2.bin is not stored in its BOOT partition.

I am able to read filesignature1.bin from MLO but can not read file signature2.bin from u-boot.

error is: not able to find file signature2.bin

This behavior makes me understand that u-boot is always(whether I use eMMC or SD card) going to find file signature2.bin in SD card. Is it correct?

How to say u-boot to find this signature file in eMMC if SD card is not connected?

Please let me know your suggestions.

  • Perhaps you have an u-boot environment variable or MLO environment variable overriding the expected read from MMC instance. Make sure to check the mmc environment various settings.
  • Hi Marcus,

    We have already setup env variables as follows from "include/configs/am335x_evm.h":

    if SD sard present, (using mmc rescan)

    mmcdev = 0

    bootpart = ${mmcdev}:2

    else

    mmcdev = 0

    bootpart = ${mmcdev}:2

    which is working. if SD card is not connected, uboot finds zImage from eMMC. But in this case fat_read API is always trying to read signature file from SD card(mmc0). I can not find Which env variable is used by fat to read from file.

     

    Thanks.

  • Rohit,

    Are you using the Verified Boot feature of U-Boot? If so, that is not something we test or validate on our platform. That is not to say that it should not work, but the U-Boot community will probably be able to offer more help.

    If this is something else, can you please share more about these signature files and how they are associated with u-boot.img and the kernel?

    Thanks.