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.

Linux/PROCESSOR-SDK-AM335X: Custom board without EEPROM, U-Boot tries to boot from MMC1 when u-boot.img is in MMC0

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: TMDSICE3359

Tool/software: Linux

Hello,

I am trying to boot Linux from MMC0(SD Card) but spl try to boot from MMC1(eMMC) when there's nothing in eMMC.

I referenced TMDSICE3359 for the majority of my custom board and referenced BBB for eMMC.

So, if I plug in the same SD Card to ICEv2 board, it boots from MMC0.

Additionally, I followed this thread

https://e2e.ti.com/support/processors/f/791/p/548910/2047516#2047516

for writing eeprom data.

What should I do?

  • Hi,

    Please post your SYSBOOT settings and which Linux version you use.
  • I am using ti-processor-sdk-linux-am335x-evm-05.03.00.07 and inside board-support, u-boot-2018.01+gitAUTOINC+313dcd69c2-g9d984f4548 and linux-4.14.79+gitAUTOINC+e669d52447-ge669d52447.
    My SYSBOOT[4:0] is 11100b
    and full sysboot setting is 0100 0000 0001 1100.

    Thank you.
  • Hello Hyung,

    SYSBOOT[4:0] 11100b boot sequence is MMC1->MMC0->UART0->USB0, so that if the ROM bootloader tries to boot form MMC1 and hangs there, you have to make sure that the attached eMMC on MMC1 is properly formatted and there is no any gibberish bytes which can confuse the ROM bootlaoder and make it hang there.

    Best regards,
    Kemal

  • Hello,
    Thank you for quick response.

    I have used MMCSD_bbbAM335x_EMMC_armTestproject example from Processor SDK RTOS to make sure to write DATA_PATTERN_00 to eMMC since I have used this example to write SDMMC_DATA_PATTERN_RAMP32 to eMMC before.(As far as I know, this is the only way to write or read from eMMC before booting Linux)
    But still hangs.

    Also, I've tried to desolder the resistors that compose SYSBOOT[4:0] 11100b and solder it again to form SYSBOOT[4:0] 10111b which gives me MMC0 the first booting device to be searched. But still uart console prints that the board is "Trying to boot from MMC1" when the u-boot.img is in MMC0.

    Thanks.
  • Yes. This is expected. The MLO in AM335x and AM437x platforms prints "Trying to boot from MMC1" message while booting from MMC0 physical interface. The message will be "Trying to boot from MMC2" while booting from eMMC in your case.

  • Thank you.
    And I found the answer to why I thought it was hanging after this line
    *** Warning - bad CRC, using default environment.

    I've set the EEPROM data exactly the same as ICEv2 board and somehow after above line in u-boot, it was using uart3 for printing console because in arch/arm/dts/am335x-icev2.dts,

    chosen {
    stdout-path = &uart3;
    tick-timer = &timer2;
    };

    and I've changed uart3 to uart0 and I could see the u-boot console prints like I saw with ICEv2 board.

    I guess this resolved my question. Thank you.
  • Yes. There is also U-Boot environment variable which later changes the console to ttyO3 for kernel.

    init_console=if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;else setenv console ttyO0,115200n8;fi;