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.

AM5728: error in booting from eMMC NAND - error MMC: no card present

Part Number: AM5728
Other Parts Discussed in Thread: TMDSEVM572X, BEAGLEBOARD-X15, , DRA752

Hi 

I have a problem in booting TMDSEVM572x  board from eMMC NAND flash.

I've made a SD Card and programmed it with boot and rootfs partitions.

booting from SD Card is OK.

Also I copied contents of both boot and rootfs partitions of SD Card in a third partition in SD Card for programming those boot/rootfs contents into eMMC NAND flash during normal run that booted from SD Card.

After booting from SD Card, I made two partitions in eMMC NAND flash as boot (with type FAT and size 70MB) and rootfs (with type ext3 and size 3.5GB).

the partitions of SD Card and eMMC are as follows:

root@am57xx-evm:~# fdisk -l /dev/mmcblk0 /dev/mmcblk1
Disk /dev/mmcblk0: 14.8 GiB, 15836643328 bytes, 30930944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc7a63f89

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 * 2048 145407 143360 70M c W95 FAT32 (LBA)
/dev/mmcblk0p2 145408 8000000 7854593 3.8G 83 Linux
/dev/mmcblk0p3 8001536 30930943 22929408 11G 83 Linux


Disk /dev/mmcblk1: 3.6 GiB, 3825205248 bytes, 7471104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc2c50f99

Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 * 2048 145407 143360 70M c W95 FAT32 (LBA)
/dev/mmcblk1p2 145408 7471103 7325696 3.5G 83 Linux

the mounted drives are as follows :

root@am57xx-evm:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 3800016 3320876 282776 92% /
devtmpfs 837852 4 837848 0% /dev
tmpfs 933084 8 933076 0% /dev/shm
tmpfs 933084 18020 915064 2% /run
tmpfs 933084 0 933084 0% /sys/fs/cgroup
tmpfs 933084 2208 930876 0% /tmp
tmpfs 51200 16 51184 0% /var/volatile
tmpfs 16384 0 16384 0% /media/ram
/dev/mmcblk0p3 11219216 3342812 7303172 31% /run/media/mmcblk0p3
/dev/mmcblk1p1 70561 1523 69039 2% /run/media/mmcblk1p1
/dev/mmcblk1p2 3523632 3320340 20972 99% /run/media/mmcblk1p2
/dev/mmcblk0p1 70561 1523 69038 2% /run/media/mmcblk0p1
tmpfs 186616 0 186616 0% /run/user/0

the partition /dev/mmcblk0p1  is  as boot in SD Card that has mounted as /run/media/mmcblk0p1  drive.

the partition /dev/mmcblk0p2  is as rootfs in SD Card that has mounted as /dev/root  drive.

the partition /dev/mmcblk0p3  is as temporary holder for boot and rootfs contents.

the partitions /dev/mmcblk1p1 and /dev/mmcblk1p2  are for eMMC.

I copied the contents of boot folder from SD Card into boot partition of eMMC. also I copied the contents of rootfs folder from SD Card into rootfs partition of eMMC.

root@am57xx-evm:~# ls /run/media/mmcblk0p3/
boot rootfs

root@am57xx-evm:~# cp -r /run/media/mmcblk0p3/rootfs/* /run/media/mmcblk1p2

root@am57xx-evm:~# cp -r /run/media/mmcblk0p3/boot/* /run/media/mmcblk1p1

After discarding SD Card and powering up the board, I expected the EVM to boot correctly from eMMC. but it does not boot and give warning and errors as follows :

U-Boot SPL 2019.01-g8b90adfb16 (Jul 07 2019 - 08:22:29 +0000)
DRA752-GP ES2.0
Trying to boot from MMC2_2
no pinctrl state for default mode
no pinctrl state for default mode
Loading Environment from FAT... Card did not respond to voltage select!
Loading Environment from MMC... *** Warning - bad CRC, using default environment

U-Boot 2019.01-g8b90adfb16 (Jul 07 2019 - 08:22:29 +0000)

CPU : DRA752-GP ES2.0
Model: TI AM5728 BeagleBoard-X15
Board: AM572x EVM REV A.3A
DRAM: 2 GiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from FAT... MMC: no card present
Loading Environment from MMC... *** Warning - bad CRC, using default environment

Net:
Warning: ethernet@48484000 using MAC address from ROM
eth0: ethernet@48484000
Hit any key to stop autoboot: 0
MMC: no card present
MMC: no card present
MMC: no card present
MMC: no card present
Trying to boot Linux from eMMC ...
switch to partitions #0, OK
mmc1(part 0) is current device
SD/MMC found on device 1
4256256 bytes read in 56 ms (72.5 MiB/s)
134586 bytes read in 3 ms (42.8 MiB/s)
Trying to boot Android from eMMC ...
switch to partitions #0, OK
mmc1(part 0) is current device
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]
- Show or 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

