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: eMMC formatting fails

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Hi Ti Team,

I use the SDK pre-image put in SD card and  boot on into share the environment  

Now I want to boot my system from eMMC.  I made two partitions (mmcblk1p1 and mmcblk1p2). as per below guidelines:

  1. The eMMC is /dev/mmcblk1. Format it this way:
    1.01. fdisk /dev/mmcblk1
    1.02. o - this clears the existing partitions
    1.03. p - this lists all partition tables on the card (there should be none)
    1.04. n - create a new partition
    1.05. p - primary partition
    1.06. 1 - partition number
    1.07. 2048 - default value for the first sector
    1.08. +16M - last sector / partition size
    1.09. t - change the partition type (select partition 1)
    1.10. e - change tha partition type to "W95 FAT16 (LBA)"
    1.11. a - set the bootable flag for the selected partition (select partition 1)
    1.12. n - create a new partition
    1.13. p - primary partition
    1.14. 2 - partition number
    1.15. hit Enter to choose the default (next available) value for the first sector
    1.16. hit Enter to choose the default (last) value for the last sector
    1.17. p - this lists all partition tables on the card (there should be two)
    1.18. w - write all the above changes to disk
    1.19. umount /dev/mmcblk1p1 - if mounted
    1.20. mkfs.vfat -F 16 /dev/mmcblk1p1 - format the first partition
    1.21. umount /dev/mmcblk1p2 - if mounted
    1.22. mkfs.ext4 /dev/mmcblk1p2 - format the second partition 

But I executed the error to step 1.18. and step 1.19 

The following is the record of my implementation process :

===============================================================================================

_____ _____ _ _
| _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
| | _| .'| . | . | | __| _| . | | | -_| _| _|
|__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
|___| |___|

Arago Project http://arago-project.org am335x-evm ttyS0

Arago 2017.12 am335x-evm ttyS0

am335x-evm login: root

root@am335x-evm:~# fdisk /dev/mmcblk1

Welcome to fdisk (util-linux 2.28.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): o
Created a new DOS disklabel with disk identifier 0x9a61e951.

Command (m for help): p
Disk /dev/mmcblk1: 14.7 GiB, 15762194432 bytes, 30785536 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: 0x9a61e951

Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): 1
Value out of range.
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-30785535, default 2048): 2048
Last sector, +sectors or +size{K,M,G,T,P} (2048-30785535, default 30785535): +16M

Created a new partition 1 of type 'Linux' and of size 16 MiB.

Command (m for help): t
Selected partition 1
Partition type (type L to list all types): e
Changed type of partition 'Linux' to 'W95 FAT16 (LBA)'.

Command (m for help): a
Selected partition 1
The bootable flag on partition 1 is enabled now.

Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (2-4, default 2): 2
First sector (34816-30785535, default 34816):
Last sector, +sectors or +size{K,M,G,T,P} (34816-30785535, default 30785535):

Created a new partition 2 of type 'Linux' and of size 14.7 GiB.

Command (m for help): p
Disk /dev/mmcblk1: 14.7 GiB, 15762194432 bytes, 30785536 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: 0x9a61e951

Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 * 2048 34815 32768 16M e W95 FAT16 (LBA)
/dev/mmcblk1p2 34816 30785535 30750720 14.7G 83 Linux

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Device or resource busy


root@am335x-evm:~# umount /dev/mmcblk1
mmcblk1 mmcblk1boot0 mmcblk1boot1 mmcblk1rpmb
root@am335x-evm:~# umount /dev/mmcblk1p1 -if mounted
umount: /dev/mmcblk1p1: mountpoint not found
umount: mounted: mountpoint not found

How do I solve this problem?

Regards,

