DRA76XP: Issue with booting from sd card

Hi ,

Currently we have an issue with booting from sd card which has a boot and rootfs folder with linux image in it, we have made the pin configuration exactly as in the image given in the quick start guide attached here DRA7xx_EVM_Quick_Start_Guide.pdf and the uboot configuration as below

arch=arm
args_fit=setenv bootargs console=${console}
args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
baudrate=115200
board=dra7xx
board_name=dra76x
board_rev=A.2
boot_fdt=try
boot_fit=0
boot_os=0
bootargs=androidboot.serialno=${serial#}
bootcmd=if test ${dofastboot} -eq 1; then echo Boot fastboot requested, resetting dofastboot ...;setenv dofastboot 0; saveenv;echo Booting into fastboot ...; fastboot  
bootdelay=2
bootdir=/boot
bootenvfile=uEnv.txt
bootfile=zImage
bootm_size=0x10000000
bootpart=0:2
bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
console=ttyO0,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;sp1
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl-os-args.raw raw 0x1501
dfu_alt_info_qspi=MLO raw 0x0 0x040000;u-boot.img raw 0x040000 0x0100000;u-boot-spl-os raw 0x140000 0x080000;u-boot-env raw 0x1C0000 0x010000;u-boot-env.backup raw 0x10
dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
dfu_bufsiz=0x10000
dofastboot=0
emmc_android_boot=setenv eval_bootargs setenv bootargs $bootargs; run eval_bootargs; setenv mmcdev 1; setenv fdt_part 3; setenv boot_part 9; if test $reboot_image = re;
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 Load;
ethaddr=74:e1:82:b4:fe:ac
fastboot.board_rev=A.2
fastboot.cpu=DRA762
fastboot.secure=GP
fastboot.userdata_size=6197855 KB
fdt_addr_r=0x88000000
fdtaddr=0x88000000
fdtcontroladdr=fdf0af18
fdtfile=dra72-evm-lcd-lg.dtb
findfdt=if test $board_name = omap5_uevm; then setenv fdtfile omap5-uevm.dtb; fi; if test $board_name = dra7xx; then setenv fdtfile dra7-evm.dtb; fi;if test $board_nam
finduuid=part uuid mmc ${bootpart} uuid
fit_bootfile=fitImage.itb
fit_loadaddr=0x88000000
importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
kernel_addr_r=0x82000000
loadaddr=0x82000000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr
loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadfit=run args_fit; bootm ${loadaddr}#${fdtfile};
loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
mmcboot=if mmc dev ${mmcdev}; then setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then run loadfdt; echo Booting from ;
mmcdev=0
mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; ;
mmcrootfstype=ext4 rootwait
netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
netloadfdt=tftp ${fdtaddr} ${fdtfile}
netloadimage=tftp ${loadaddr} ${bootfile}
nfsopts=nolock
partitions=uuid_disk=${uuid_gpt_disk};name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};name=bootloader,size=2304K,uuid=${uuid_gpt_bootloader};name=environmen}
partitions_android=uuid_disk=${uuid_gpt_disk};name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};name=bootloader,size=2304K,uuid=${uuid_gpt_bootloader};name=en}
pxefile_addr_r=0x80100000
ramdisk_addr_r=0x88080000
rdaddr=0x88080000
reboot_image=boot
rootpath=/export/rootfs
scriptaddr=0x80000000
scsidevs=0
serial#=0900f0117a3c00a0
soc=omap5
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial@4806a000
stdin=serial@4806a000
stdout=serial@4806a000
update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
usbtty=cdc_acm
uuid_gpt_boot=cf2eecfa-4485-41e2-b19d-757e796da607
uuid_gpt_bootloader=77877125-add0-4374-9e60-02cb591c9737
uuid_gpt_cache=b6c45ead-9f2d-4485-9417-fe3bd1c9b1b3
uuid_gpt_crypto=3d5088db-a534-413e-836d-c757cb682814
uuid_gpt_disk=00042021-0408-4601-9dcc-a8c51255994f
uuid_gpt_dsp1=369a6c6d-19e9-4d26-a9ee-bd00379686c7
uuid_gpt_dsp2=0e8cb960-adbe-43b0-9cc6-5bd4e026d14a
uuid_gpt_efs=02a90af2-5d1c-4a29-9177-97a513e3cae4
uuid_gpt_environment=b4b84b8a-04e3-48ae-8536-aff5c9c495b1
uuid_gpt_ipu1=180bebcc-cb39-47d5-9db7-03b405fa77d4
uuid_gpt_ipu2=2b1a98d4-7804-4e54-9607-7fd3c651068d
uuid_gpt_misc=35219908-c613-4b08-9322-3391ff571e19
uuid_gpt_recovery=03332b01-ac34-4d28-99b4-34e03a2335f4
uuid_gpt_reserved=8e123a33-e3d3-4db9-92f4-d3ebd9b3224f
uuid_gpt_system=78093af1-b5b1-4e1a-8821-39438e24b627
uuid_gpt_userdata=7bfe05ed-d33c-41cc-adaf-be8e55b00591
uuid_gpt_vendor=04eb10b7-b945-4ae9-8d0b-21458d596f54
uuid_gpt_xloader=8ef917d1-2c6f-4bd0-a5b2-331a19f91cb2
vendor=ti
ver=U-Boot 2016.05-00001-g5ddd5a8a (Apr 10 2018 - 20:40:15 -0500)
vram=16M

