DRA76P: QSPI 2 Stage bootloader not working

Part Number: DRA76P

Hi All,

We are using PROCESSOR_SDK_VISION_03_07_00_00  in our custom board. Our HW is meant for 2 stage QSPI boot. In this process the device is supposed to take MLO and uboot from QSPI device and

it should take the file system from eMMC.

After booting from SD card I have flashed  uboot and MLO in the QSPI. Also I have flashed eMMC with the follwing command:

fdisk /dev/mmcblk1

o // for starting a new partition

p // to list the current partitions

n // to create new partitions

Enter p for primary

Enter

+3000M // to get 3 GB eMMC block

w // To write the changes to eMMC. After this the fdisk prompt is exited

umount /dev/mmcblk1p1

mkfs.ext4 /dev/mmcblk1p1

reboot

Now place and extract the filesystem placed in SD card /var/ti_sdk.tar.xz to /run/media/mmcblk1p1
cp /var/ti_sdk.tar.xz /run/media/mmcblk1p1
tar xvf ti_sdk.tar.xz

But with this my board gets stuck in uboot when I remove the SD card.

Can anyone please tell me which step I have missed ?

Thanks,

Deepika

  • Hi All,

    Any updates ?

    Thanks

    Deepika

  • Hi All,

    Can anyone provide me some information on how to proceed for 2 stage boot using QSPI

    Thanks,

    Deepika

  • Hi,

    Can you confirm again that you were able to boot from MLO and u-boot from QSPI?

    However, the issue is that u-boot is still trying to boot kernel from SD card, instead of eMMC.

    Is my understanding correct?

    Did you change env in u-boot to boot from eMMC instead of SD card?

    Regards,

    Stanley

  • Hi Stanley,

    I am able to boot from QSPI till uboot,

    The uboot is actually trying to get kernel image from eMMC which I can see from the logs.

    Can you please provide me the script or steps to partition the eMMC. 

    Can you please tell me how to change the environment in uboot?

    If we are using uenv.txt to change the environment, how to flash that environment  .

    U-Boot SPL 2016.05 (Mar 24 2021 - 09:57:33)
    DRA762-GP ES1.0


    U-Boot 2016.05 (Mar 24 2021 - 09:57:33 +0530)

    CPU : DRA762-GP ES1.0
    Model: TI DRA762 EVM
    Board: DRA76x EVM REV Ȃ�^ガi�?p��DRAM: 512 MiB
    MMC: mmc@4809c000: fail to find sdr104 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr104
    mmc@4809c000: fail to find ddr50 mode FDT_ERR_NOTFOUND
    no pinctrl for ddr50
    mmc@4809c000: fail to find sdr50 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr50
    mmc@4809c000: fail to find sdr25 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr25
    mmc@4809c000: fail to find sdr12 mode FDT_ERR_NOTFOUND
    no pinctrl for sdr12
    OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Card did not respond to voltage select!
    *** Warning - MMC init failed, using default environment

    Card did not respond to voltage select!
    ERROR: invalid mmc device

    at arch/arm/cpu/armv7/omap-common/utils.c:193/mmc_get_part_size()
    Warning: fastboot.userdata_size: unable to calc
    SCSI: SATA link 0 timeout.
    AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
    flags: 64bit ncq stag pm led clo only pmp pio slum part ccc apst
    scanning bus for devices...
    Found 0 device(s).
    Net: Net Initialization Skipped
    No ethernet found.
    Hit any key to stop autoboot: 0
    ## Error: "board_findfdt" not defined
    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    ** Bad device mmc 1 **
    Card did not respond to voltage select!
    ** Bad device mmc 1 **
    Card did not respond to voltage select!
    ** Bad device mmc 1 **
    Card did not respond to voltage select!
    ** Bad device mmc 1 **
    mmc - MMC sub system

    Usage:
    mmc info - display info of the current MMC device
    mmc read addr blk# cnt
    mmc write addr blk# cnt
    mmc erase blk# cnt
    mmc rescan
    mmc part - lists available partition on current mmc device
    mmc dev [dev] [part] - show or set current mmc device [partition]
    mmc list - lists available devices
    mmc hwpartition [args...] - does hardware partitioning
    arguments (sizes in 512-byte blocks):
    [user [enh start cnt] [wrrel {on|off}]] - sets user data area attributes
    [gp1|gp2|gp3|gp4 cnt [enh] [wrrel {on|off}]] - general purpose partition
    [check|set|complete] - mode, complete set partitioning completed
    WARNING: Partitioning is a write-once setting once it is set to complete.
    Power cycling is required to initialize partitions after set to complete.
    mmc bootbus dev boot_bus_width reset_boot_bus_width boot_mode
    - Set the BOOT_BUS_WIDTH field of the specified device
    mmc bootpart-resize <dev> <boot part size MB> <RPMB part size MB>
    - Change sizes of boot and RPMB partitions of specified device
    mmc partconf dev boot_ack boot_partition partition_access
    - Change the bits of the PARTITION_CONFIG field of the specified device
    mmc rst-function dev value
    - Change the RST_n_FUNCTION field of the specified device
    WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.
    mmc setdsr <value> - set DSR register value

    mmc - MMC sub system

    Usage:
    mmc info - display info of the current MMC device
    mmc read addr blk# cnt
    mmc write addr blk# cnt
    mmc erase blk# cnt
    mmc rescan
    mmc part - lists available partition on current mmc device
    mmc dev [dev] [part] - show or set current mmc device [partition]
    mmc list - lists available devices
    mmc hwpartition [args...] - does hardware partitioning
    arguments (sizes in 512-byte blocks):
    [user [enh start cnt] [wrrel {on|off}]] - sets user data area attributes
    [gp1|gp2|gp3|gp4 cnt [enh] [wrrel {on|off}]] - general purpose partition
    [check|set|complete] - mode, complete set partitioning completed
    WARNING: Partitioning is a write-once setting once it is set to complete.
    Power cycling is required to initialize partitions after set to complete.
    mmc bootbus dev boot_bus_width reset_boot_bus_width boot_mode
    - Set the BOOT_BUS_WIDTH field of the specified device
    mmc bootpart-resize <dev> <boot part size MB> <RPMB part size MB>
    - Change sizes of boot and RPMB partitions of specified device
    mmc partconf dev boot_ack boot_partition partition_access
    - Change the bits of the PARTITION_CONFIG field of the specified device
    mmc rst-function dev value
    - Change the RST_n_FUNCTION field of the specified device
    WARNING: This is a write-once field and 0 / 1 / 2 are the only valid values.
    mmc setdsr <value> - set DSR register value

    Booting from eMMC ...
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!

    Regards,

    Deepika

  • Stanley any inputs from your side?

    Thanks,

    Deepika

  • Hi Deepika,

    Is the SD Boot working? I mean U-boot+MLO booted from QSPI & if you have
    all the rootfs in SD card is it working?

    Bootargs:

    setenv bootargs console=ttyO0,115200n8 root=/dev/mmcblk1p2 init=/sbin/init rootwait earlyprintk
    setenv bootcmd 'mmc dev 0; fatload mmc 0 0x82000000 zImage; fatload mmc 0 0x81000000 dra76-evm.dtb; bootz 82000000 - 81000000'
    boot

    Can you try the above from u-boot command prompt?

    - Keerthy

  • Hi Keerthy,

    Is the SD Boot working? I mean U-boot+MLO booted from QSPI & if you have
    all the rootfs in SD card is it working?

    Yes Keerthy, This is working.

    I will try this and let you know in sometime.

    My eMMC is not getting detected in uboot .But after loading kernel and filesystem from SD card we can see eMMC partitions

    With QSPI 2 stage boot, we need to copy the rest of the image(uImage and DTB in partition 1 of eMMC and rootfs of partition 2 of eMMC) in the eMMC. Can you also tell me how to partition eMMC in 2 partitions. mkfs.vfat binary is not available in the rootfs.

    Thanks

    Deepika

  • Hi Deepika,

    Thanks so booting Linux from SD is no issue. The above bootargs were for SD boot.

    Can you see that rootfs is present in eMMC after you boot to Linux using SD card? Does it
    have the uImage & dtb files in boot folder?

    If yes then you need to note down that partition something like /dev/mmcblk* & use it in the bootargs for root=/dev/mmcblk1p2:

    setenv bootargs console=ttyO0,115200n8 root=/dev/mmcblk1p2 init=/sbin/init rootwait earlyprintk
    setenv bootcmd 'mmc dev 0; fatload mmc 0 0x82000000 umage; fatload mmc 0 0x81000000 dra76-evm.dtb; bootm 82000000 - 81000000'
    boot

    eMMC partitioning: https://software-dl.ti.com/processor-sdk-linux/esd/docs/06_03_00_106/linux/Foundational_Components_U-Boot.html#sd-emmc-or-usb-storage

    Best Regards,
    Keerthy

  • Hi Keerthy,

    Please find the result of the bootcmd set from uboot, when booting from QSPI. Right now SD card is removed 


    Booting from eMMC ...
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!
    => setenv bootargs console=ttyO0,115200n8 root=/dev/mmcblk1p2 init=/sbin/init rootwait earlyprintk
    => setenv bootcmd 'mmc dev 0; fatload mmc 0 0x82000000 zImage; fatload mmc 0 0x81000000 dra76-evm.dtb; bootz 82000000 - 81000000'
    => boot
    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Bad Linux ARM zImage magic!
    =>

    Regards,

    Deepika

  • Hi Keerthy,

    With SD card removed, We are not able to detect eMMC in uboot.

    I am getting the following error:

    Inside vmmc_pbias_config
    Card did not respond to voltage select!
    Inside vmmc_pbias_config
    Card did not respond to voltage select!

    Regards,

    Deepika

  • Keerthy,

    any suggestions from your side?

    Thanks,

    Deepika