Egbert Liu

  • Egbert,

    Can you check to make sure that the device is not mounted before you try fdisk? The command "mount" should list the current mounts. If it is mounted, use "umount" to unmount it before trying to partition it.

    If this does not help, could you please attach a full log of the boot sequence and the commands that you try and their output to this thread for my interpretation?

    Thank you.
  • Hi RonB,

    Thanks for the info.    I order  "mount" command  and show below list :

    If you do not wish to distribute GPLv3 components please remove

    the above packages prior to distribution.  This can be done using

    the opkg remove command.  i.e.:

       opkg remove <package>

    Where <package> is the name printed in the list above

    NOTE: If the package is a dependency of another package you

         will be notified of the dependent packages.  You should

         use the --force-removal-of-dependent-packages option to

         also remove the dependent packages as well

    ***************************************************************

    ***************************************************************

    _____                    _____           _         _

    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_

    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|

    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|

                 |___|                    |___|

    Arago Project am335x-evm ttyS0

    Arago 2017.12 am335x-evm ttyS0

    am335x-evm login: root

    root@am335x-evm:~# mount

    /dev/mmcblk0p2 on / type ext4 (rw,relatime,data=ordered)

    devtmpfs on /dev type devtmpfs (rw,relatime,size=98632k,nr_inodes=24658,mode=755)

    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)

    proc on /proc type proc (rw,relatime)

    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

    devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)

    tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)

    tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)

    cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)

    pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)

    cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)

    cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)

    cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)

    cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)

    cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)

    cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)

    cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)

    tmpfs on /tmp type tmpfs (rw)

    mqueue on /dev/mqueue type mqueue (rw,relatime)

    debugfs on /sys/kernel/debug type debugfs (rw,relatime)

    tmpfs on /media/ram type tmpfs (rw,relatime,size=16384k)

    tmpfs on /var/volatile type tmpfs (rw,relatime,size=51200k)

    configfs on /sys/kernel/config type configfs (rw,relatime)

    /dev/mmcblk0p1 on /run/media/mmcblk0p1 type vfat (rw,relatime,gid=6,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

    tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=24748k,mode=700)

    root@am335x-evm:~#

    root@am335x-evm:~# [  305.123226] EXT4-fs (mmcblk0p2): error count since last fsck: 1

    [  305.129296] EXT4-fs (mmcblk0p2): initial error at time 1522077548: ext4_lookup:1606: inode 1030936

    [  305.138505] EXT4-fs (mmcblk0p2): last error at time 1522077548: ext4_lookup:1606: inode 1030936

    continue....................................................................................

    root@am335x-evm:~# fdisk /dev/mmcblk1

    Welcome to fdisk (util-linux 2.28.1).

    Changes will remain in memory only, until you decide to write them.

    Be careful before using the write command.

    Command (m for help): o

    Created a new DOS disklabel with disk identifier 0x9a61e951.

    Command (m for help): p

    Disk /dev/mmcblk1: 14.7 GiB, 15762194432 bytes, 30785536 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: 0x9a61e951

    Command (m for help): n

    Partition type

    p primary (0 primary, 0 extended, 4 free)

    e extended (container for logical partitions)

    Select (default p): 1

    Value out of range.

    p primary (0 primary, 0 extended, 4 free)

    e extended (container for logical partitions)

    Select (default p): p

    Partition number (1-4, default 1): 1

    First sector (2048-30785535, default 2048): 2048

    Last sector, +sectors or +size{K,M,G,T,P} (2048-30785535, default 30785535): +16M

    Created a new partition 1 of type 'Linux' and of size 16 MiB.

    Command (m for help): t

    Selected partition 1

    Partition type (type L to list all types): e

    Changed type of partition 'Linux' to 'W95 FAT16 (LBA)'.

    Command (m for help): a

    Selected partition 1

    The bootable flag on partition 1 is enabled now.

    Command (m for help): n

    Partition type

    p primary (1 primary, 0 extended, 3 free)

    e extended (container for logical partitions)

    Select (default p): p

    Partition number (2-4, default 2): 2

    First sector (34816-30785535, default 34816):

    Last sector, +sectors or +size{K,M,G,T,P} (34816-30785535, default 30785535):

    Created a new partition 2 of type 'Linux' and of size 14.7 GiB.

    Command (m for help): p

    Disk /dev/mmcblk1: 14.7 GiB, 15762194432 bytes, 30785536 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: 0x9a61e951

    Device Boot Start End Sectors Size Id Type

    /dev/mmcblk1p1 * 2048 34815 32768 16M e W95 FAT16 (LBA)

    /dev/mmcblk1p2 34816 30785535 30750720 14.7G 83 Linux

    Command (m for help): w

    The partition table has been altered.

    Calling ioctl() to re-read partition table.

    Re-reading the partition table failed.: Device or resource busy

    root@am335x-evm:~# umount /dev/mmcblk1

    mmcblk1 mmcblk1boot0 mmcblk1boot1 mmcblk1rpmb

    root@am335x-evm:~# umount /dev/mmcblk1p1 -if mounted

    umount: /dev/mmcblk1p1: mountpoint not found

    umount: mounted: mountpoint not found

    ==================================================================================

    BR

    Egbert Liu

  • Egbert,

    Thank you for confirming this. Can you tell me more about the hardware and what you've done to validate that it is functioning correctly?

    Have you tried any eMMC commands in U-Boot to see if it functions properly there?

    Thank you.
  • Hi RonB,

    Would you description detail or explanation the about  "more about the hardware and what you've done to validate that it is

    functioning correctly? " mean?

    Do you want me to provide an HW schematic to " Part for EMMC"?

    BR

    Egbert Liu

  • Egbert,

    I was more looking for things that you have done in SW to validate that the eMMC is functioning correctly. Can you access it from U-Boot? Do reads and writes work well there? Have you run stress tests in Linux?

    Also, have you tried committing smaller changes to the eMMC at a time using fdisk? If so, do you always get the same error?

    Thank you.
  • Hi RonB,

    I follow the TI document step to execution :

    8468.How to format and partition the eMMC flash.docx

    but  I shut down the MTR board, remove the SD card and start it from the eMMC is fail, and the fail result as to below: 

    ===========================================================================================

    U-Boot 2017.01-00458-ga0c95a6-dirty (Oct 02 2018 - 09:56:21 +0800)

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x EVM-SK
    DRAM: 512 MiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: cpsw, usb_ether
    Hit any key to stop autoboot: 0
    ## Error: "findfdt" not defined
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    ## Error: "bootcmd_nand0" not defined
    starting USB...
    USB0: Port not available.
    USB1: Port not available.
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found

    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found

    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    missing environment variable: pxeuuid
    Retrieving file: pxelinux.cfg/01-7c-66-9d-04-c9-9a
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found

    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found

    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/00000000
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found

    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found

    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/0000000
    cpsw Waiting for PHY auto negotiation to complete..

    U-Boot SPL 2017.01-00458-ga0c95a6-dirty (Oct 02 2018 - 09:56:21)
    Trying to boot from MMC2
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Using default environment

    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img


    U-Boot 2017.01-00458-ga0c95a6-dirty (Oct 02 2018 - 09:56:21 +0800)

    CPU : AM335X-GP rev 2.1
    Model: TI AM335x EVM-SK
    DRAM: 512 MiB
    NAND: 0 MiB
    MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Using default environment

    <ethaddr> not set. Validating first E-fuse MAC
    Net: cpsw, usb_ether
    Hit any key to stop autoboot: 0
    ## Error: "findfdt" not defined
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    ## Error: "bootcmd_nand0" not defined
    starting USB...
    USB0: Port not available.
    USB1: Port not available.
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found

    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found

    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    missing environment variable: pxeuuid
    Retrieving file: pxelinux.cfg/01-7c-66-9d-04-c9-9a
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found

    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found

    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/00000000
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found

    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found

    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/0000000
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found

    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found

    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/000000
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found

    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found

    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/00000
    cpsw Waiting for PHY auto negotiation to complete........

    ============================================================================================================

    I don't know what is missing. 

    Does the TI team have any suggestions?

    Thank you.

    BR

    Egbert Liu

  • Egbert,

    So, you have moved beyond your problem with fdisk illustrated above? Can you provide as an attachment a full log of the new flashing procedure where you write the eMMC?

    Is this a custom board or a TI board?

    Can you stop U-Boot at a prompt and provide the output of the "pr" or print env command so that I can see what your environment looks like?

    Thank you.
  • Hi RonB,

    Reply:

    1. So, you have moved beyond your problem with fdisk illustrated above?

    yes, I already fixed it.  

    2. Can you provide as an attachment a full log of the new flashing procedure where you write the eMMC?

    Insert the log file:

    Flash_emmc_process.txt

    3. Is this a custom board or a TI board?

    design the custom board base on reference TI AM335x Starter Kit.

    4. Can you stop U-Boot at a prompt and provide the output of the "pr" or print env command so that I can see what your environment

    looks like?

    000

    distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done

    efi_dtb_prefixes=/ /dtb/ /dtb/current/

    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;

    eth1addr=7c:66:9d:04:c9:9c

    ethact=cpsw

    ethaddr=7c:66:9d:04:c9:9a

    fdt_addr_r=0x88000000

    fdtaddr=0x88000000

    fdtcontroladdr=9df29f18

    fdtfile=am335x-evmsk.dtb

    finduuid=part uuid mmc ${bootpart} uuid

    fit_bootfile=fitImage

    fit_loadaddr=0x87000000

    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}

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

    kernel_addr_r=0x82000000

    load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}

    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; bootm ${loadaddr}#${fdtfile};

    loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}

    loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz

    mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi

    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

    mtdids=nand0=nand.0

    mtdparts=mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)

    nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}

    nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadaddr} - ${fdtaddr}

    nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048

    nandrootfstype=ubifs rootwait=1

    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=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}

    pxefile_addr_r=0x80100000

    ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}

    ramboot=echo Booting from ramdisk ...; run ramargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}

    ramdisk_addr_r=0x88080000

    ramroot=/dev/ram0 rw

    ramrootfstype=ext2

    rdaddr=0x88080000

    rootpath=/export/rootfs

    scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;

    scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done

    scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile

    scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi

    scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done

    scriptaddr=0x80000000

    soc=am33xx

    spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}

    spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootz ${loadaddr}

    spibusno=0

    spiimgsize=0x362000

    spiroot=/dev/mtdblock4 rw

    spirootfstype=jffs2

    spisrcaddr=0xe0000

    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off

    stderr=serial@44e09000

    stdin=serial@44e09000

    stdout=serial@44e09000

    update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}

    usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi

    usbnet_devaddr=7c:66:9d:04:c9:9a

    vendor=ti

    ver=U-Boot 2017.01-00458-ga0c95a6-dirty (Oct 02 2018 - 09:56:21 +0800)

    Environment size: 8716/131068 bytes

    BR

    Egbert Liu

  • Hi Ti Team,

    Is there any update about this project issue?

    I suddenly thought of a problem.

    if I flash to emmc by SD before , Whether the .h file under uboot needs to be modified into emmc boot address first.

    Where can I find key places to make changes?

    Thanks


    BR
    Egbert Liu
  • Egbert,

    Can you please stop U-Boot at a prompt to stop Autoboot and use the "mmc" commands to see what the board is listing?

    Please provide the output of the "mmc info" command from U-Boot, for example.

    You can use the environment to switch MMC devices, no reason to change the header files.
  • Hi RonB,

    pleaase refer below information for mmc command

    pri  list 
    ===================================================================================================================================================================================================================================
    arch=arm
    args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype}
    autoload=no
    baudrate=115200
    board=am335x
    board_name=A335X_SK
    board_rev=1.2B
    board_serial=54124P199187
    boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
    boot_efi_binary=load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi
    boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}extlinux/extlinux.conf
    boot_fdt=try
    boot_fit=0
    boot_net_usb_start=usb start
    boot_prefixes=/ /boot/
    boot_script_dhcp=boot.scr.uimg
    boot_scripts=boot.scr.uimg boot.scr
    boot_targets=mmc0 legacy_mmc0 mmc1 legacy_mmc1 nand0 pxe dhcp
    bootargs=console=ttyO0,115200n8 root=/dev/nfs nfsroot=:/export/rootfs,nolock rw ip=dhcp
    bootcmd=if test ${boot_fit} -eq 1; then run update_to_fit;fi;run findfdt; run init_console; run envboot; run distro_bootcmd
    bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXEClient:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfile;setenv efi_old_arch;setenv efi_old_vci;
    bootcmd_legacy_mmc0=setenv mmcdev 0; setenv bootpart 0:2 ; run mmcboot
    bootcmd_legacy_mmc1=setenv mmcdev 1; setenv bootpart 1:2 ; run mmcboot
    bootcmd_mmc0=setenv devnum 0; run mmc_boot
    bootcmd_mmc1=setenv devnum 1; run mmc_boot
    bootcmd_nand=run nandboot
    bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi
    bootcount=1
    bootdelay=2
    bootdir=/boot
    bootenvfile=uEnv.txt
    bootfile=zImage
    bootm_size=0x10000000
    bootpart=1:2
    bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr}
    console=ttyO0,115200n8
    cpu=armv7
    devnum=0
    devtype=mmc
    dfu_alt_info_emmc=rawemmc raw 0 3751936
    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 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_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;u-boot-spl-os part 0 6;kernel part 0 8;rootfs part 0 9
    dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000
    distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
    efi_dtb_prefixes=/ /dtb/ /dtb/current/
    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;
    eth1addr=7c:66:9d:04:c9:9c
    ethact=cpsw
    ethaddr=7c:66:9d:04:c9:9a
    fdt_addr_r=0x88000000
    fdtaddr=0x88000000
    fdtcontroladdr=9df29f18
    fdtfile=am335x-evmsk.dtb
    finduuid=part uuid mmc ${bootpart} uuid
    fit_bootfile=fitImage
    fit_loadaddr=0x87000000
    importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize}
    init_console=if test $board_name = A335_ICE; then setenv console ttyO3,115200n8;else setenv console ttyO0,115200n8;fi;
    kernel_addr_r=0x82000000
    load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile}
    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; bootm ${loadaddr}#${fdtfile};
    loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
    mmc_boot=if mmc dev ${devnum}; then setenv devtype mmc; run scan_dev_for_boot_part; fi
    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
    mtdids=nand0=nand.0
    mtdparts=mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)
    nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}
    nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadaddr} - ${fdtaddr}
    nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048
    nandrootfstype=ubifs rootwait=1
    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=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs}
    pxefile_addr_r=0x80100000
    ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
    ramboot=echo Booting from ramdisk ...; run ramargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}
    ramdisk_addr_r=0x88080000
    ramroot=/dev/ram0 rw
    ramrootfstype=ext2
    rdaddr=0x88080000
    rootpath=/export/rootfs
    scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi;
    scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
    scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile
    scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}extlinux/extlinux.conf; then echo Found ${prefix}extlinux/extlinux.conf; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
    scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
    scriptaddr=0x80000000
    soc=am33xx
    spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
    spiboot=echo Booting from spi ...; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootz ${loadaddr}
    spibusno=0
    spiimgsize=0x362000
    spiroot=/dev/mtdblock4 rw
    spirootfstype=jffs2
    spisrcaddr=0xe0000
    static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
    stderr=serial@44e09000
    stdin=serial@44e09000
    stdout=serial@44e09000
    update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}
    usb_boot=usb start; if usb dev ${devnum}; then setenv devtype usb; run scan_dev_for_boot_part; fi
    usbnet_devaddr=7c:66:9d:04:c9:9a
    vendor=ti
    ver=U-Boot 2017.01-00458-ga0c95a6-dirty (Oct 02 2018 - 09:56:21 +0800)
    
    Environment size: 8743/131068 bytes
    
    U-Boot SPL 2017.01-00458-ga0c95a6-dirty (Oct 02 2018 - 09:56:21)
    Trying to boot from MMC2
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Using default environment
    
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    
    
    U-Boot 2017.01-00458-ga0c95a6-dirty (Oct 02 2018 - 09:56:21 +0800)
    
    CPU  : AM335X-GP rev 2.1
    Model: TI AM335x EVM-SK
    DRAM:  512 MiB
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    Card did not respond to voltage select!
    ** Bad device mmc 0 **
    Using default environment
    
    <ethaddr> not set. Validating first E-fuse MAC
    Net:   cpsw, usb_ether
    Hit any key to stop autoboot:  0
    ## Error: "findfdt" not defined
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    Card did not respond to voltage select!
    ## Error: "bootcmd_nand0" not defined
    starting USB...
    USB0:   Port not available.
    USB1:   Port not available.
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    missing environment variable: pxeuuid
    Retrieving file: pxelinux.cfg/01-7c-66-9d-04-c9-9a
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/00000000
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/0000000
    cpsw Waiting for PHY auto negotiation to complete..user interrupt!
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/000000
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/00000
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/0000
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/000
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/00
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/0
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/default-arm-am33xx
    cpsw Waiting for PHY auto negotiation to complete..user interrupt!
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/default-arm
    cpsw Waiting for PHY auto negotiation to complete.user interrupt!
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Retrieving file: pxelinux.cfg/default
    cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT !
    ERROR: No USB device found
    
    at drivers/usb/gadget/ether.c:2349/dm_usb_init()
    ERROR: USB ether not found
    
    at drivers/usb/gadget/ether.c:2368/_usb_eth_init()
    Config file not found
    

    BR

    Egbert Liu

  • Egbert,

    Could you actually run a few of the commands like "mmc part" and "mmc info" and "mmc list", and provide the output of them? Thank you.
  • Hi Rob,

    I follow your rule to screenshot  MMC info picture :

    but I current status emmc boot on cannot find kernel space, I don`t know why?

    I urgently need to know the location of the relevant files in the CODE, for example: u-boot/include/configs / am335x_evm.h

    This problem has deviated from the direction and has been tested and verify many steps, but it is still unable to find the key points of the problem. Can you tell me directly the question?

    Thank you 

    BR

    Egbert Liu

  • Egbert,

    The output of "mmc part" and "mmc list" would still be very useful. Can you please provide these?

    It appears that U-Boot cannot find your eMMC device. You said you are using the pre-built files with a custom board. This will only work if the boards are identical for these interfaces. Is that true?

    More than likely you need to change U-Boot to account for the differences between your board and the SK. For example, do you have the eMMC hooked up to the same MMC port as the SK? If not, this will need to be changed.

    The changes you might need to make will be dependent on this information and will help me guide you in possible changes needed.
  • Hi RonB,

    I already to fix this issue. Thank you

    Because I can't wait for the project, so I post related topics in this forum and get answer.

    reference link: e2e.ti.com/.../744141


    BR
    Egbert Liu
  • Egbert,

    Great, I'm glad Kemal was able to help you. Thanks for providing the link. It seems that switching to the latest SDK was key as well as working out some environment details for your configuration.

    Thank you!