1) Kindly to set the configuration in uboot  which will help me to boot from the sd card. And the procedure to use it.

2) Can you provide any predefine uboot configuration file that we can load to get the linux image in the sd card up and running.

Kindly support ASAP.

Thanks

sagar

  • Sagar,

    Which SDK are you using?
    Is it a custom board or a TI EVM?

    Also do you get any traces? Can you share the logs where it fails?

    - Keerthy

  • we are using TI EVM. Could you please provide any ready made uboot configuration ,which we need to use for booting from sdcard or could you please check if some thing is set wrong.

    For me it was directly going back to uboot prompt after autoboot time out , instead of booting. Below are the logs which our uboot configuration on boot up.

    U-Boot SPL 2016.05-g333293e877 (Dec 28 2017 - 05:17:21)
    DRA762-GP ES1.0
    no pinctrl for hs200_1_8v
    no pinctrl for ddr_1_8v
    Trying to boot from MMC1
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img


    U-Boot 2016.05-g333293e877 (Dec 28 2017 - 05:17:21 +0530)

    CPU  : DRA762-GP ES1.0
    Model: TI DRA762 EVM
    Board: DRA76x EVM REV A.2
    DRAM:  4 GiB
    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
    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:   eth0: ethernet@48484000
    Hit any key to stop autoboot:  0
    Failed to mount ext2 filesystem...
    ** Unrecognized filesystem type **
    Failed to mount ext2 filesystem...
    ** Unrecognized filesystem type **
    Wrong Image Format for bootm command
    ERROR: can't get kernel image!

    And printenv gives the following results and we have bootable sd card with boot and rootfs in the sd card slot also

    =>
    =>
    =>
    =>
    =>
    =>
    =>
    => printenv
    arch=arm
    args_fit=setenv bootargs console=${console}
    args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
    baudrate=115200
    board=dra7xx
    board_name=dra76x
    board_rev=A.2
    boot_fdt=try
    boot_fit=0
    boot_os=0
    bootargs=console=ttyO0,115200n8 root=PARTUUID=000476ec-02 rw rootfstype=ext4 rootwait
    bootcmd=ext4load mmc 0:1 ${kernel_addr_r} /boot/uImage; ext4load mmc 0:1 ${fdt_addr_r} /boot/dra76-evm-fpd-auo-g101evn01.0.dtb; bootm ${kernel_addr_r} - ${fdt_addr_r}
    bootdelay=2
    bootdir=/boot
    bootenvfile=uEnv.txt
    bootfile=zImage
    bootm_size=0x10000000
    bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
    console=ttyO0,115200n8
    cpu=armv7
    dfu_alt_info=$(dfu_alt_info_mmc)
    dfu_alt_info_emmc=rawemmc raw 0 3751936;boot part 1 1;rootfs part 1 2;MLO fat 1 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;sp1
    dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x100;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl-os-args.raw raw 0x1501
    dfu_alt_info_qspi=MLO raw 0x0 0x040000;u-boot.img raw 0x040000 0x0100000;u-boot-spl-os raw 0x140000 0x080000;u-boot-env raw 0x1C0000 0x010000;u-boot-env.backup raw 0x10
    dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
    dfu_bufsiz=0x10000
    dofastboot=0
    emmc_android_boot=setenv eval_bootargs setenv bootargs $bootargs; run eval_bootargs; setenv mmcdev 1; setenv fdt_part 3; setenv boot_part 9; if test $reboot_image = re;
    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 Load;
    ethaddr=74:e1:82:b4:fe:ac
    fastboot.board_rev=A.2
    fastboot.cpu=DRA762
    fastboot.secure=GP
    fastboot.userdata_size=6197855 KB
    fdt_addr_r=0x88000000
    fdtaddr=0x88000000
    fdtcontroladdr=fdf0bf18
    fdtfile=dra72-evm-lcd-lg.dtb
    findfdt=if test $board_name = omap5_uevm; then setenv fdtfile omap5-uevm.dtb; fi; if test $board_name = dra7xx; then setenv fdtfile dra7-evm.dtb; fi;if test $board_nam
    finduuid=part uuid mmc ${bootpart} uuid
    fit_bootfile=fitImage.itb
    fit_loadaddr=0x88000000
    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
    kernel_addr_r=0x82000000
    loadaddr=0x82000000
    loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile}
    loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr
    loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    loadfit=run args_fit; bootm ${loadaddr}#${fdtfile};
    loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    mmcboot=if mmc dev ${mmcdev}; then setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then run loadfdt; echo Booting from ;
    mmcdev=1
    mmcloados=run args_mmc; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; ;
    mmcrootfstype=ext4 rootwait
    netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp
    netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr}
    netloadfdt=tftp ${fdtaddr} ${fdtfile}
    netloadimage=tftp ${loadaddr} ${bootfile}
    nfsopts=nolock
    partitions=uuid_disk=${uuid_gpt_disk};name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};name=bootloader,size=2304K,uuid=${uuid_gpt_bootloader};name=environmen}
    partitions_android=uuid_disk=${uuid_gpt_disk};name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};name=bootloader,size=2304K,uuid=${uuid_gpt_bootloader};name=en}
    pxefile_addr_r=0x80100000
    ramdisk_addr_r=0x88080000
    rdaddr=0x88080000
    reboot_image=boot
    rootpath=/export/rootfs
    scriptaddr=0x80000000
    scsidevs=0
    serial#=0900f0117a3c00a0
    soc=omap5
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    stderr=serial@4806a000
    stdin=serial@4806a000
    stdout=serial@4806a000
    uenvcmd=run bootcmd
    update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
    usbtty=cdc_acm
    uuid=000476ec-02
    uuid_gpt_boot=cf2eecfa-4485-41e2-b19d-757e796da607
    uuid_gpt_bootloader=77877125-add0-4374-9e60-02cb591c9737
    uuid_gpt_cache=b6c45ead-9f2d-4485-9417-fe3bd1c9b1b3
    uuid_gpt_crypto=3d5088db-a534-413e-836d-c757cb682814
    uuid_gpt_disk=00042021-0408-4601-9dcc-a8c51255994f
    uuid_gpt_dsp1=369a6c6d-19e9-4d26-a9ee-bd00379686c7
    uuid_gpt_dsp2=0e8cb960-adbe-43b0-9cc6-5bd4e026d14a
    uuid_gpt_efs=02a90af2-5d1c-4a29-9177-97a513e3cae4
    uuid_gpt_environment=b4b84b8a-04e3-48ae-8536-aff5c9c495b1
    uuid_gpt_ipu1=180bebcc-cb39-47d5-9db7-03b405fa77d4
    uuid_gpt_ipu2=2b1a98d4-7804-4e54-9607-7fd3c651068d
    uuid_gpt_misc=35219908-c613-4b08-9322-3391ff571e19
    uuid_gpt_recovery=03332b01-ac34-4d28-99b4-34e03a2335f4
    uuid_gpt_reserved=8e123a33-e3d3-4db9-92f4-d3ebd9b3224f
    uuid_gpt_system=78093af1-b5b1-4e1a-8821-39438e24b627
    uuid_gpt_userdata=7bfe05ed-d33c-41cc-adaf-be8e55b00591
    uuid_gpt_vendor=04eb10b7-b945-4ae9-8d0b-21458d596f54
    uuid_gpt_xloader=8ef917d1-2c6f-4bd0-a5b2-331a19f91cb2
    vendor=ti
    ver=U-Boot 2016.05-g333293e877 (Dec 28 2017 - 05:17:21 +0530)
    vram=16M

    Environment size: 9098/131067 bytes
    =>

    Could you please help as early as possible.

  • Hi Sagar,

    Did you use a script to create the SD card for the EVM board?
    Which SDK are you using?

    - Keerthy

  • we use sandisk ultra 32 gb sd card.

    we create the sd card by manually creating fat32 bootable partition for boot folder and ext4 partition for rootfs using disk application in ubuntu and copy the contents (backed up contents) in to the folders  respectively.

    And the contents of the the rootfs and boot is already backed up working one's  which is working in the second TI J6 EVM board which we have. and we use the same procedure and backup to boot the other TI j6 board whenever we retrieve the other board with our backed up image. And that always works.

    Thanks

    sagar

  • Sagar,

    Thanks! That helps me understand the issue. So one board works absolutely fine with the same SD card and the other board
    does not.

    Can you try the below commands at u-boot prompt:

    env default -a
    saveenv
    boot

    Best Regards,
    Keerthy

  • Hi Keerthy,

    I face the same issue even after that. Things which we have tried.

    1) copied the backed up image to the sd card and tried to boot after the env default -a which you suggested.

    2) we prepared the sd card from our local system using the below command in the document.But still it boots from eMMC.

    sudo ${GLSDK}/bin/mksdboot.sh --device /dev/sdY --sdk ${GLSDK}

    3) could you please check if there is any issue in the uboot configuration which we have sent.

    4) Regarding the sd card issue we are seeing the meminfo command in uboot detects the sdcard when inserted. So I think it wouldn't be an SD card issue right?


    Could you please suggest what can be tried from our side to come out of this blocker issue.

    Thanks
    Sagar

  • Sagar,

    It is really difficult to tell what is happening as the environment you are using is 2016 based. Any chance you can migrate to
    recent SDKs?

    Best Regards,
    Keerthy

  • Environment size: 7245/131067 bytes
    => env default -a
    ## Resetting to default environment
    => boot
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    reading boot.scr
    ** Unable to read file boot.scr **
    reading uEnv.txt
    290 bytes read in 5 ms (56.6 KiB/s)
    Loaded env from uEnv.txt
    Importing environment from mmc0 ...
    switch to partitions #0, OK
    mmc0 is current device
    SD/MMC found on device 0
    ** File not found /boot/zImage **
    switch to partitions #0, OK
    mmc1(part 0) is current device

    MMC read: dev # 1, block # 5376, count 512 ... 512 blocks read: OK

    MMC read: dev # 1, block # 101152, count 20480 ... 20480 blocks read: OK
    Booting from eMMC ...
    ## Booting Android Image at 0x82000000 ...
    Kernel load addr 0x80008000 size 7639 KiB
    Kernel command line: buildvariant=userdebug
    RAM disk load addr 0x83000000 size 1092 KiB
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Kernel Image ... OK
       Loading Ramdisk to 8feef000, end 8ffffd1b ... OK
       Loading Device Tree to 8fed1000, end 8feee923 ... OK
    Using machid 0xfe6 from environment

    Starting kernel ...

    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpuset
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.4.117-01626-geb49620 (lntts@user-ProLiant-DL380-G7) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #1 SMP PREEMPT Mon May 14 11:35:05 8
    [    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] Machine model: TI DRA762 EVM
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB
    [    0.000000] Reserved memory: initialized no

    Could you please help on what is happening here and what needs to be changed? to boot from sd card? zImage is already there in the boot folder in the sdcard.

    Thanks

    Sagar

  • Sagar,

    You could try removing the reserved-memory device tree node to begin with. Kernel is being picked up nicely
    but looking at the last line of the trace you have shared it is hanging at the init time of reserved memory.

    Best Regards,
    Keerthy

  • Could you please help on how to remove the reserved-memory device tree node?

  • hi keerthy,

    please note that we are trying to load linux in the sd card but it loads androic in eMMC here .I was checking about what is going wrong in sdcard and why it boots from eMMC with the default configuration you gave.

  • mmc0 is current device
    SD/MMC found on device 0
    ** File not found /boot/zImage **
    switch to partitions #0, OK
    mmc1(part 0) is current device

    Sagar,

    It is trying to get /boot/zImage from SD card but unable to find that on SD card file system. Hence it switches to eMMC & finds
    the file.

    Once you get to u-boot prompt can you try:
    ext4ls mmc 0:1

    And

    ext4ls mmc 0:1 /boot/

    See if you have the zImage under /boot of your sd file system.

    - Keerthy