Wrong Image Format for bootm command
ERROR: can't get kernel image!
=>

how can I resolve this problem?

any hep would be appreciated.

Regards,

Ali

  • Hi,

    Can you try updating bootcmd environment variable of u-boot to not include android_emmc?
    Remove the highlighted section from boot_cmd

    => printenv bootcmd
    bootcmd=if test ${dofastboot} -eq 1; then echo Boot fastboot requested, resetting dofastboot ...;setenv dofastboot 0; saveenv;echo Booting into fastboot ...; fastboot 0; fi;
    if test ${boot_fit} -eq 1; then run update_to_fit;fi;run findfdt; run envboot; run mmcboot;run emmc_linux_boot; run emmc_android_boot;


    I want to see if there was any error in loading Linux from eMMC, before it switched to attempt booting Android from eMMC.
    According to the log, attempt was made to load Linux from eMMC and it was able to load Kernel images also, but not sure why it started to look for Android images.

    Trying to boot Linux from eMMC ...
    switch to partitions #0, OK
    mmc1(part 0) is current device
    SD/MMC found on device 1
    4256256 bytes read in 56 ms (72.5 MiB/s)
    134586 bytes read in 3 ms (42.8 MiB/s)
    Trying to boot Android from eMMC ...
    switch to partitions #0, OK
    mmc1(part 0) is current device
    mmc - MMC sub system



    Regards,
    Vishal

  • Hi Vishal

    thanks for response.

    I updated bootcmd environment variable in u-boot as follows (SD Card discarded, only eMMC exists):

    => setenv bootcmd_original ${bootcmd}
    => setenv bootcmd 'if test ${dofastboot} -eq 1; then echo Boot fastboot requested, resetting dofastboot ...;setenv dofastboot 0; saveenv;echo Booting into fastboot ...; fastboot 0; fi; if test ${boot_fit} -eq 1; then run update_to_fit;fi;run findfdt; run envboot; run mmcboot;run emmc_linux_boot;'
    =>
    =>
    => pri
    arch=arm
    args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
    baudrate=115200
    board=am57xx
    board_name=am57xx_evm_reva3
    board_rev=A.3A
    board_serial=19184P552214
    boot_fdt=try
    boot_fit=0
    bootargs=androidboot.serialno=${serial#} console=ttyS2,115200 androidboot.console=ttyS2 androidboot.hardware=beagle_x15board
    bootcmd=if test ${dofastboot} -eq 1; then echo Boot fastboot requested, resetting dofastboot ...;setenv dofastboot 0; saveenv;echo Booting into fastboot ...; fastboot 0; fi; if test ${boot_fit} -eq 1; then run update_to_fit;fi;run findfdt; run envboot; run mmcboot;run emmc_linux_boot;
    bootcmd_original=if test ${dofastboot} -eq 1; then echo Boot fastboot requested, resetting dofastboot ...;setenv dofastboot 0; saveenv;echo Booting into fastboot ...; fastboot 1; fi;if test ${boot_fit} -eq 1; then run update_to_fit;fi;run findfdt; run envboot; run mmcboot;run emmc_linux_boot; run emmc_android_boot;
    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=ttyO2,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 0x200;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl-os-args.raw raw 0x1500 0x200;spl-os-image.raw raw 0x1700 0x6900;spl-os-args fat 1 1;spl-os-image fat 1 1;u-boot.img fat 1 1;uEnv.txt fat 1 1
    dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw raw 0x100 0x200;u-boot.img.raw raw 0x300 0x1000;u-env.raw raw 0x1300 0x200;spl-os-args.raw raw 0x1500 0x200;spl-os-image.raw raw 0x1700 0x6900;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1
    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 0x1D0000 0x010000;kernel raw 0x1E0000 0x800000
    dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
    dfu_bufsiz=0x10000
    dofastboot=0
    emmc_android_boot=echo Trying to boot Android from eMMC ...; run update_to_fit; setenv eval_bootargs setenv bootargs $bootargs; run eval_bootargs; setenv mmcdev 1; setenv machid fe6; mmc dev $mmcdev; mmc rescan; part start mmc ${mmcdev} boot boot_start; part size mmc ${mmcdev} boot boot_size; mmc read ${loadaddr} ${boot_start} ${boot_size}; bootm ${loadaddr}#${fdtfile};
    emmc_linux_boot=echo Trying to boot Linux from eMMC ...; setenv mmcdev 1; setenv bootpart 1:2; setenv mmcroot /dev/mmcblk0p2 rw; run mmcboot;
    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;
    ethaddr=7c:38:66:7d:4c:32
    fastboot.board_rev=A.3A
    fastboot.cpu=DRA752
    fastboot.secure=GP
    fdt_addr_r=0x88000000
    fdtaddr=0x88000000
    fdtcontroladdr=fdf26668
    fdtfile=undefined
    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_name = dra72x-revc; then setenv fdtfile dra72-evm-revc.dtb; fi;if test $board_name = dra72x; then setenv fdtfile dra72-evm.dtb; fi;if test $board_name = dra71x && test $boot_nand = 1; then setenv fdtfile dra71-evm-nand.dtb; fi;if test $board_name = dra71x && test $boot_nand = 0; then setenv fdtfile dra71-evm.dtb; fi;if test $board_name = dra76x_acd; then setenv fdtfile dra76-evm.dtb; fi;if test $board_name = beagle_x15; then setenv fdtfile am57xx-beagle-x15.dtb; fi;if test $board_name = beagle_x15_revb1; then setenv fdtfile am57xx-beagle-x15-revb1.dtb; fi;if test $board_name = beagle_x15_revc; then setenv fdtfile am57xx-beagle-x15-revc.dtb; fi;if test $board_name = am572x_idk && test $idk_lcd = no; then setenv fdtfile am572x-idk.dtb; fi;if test $board_name = am572x_idk && test $idk_lcd = osd101t2045; then setenv fdtfile am572x-idk-lcd-osd101t2045.dtb; fi;if test $board_name = am572x_idk && test $idk_lcd = osd101t2587; then setenv fdtfile am572x-idk-lcd-osd101t2587.dtb; fi;if test $board_name = am574x_idk && test $idk_lcd = no; then setenv fdtfile am574x-idk.dtb; fi;if test $board_name = am574x_idk && test $idk_lcd = osd101t2587; then setenv fdtfile am574x-idk-lcd-osd101t2587.dtb; fi;if test $board_name = am57xx_evm; then setenv fdtfile am57xx-evm.dtb; fi;if test $board_name = am57xx_evm_reva3; then setenv fdtfile am57xx-evm-reva3.dtb; fi;if test $board_name = am571x_idk && test $idk_lcd = no; then setenv fdtfile am571x-idk.dtb; fi;if test $board_name = am571x_idk && test $idk_lcd = osd101t2045; then setenv fdtfile am571x-idk-lcd-osd101t2045.dtb; fi;if test $board_name = am571x_idk && test $idk_lcd = osd101t2587; then setenv fdtfile am571x-idk-lcd-osd101t2587.dtb; fi;if test $fdtfile = undefined; then echo WARNING: Could not determine device tree to use; fi;
    finduuid=part uuid mmc ${bootpart} uuid
    fit_bootfile=fitImage
    fit_loadaddr=0x90000000
    get_overlaystring=for overlay in $overlay_files;do;setenv overlaystring ${overlaystring}'#'${overlay};done;
    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=load mmc ${mmcdev} ${loadaddr} boot.scr
    loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    loadfit=run args_mmc; run run_fit;
    loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadimage; then if test ${boot_fit} -eq 1; then run loadfit; else run mmcloados;fi;fi;fi;
    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; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
    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=bootloader,start=384K,size=1792K,uuid=${uuid_gpt_bootloader};name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}
    partitions_android=uuid_disk=${uuid_gpt_disk};name=xloader,start=128K,size=256K,uuid=${uuid_gpt_xloader};name=bootloader,size=2048K,uuid=${uuid_gpt_bootloader};name=uboot-env,start=2432K,size=256K,uuid=${uuid_gpt_reserved};name=misc,size=128K,uuid=${uuid_gpt_misc};name=recovery,size=40M,uuid=${uuid_gpt_recovery};name=boot,size=10M,uuid=${uuid_gpt_boot};name=system,size=1024M,uuid=${uuid_gpt_system};name=vendor,size=256M,uuid=${uuid_gpt_vendor};name=userdata,size=-,uuid=${uuid_gpt_userdata}
    pxefile_addr_r=0x80100000
    ramdisk_addr_r=0x88080000
    rdaddr=0x88080000
    rootpath=/export/rootfs
    run_fit=bootm ${fit_loadaddr}#${fdtfile}${overlaystring}
    scriptaddr=0x80000000
    serial#=1600400e25d40122
    soc=omap5
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    stderr=serial@48020000
    stdin=serial@48020000
    stdout=serial@48020000
    update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
    usbtty=cdc_acm
    vendor=ti
    ver=U-Boot 2019.01-g8b90adfb16 (Jul 07 2019 - 08:22:29 +0000)
    vram=16M

    Environment size: 7741/131067 bytes

    When I wanted to save Env , it prompts an error :


    => saveenv
    Saving Environment to FAT... MMC: no card present
    Failed (1)
    =>

    what mistake do I have? 

    BR,

    Ali

  • Hi Vishal

    the problem is resolved.

    I copied the zImage in rootfs/boot/  again.

    perhaps, zImage was incorrectly pasted before. 

    but the warning  "Loading Environment from MMC... *** Warning - bad CRC, using default environment"  is yet prompted and the default env is loaded !!

    for resolving this, what can I do?

    BR,

    Ali

  • Hi Ali,

    Do you see the warning from SPL or u-boot?

    Does saveenv work for you?
    If not, could you change the u-boot config to disable CONFIG_ENV_IS_IN_FAT and enable only CONFIG_ENV_IS_IN_MMC and try?

    Regards,
    Vishal

  • Hi Vishal

    thank you for response.

    No, command saveenv  does not work when booting from MMC and gives error :

    => saveenv
    Saving Environment to FAT... MMC: no card present
    Failed (1)
    =>

    but, in this condition (CONFIG_ENV_IN_MMC) , same as previous condition (CONFIG_ENV_IN_FAT & CONFIG_ENV_IN_MMC), the loading kernel is done correctly and only with warning bad CRC:

    U-Boot SPL 2019.01-ga164eecfb4-dirty (Sep 09 2020 - 01:01:16 -0400)
    DRA752-GP ES2.0
    Trying to boot from MMC2_2
    no pinctrl state for default mode
    no pinctrl state for default mode
    Loading Environment from FAT... Card did not respond to voltage select!
    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    U-Boot 2019.01-ga164eecfb4-dirty (Sep 09 2020 - 01:01:16 -0400)

    CPU : DRA752-GP ES2.0
    Model: TI AM5728 BeagleBoard-X15
    Board: AM572x EVM REV A.3A
    DRAM: 2 GiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from FAT... MMC: no card present
    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    Net:
    Warning: ethernet@48484000 using MAC address from ROM
    eth0: ethernet@48484000
    Hit any key to stop autoboot: 0
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    Trying to boot Linux from eMMC ...
    switch to partitions #0, OK
    mmc1(part 0) is current device
    SD/MMC found on device 1
    4256256 bytes read in 60 ms (67.7 MiB/s)
    134586 bytes read in 3 ms (42.8 MiB/s)
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8ffdc000, end 8ffffdb9 ... OK

    Starting kernel ...

    An other simple question Dear Vishal!  for kernel Config, we can use command zcat for reading CONFIG_xxx parameters such as :

    root@am57xx-evm:~# zcat /proc/config.gz | grep CONFIG_MEDIA_CONTROLLER

    CONFIG_MEDIA_CONTROLLER=y

    What command should I execute for being aware of CONFIG setting in uboot and verifying it?

    BR,

    Ali

  • Hi Ali,

    I am not aware of any mechanism like that for checking u-boot configs.

    Since the log still has "Loading Environment from FAT", I don't think the change of disabling CONFIG_ENV_IN_FAT has taken effect.

    Regards,
    Vishal

  • Hi Vishal

    I have configured u-boot parameters in host linux as follows with CONFIG_IS_IN_FAT disabled  and  CONFIG_IS_IN_MMC enabled:

    sitara@myTI:~/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-2019.01+gitAUTOINC+8b90adfb16-g8b90adfb16$ make menuconfig

    the I saved configuration in file  .config  as:

    then I make u-boot files as :

    sitara@myTI:~/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-2019.01+gitAUTOINC+8b90adfb16-g8b90adfb16$ cd ..
    sitara@myTI:~/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support$ cd ..

    sitara@myTI:~/ti-processor-sdk-linux-am57xx-evm-06.00.00.07$ make u-boot
    ===================================
    Building U-boot
    ===================================
    make -j 2 -C /home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-* CROSS_COMPILE=/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- am57xx_evm_config
    make[1]: Entering directory '/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-2019.01+gitAUTOINC+8b90adfb16-g8b90adfb16'
    #
    # configuration written to .config
    #
    make[1]: Leaving directory '/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-2019.01+gitAUTOINC+8b90adfb16-g8b90adfb16'
    make -j 2 -C /home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-* CROSS_COMPILE=/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- CONFIG_MKIMAGE_DTC_PATH=/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-*/scripts/dtc/dtc
    make[1]: Entering directory '/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-2019.01+gitAUTOINC+8b90adfb16-g8b90adfb16'
    scripts/kconfig/conf --syncconfig Kconfig
    CHK include/config.h
    GEN include/autoconf.mk.dep
    CFG u-boot.cfg
    CFG spl/u-boot.cfg
    GEN include/autoconf.mk
    GEN spl/include/autoconf.mk
    CHK include/config/uboot.release
    CHK include/generated/timestamp_autogenerated.h
    UPD include/generated/timestamp_autogenerated.h
    CHK include/generated/version_autogenerated.h
    CHK include/generated/generic-asm-offsets.h
    CHK include/generated/asm-offsets.h
    HOSTCC tools/mkenvimage.o
    CHK include/config.h
    CFG u-boot.cfg
    HOSTCC tools/fit_image.o
    HOSTCC tools/image-host.o
    HOSTCC tools/dumpimage.o
    HOSTCC tools/mkimage.o
    HOSTLD tools/dumpimage
    HOSTLD tools/mkenvimage
    HOSTLD tools/mkimage
    CC cmd/version.o
    CC common/main.o
    LD cmd/built-in.o
    LD common/built-in.o
    CC drivers/fastboot/fb_getvar.o
    LD drivers/fastboot/built-in.o
    LD drivers/built-in.o
    CC lib/smbios.o
    CC lib/efi_loader/efi_reloc.o
    CC lib/efi_loader/helloworld.o
    CC lib/display_options.o
    LD lib/efi_loader/helloworld_efi.so
    OBJCOPY lib/efi_loader/helloworld.efi
    rm lib/efi_loader/helloworld_efi.so lib/efi_loader/helloworld.o
    LD lib/built-in.o
    LD u-boot
    OBJCOPY u-boot-nodtb.bin
    make[3]: 'arch/arm/dts/am572x-idk.dtb' is up to date.
    OBJCOPY u-boot.srec
    CAT u-boot-dtb.bin
    SYM u-boot.sym
    MKIMAGE u-boot-dtb.img
    MKIMAGE u-boot.img
    COPY u-boot.bin
    CC spl/common/spl/spl.o
    LD spl/common/spl/built-in.o
    CC spl/lib/display_options.o
    LD spl/lib/built-in.o
    LD spl/u-boot-spl
    OBJCOPY spl/u-boot-spl-nodtb.bin
    CAT spl/u-boot-spl-dtb.bin
    COPY spl/u-boot-spl.bin
    MKIMAGE MLO
    CFGCHK u-boot.cfg
    make[1]: Leaving directory '/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-2019.01+gitAUTOINC+8b90adfb16-g8b90adfb16'
    sitara@myTI:~/ti-processor-sdk-linux-am57xx-evm-06.00.00.07$

    then I copied the files  MLO and u-boot.img  into   /run/media/mmcblk1p1  (boot partition of eMMC in EVM).

    after reboot, previous warning (bad CRC) and reading Environment from FAT is prompted.

    should I do any other thing that may I forget it?

    BR,

    Ali

  • Hi Ali,

    The images you attached in previous response didn't come through.
    After you did menuconfig, did the .config reflect CONFIG_ENV_IN_FAT as disabled?

    Regards,
    Vishal

  • Hi Vishal

    yes, after doing menuconfig and saving in .config and exiting, I reopened the menuconfig and checked the CONFIG_ENV_IS_IN_FAT. it was disabled correctly. I opened the file  .config, these are seen :

    #
    # Environment
    #
    # CONFIG_ENV_IS_IN_EEPROM is not set
    # CONFIG_ENV_IS_IN_FAT is not set
    # CONFIG_ENV_IS_IN_EXT4 is not set
    # CONFIG_ENV_IS_IN_FLASH is not set
    CONFIG_ENV_IS_IN_MMC=y
    # CONFIG_ENV_IS_IN_NAND is not set
    # CONFIG_ENV_IS_IN_NVRAM is not set
    # CONFIG_ENV_IS_IN_ONENAND is not set
    # CONFIG_ENV_IS_IN_REMOTE is not set
    # CONFIG_ENV_IS_IN_SPI_FLASH is not set
    # CONFIG_ENV_IS_IN_UBI is not set
    # CONFIG_USE_DEFAULT_ENV_FILE is not set
    CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
    # CONFIG_SPL_ENV_IS_NOWHERE is not set
    CONFIG_SPL_ENV_IS_IN_MMC=y
    CONFIG_NET=y
    # CONFIG_NET_RANDOM_ETHADDR is not set
    # CONFIG_NETCONSOLE is not set

    but after running make u-boot , I reopened the menuconfig an saw that the CONFIG_ENV_IS_IN_FAT has been enabled again automatically !!!  in file  .config are :

    #
    # Environment
    #
    # CONFIG_ENV_IS_IN_EEPROM is not set
    CONFIG_ENV_IS_IN_FAT=y
    # CONFIG_ENV_IS_IN_EXT4 is not set
    # CONFIG_ENV_IS_IN_FLASH is not set
    CONFIG_ENV_IS_IN_MMC=y
    # CONFIG_ENV_IS_IN_NAND is not set
    # CONFIG_ENV_IS_IN_NVRAM is not set
    # CONFIG_ENV_IS_IN_ONENAND is not set
    # CONFIG_ENV_IS_IN_REMOTE is not set
    # CONFIG_ENV_IS_IN_SPI_FLASH is not set
    # CONFIG_ENV_IS_IN_UBI is not set
    CONFIG_ENV_FAT_INTERFACE="mmc"
    CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
    CONFIG_ENV_FAT_FILE="uboot.env"
    # CONFIG_USE_DEFAULT_ENV_FILE is not set
    CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
    # CONFIG_SPL_ENV_IS_NOWHERE is not set
    CONFIG_SPL_ENV_IS_IN_MMC=y
    CONFIG_SPL_ENV_IS_IN_FAT=y
    CONFIG_NET=y
    # CONFIG_NET_RANDOM_ETHADDR is not set
    # CONFIG_NETCONSOLE is not set

    what has been happened?

    in log of make u-boot it is shown that the am57xx_evm_config is used and the new config is written to .config  : 

    sitara@myTI:~/ti-processor-sdk-linux-am57xx-evm-06.00.00.07$ make u-boot
    ===================================
    Building U-boot
    ===================================
    make -j 2 -C /home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-* CROSS_COMPILE=/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- am57xx_evm_config
    make[1]: Entering directory '/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-2019.01+gitAUTOINC+8b90adfb16-g8b90adfb16'
    #
    # configuration written to .config
    #
    make[1]: Leaving directory '/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-2019.01+gitAUTOINC+8b90adfb16-g8b90adfb16'
    make -j 2 -C /home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-* CROSS_COMPILE=/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- CONFIG_MKIMAGE_DTC_PATH=/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-*/scripts/dtc/dtc
    make[1]: Entering directory '/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-2019.01+gitAUTOINC+8b90adfb16-g8b90adfb16'
    scripts/kconfig/conf --syncconfig Kconfig
    CHK include/config.h
    GEN include/autoconf.mk.dep
    CFG u-boot.cfg
    CFG spl/u-boot.cfg
    GEN include/autoconf.mk
    GEN spl/include/autoconf.mk
    CHK include/config/uboot.release
    CHK include/generated/timestamp_autogenerated.h
    UPD include/generated/timestamp_autogenerated.h
    CHK include/generated/version_autogenerated.h
    CHK include/generated/generic-asm-offsets.h
    CHK include/generated/asm-offsets.h
    HOSTCC tools/mkenvimage.o
    CHK include/config.h
    CFG u-boot.cfg
    HOSTCC tools/fit_image.o
    HOSTCC tools/image-host.o
    HOSTCC tools/dumpimage.o
    HOSTCC tools/mkimage.o
    HOSTLD tools/mkenvimage
    HOSTLD tools/dumpimage
    HOSTLD tools/mkimage
    CC common/main.o
    CC cmd/version.o
    LD common/built-in.o
    LD cmd/built-in.o
    CC drivers/fastboot/fb_getvar.o
    LD drivers/fastboot/built-in.o
    LD drivers/built-in.o
    CC lib/smbios.o
    CC lib/efi_loader/efi_reloc.o
    CC lib/efi_loader/helloworld.o
    LD lib/efi_loader/helloworld_efi.so
    OBJCOPY lib/efi_loader/helloworld.efi
    rm lib/efi_loader/helloworld_efi.so lib/efi_loader/helloworld.o
    CC lib/display_options.o
    LD lib/built-in.o
    LD u-boot
    OBJCOPY u-boot-nodtb.bin
    make[3]: 'arch/arm/dts/am572x-idk.dtb' is up to date.
    OBJCOPY u-boot.srec
    SYM u-boot.sym
    MKIMAGE u-boot-dtb.img
    MKIMAGE u-boot.img
    CAT u-boot-dtb.bin
    COPY u-boot.bin
    CC spl/common/spl/spl.o
    LD spl/common/spl/built-in.o
    CC spl/lib/display_options.o
    LD spl/lib/built-in.o
    LD spl/u-boot-spl
    OBJCOPY spl/u-boot-spl-nodtb.bin
    CAT spl/u-boot-spl-dtb.bin
    COPY spl/u-boot-spl.bin
    MKIMAGE MLO
    CFGCHK u-boot.cfg
    make[1]: Leaving directory '/home/sitara/ti-processor-sdk-linux-am57xx-evm-06.00.00.07/board-support/u-boot-2019.01+gitAUTOINC+8b90adfb16-g8b90adfb16'

    Why is not the saved .config used and instead a default config is used ?

    BR,

    Ali

  • Hi,

    Please try making changes directly in configs/am57xx_evm_defconfig file.

    Regards,
    Vishal

  • Hi

    the default content of file  am57xx_evm_defconfig  is as follows and not changed after make command :

    CONFIG_ARM=y
    CONFIG_ARCH_OMAP2PLUS=y
    CONFIG_TI_COMMON_CMD_OPTIONS=y
    CONFIG_SYS_MALLOC_F_LEN=0x2000
    CONFIG_OMAP54XX=y
    CONFIG_TARGET_AM57XX_EVM=y
    CONFIG_DRA7_DSPEVE_OPP_HIGH=y
    CONFIG_DRA7_IVA_OPP_HIGH=y
    CONFIG_DRA7_GPU_OPP_HIGH=y
    CONFIG_SPL=y
    CONFIG_SPL_SPI_FLASH_SUPPORT=y
    CONFIG_SPL_SPI_SUPPORT=y
    CONFIG_ARMV7_LPAE=y
    CONFIG_AHCI=y
    CONFIG_DISTRO_DEFAULTS=y
    CONFIG_NR_DRAM_BANKS=2
    CONFIG_SPL_LOAD_FIT=y
    CONFIG_OF_BOARD_SETUP=y
    CONFIG_USE_BOOTARGS=y
    CONFIG_BOOTARGS="androidboot.serialno=${serial#} console=ttyS2,115200 androidboot.console=ttyS2 androidboot.hardware=beagle_x15board"
    # CONFIG_USE_BOOTCOMMAND is not set
    CONFIG_SYS_CONSOLE_INFO_QUIET=y
    # CONFIG_MISC_INIT_R is not set
    CONFIG_VERSION_VARIABLE=y
    CONFIG_BOARD_EARLY_INIT_F=y
    CONFIG_SPL_SYS_MALLOC_SIMPLE=y
    CONFIG_SPL_SEPARATE_BSS=y
    CONFIG_SPL_DMA_SUPPORT=y
    # CONFIG_SPL_NAND_SUPPORT is not set
    CONFIG_SPL_OS_BOOT=y
    CONFIG_SPL_SPI_LOAD=y
    CONFIG_SPL_YMODEM_SUPPORT=y
    CONFIG_CMD_SPL=y
    # CONFIG_CMD_FLASH is not set
    # CONFIG_CMD_SETEXPR is not set
    # CONFIG_CMD_PMIC is not set
    CONFIG_OF_CONTROL=y
    CONFIG_SPL_OF_CONTROL=y
    CONFIG_DEFAULT_DEVICE_TREE="am572x-idk"
    CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am572x-idk am571x-idk am574x-idk"
    CONFIG_ENV_IS_IN_MMC=y
    CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
    CONFIG_DM=y
    CONFIG_SPL_DM=y
    CONFIG_SPL_DM_SEQ_ALIAS=y
    CONFIG_DWC_AHCI=y
    CONFIG_SPL_SYSCON=y
    CONFIG_SPL_OF_TRANSLATE=y
    CONFIG_DFU_MMC=y
    CONFIG_DFU_RAM=y
    CONFIG_DFU_SF=y
    CONFIG_USB_FUNCTION_FASTBOOT=y
    CONFIG_FASTBOOT_BUF_ADDR=0x82000000
    CONFIG_FASTBOOT_BUF_SIZE=0x2F000000
    CONFIG_FASTBOOT_USB_DEV=1
    CONFIG_FASTBOOT_FLASH=y
    CONFIG_FASTBOOT_FLASH_MMC_DEV=1
    CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
    CONFIG_DM_GPIO=y
    CONFIG_DM_I2C=y
    CONFIG_MISC=y
    CONFIG_DM_MMC=y
    CONFIG_MMC_OMAP_HS=y
    CONFIG_DM_SPI_FLASH=y
    CONFIG_SPI_FLASH=y
    CONFIG_SPI_FLASH_SPANSION=y
    CONFIG_PHY_MICREL=y
    CONFIG_PHY_MICREL_KSZ90X1=y
    CONFIG_DM_ETH=y
    CONFIG_MII=y
    CONFIG_DRIVER_TI_CPSW=y
    CONFIG_PHY=y
    CONFIG_PIPE3_PHY=y
    CONFIG_OMAP_USB2_PHY=y
    CONFIG_DM_PMIC=y
    CONFIG_PMIC_PALMAS=y
    CONFIG_DM_REGULATOR=y
    CONFIG_DM_REGULATOR_PALMAS=y
    CONFIG_DM_SCSI=y
    CONFIG_DM_SERIAL=y
    CONFIG_SPI=y
    CONFIG_DM_SPI=y
    CONFIG_TI_QSPI=y
    CONFIG_USB=y
    CONFIG_DM_USB=y
    CONFIG_DM_USB_GADGET=y
    CONFIG_SPL_DM_USB_GADGET=y
    CONFIG_USB_XHCI_HCD=y
    CONFIG_USB_XHCI_DWC3=y
    CONFIG_USB_DWC3=y
    CONFIG_USB_DWC3_GADGET=y
    CONFIG_USB_DWC3_GENERIC=y
    CONFIG_USB_GADGET=y
    CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments"
    CONFIG_USB_GADGET_VENDOR_NUM=0x0451
    CONFIG_USB_GADGET_PRODUCT_NUM=0xd022

    The CONFIG_ENV_IS_IN_FAT  is disabled (and not exists) in this file by default.  also the CONFIG_ENV_IS_IN_MMC  is enabled by default.

    So this is not the case.

    BR,

    Ali

  • Hi Ali,

    Could you do the below change explicitly in defconfig and try?

    Basically adding below line to defconfig
    # CONFIG_ENV_IS_IN_FAT is not set


    diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
    index 2e6787a906..13a5ddec22 100644
    --- a/configs/am57xx_evm_defconfig
    +++ b/configs/am57xx_evm_defconfig
    @@ -51,6 +51,7 @@ CONFIG_OF_CONTROL=y
    CONFIG_SPL_OF_CONTROL=y
    CONFIG_OF_LIST="am57xx-beagle-x15 am57xx-beagle-x15-revb1 am57xx-beagle-x15-revc am5729-beagleboneai am572x-idk am571x-idk am574x-idk"
    CONFIG_ENV_OVERWRITE=y
    +# CONFIG_ENV_IS_IN_FAT is not set
    CONFIG_ENV_IS_IN_MMC=y
    CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
    CONFIG_SYS_RELOC_GD_ENV_ADDR=y

    Regards,
    Vishal

  • Hi Vishal

    thanks a lot for response.

    I Added   # CONFIG_ENV_IS_IN_FAT is not set  in the file  am57xx_evm_defconfig  as you mentioned.

    Then, I rebuilt the u-boot and MLO and pasted to eMMC boot partition.

    After rebooting, I saw that the previous error sentence   Loading Environment from FAT... Card did not respond to voltage select!    disappeared and Log as follows :

    U-Boot SPL 2019.01-ga164eecfb4-dirty (Sep 22 2020 - 03:23:45 -0400)
    DRA752-GP ES2.0
    Trying to boot from MMC2_2
    no pinctrl state for default mode
    no pinctrl state for default mode
    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    U-Boot 2019.01-ga164eecfb4-dirty (Sep 22 2020 - 03:23:45 -0400)

    CPU : DRA752-GP ES2.0
    Model: TI AM5728 BeagleBoard-X15
    Board: AM572x EVM REV A.3A
    DRAM: 2 GiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from MMC... *** Warning - bad CRC, using default environment

    Net:
    Warning: ethernet@48484000 using MAC address from ROM
    eth0: ethernet@48484000
    Hit any key to stop autoboot: 0
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    Trying to boot Linux from eMMC ...
    switch to partitions #0, OK
    mmc1(part 0) is current device
    SD/MMC found on device 1
    4256256 bytes read in 60 ms (67.7 MiB/s)
    134586 bytes read in 3 ms (42.8 MiB/s)
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8ffdc000, end 8ffffdb9 ... OK

    Starting kernel ...

    But the warning   Warning - bad CRC, using default environment   is printed yet !!!

    BR, 

    Ali

  • Hi Ali,

    Can you try saveenv command in u-boot console and check the behavior?

    Regards,
    Vishal

  • Hi Vishal

    In u-boot mode : 

    => saveenv
    Saving Environment to MMC... Writing to redundant MMC(1)... OK

    After  reboot , the warning bad CRC is resolved  :

    U-Boot SPL 2019.01-ga164eecfb4-dirty (Sep 22 2020 - 03:23:45 -0400)
    DRA752-GP ES2.0
    Trying to boot from MMC2_2
    no pinctrl state for default mode
    no pinctrl state for default mode
    Loading Environment from MMC... OK


    U-Boot 2019.01-ga164eecfb4-dirty (Sep 22 2020 - 03:23:45 -0400)

    CPU : DRA752-GP ES2.0
    Model: TI AM5728 BeagleBoard-X15
    Board: AM572x EVM REV A.3A
    DRAM: 2 GiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Loading Environment from MMC... OK
    Net: eth0: ethernet@48484000
    Hit any key to stop autoboot: 0
    MMC: no card present
    MMC: no card present
    MMC: no card present
    MMC: no card present
    Trying to boot Linux from eMMC ...
    switch to partitions #0, OK
    mmc1(part 0) is current device
    SD/MMC found on device 1
    4256256 bytes read in 60 ms (67.7 MiB/s)
    134586 bytes read in 3 ms (42.8 MiB/s)
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8ffdc000, end 8ffffdb9 ... OK

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0

    Thank you Vishal very much.

    but a little question !

    Why was the warning resolved after editing defconfig, using default ENV and then executing saveenv  but is not resolved only by copying MLO & uboot files from SD Card to eMMC ? what is difference between the original SDK ENV and the default ENV that is saved at uboot ?

    Best Regards,

    Ali