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.

the question of emmc flash on sdk 7.0

Hi,everyone:

      These days,i want to make the sdk_7.0's emmc flash.According to

 http://processors.wiki.ti.com/index.php/Sitara_Linux_Program_the_eMMC_on_Beaglebone_Black,

and i have finished all the settings follow that document,but failed,that log  is:

TFTP from server 192.168.100.1; our IP address is 192.168.100.2
Filename 'u-boot-restore.img'.
Load address: 0x807fffc0
Loading: ###########################
785.2 KiB/s
done
Bytes transferred = 390016 (5f380 hex)


U-Boot 2013.10-00189-g78d8ebd-dirty (Jan 19 2015 - 10:22:35)

I2C: ready
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Error - No Valid Environment Area found
*** Warning - bad CRC, using default environment

Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
mmc0(part 0) is current device
Scanning mmc 0...
Card did not respond to voltage select!
** Bad device mmc 0 **
Card did not respond to voltage select!
mmc0(part 0) is current device
Card did not respond to voltage select!
mmc1(part 0) is current device
SD/MMC found on device 1
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
** No partition table - mmc 1 **
Booting from nand ...

no devices available

no devices available
Bad Linux ARM zImage magic!

please help me.

  • Hi,

    I doubt that you've built your u-boot with the wrong config file and therefore your environment is not set properly.

    Can you try the following steps to see if there is any change:

    Use the steps described here:    http://processors.wiki.ti.com/index.php/Sitara_Linux_Program_the_eMMC_on_Beaglebone_Black#Preparing_the_Images_to_be_Flashed

       cd ~/ti-sdk-am335x-evm-07.00.00.00/board-support/u-boot-2013.10-ti2013.12.01

       Any git magic you choose to do:

       git branch emmc

       git checkout emmc  

       Note that this adds configurations in your am335x_evm.h file in include/configs... check the differences.

    2. Build U-Boot to create the U-Boot portion of the image to be flashed.

       Make sure your toolchain is properly exported:

       export PATH="~/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin":$PATH

       use these these additional steps before building u-boot image:

      export CROSS_COMPILE=arm-linux-gnueabihf-

      export ARCH=arm

      make am335x_evm_config

    Continue with building the u-boot as described in the wiki:

       build U-Boot:

       make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=emmc am335x_boneblack

       Note:The O=emmc option will put the files created by this build in a emmc directory to keep them separate from the other files you might be using.  

    Also note that you may skip ARCH=arm & CROSS_COMPILE=arm-linux-gneabihf- in the above make command.

    Hope this helps.

    Best Regards,

    Yordan

  • Thank you Yordan!
    I have tried all follow your steps,but it also failed,it has the same log.
  • Hi Yordan!
    These is my uboot parameter:
    arch=arm
    baudrate=115200
    board=am335x
    board_name=A335BNLT
    board_rev=00C0
    boot_fdt=try
    boot_targets= mmc0 nand
    bootargs=console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=NAND.file-system,204 8 rootfstype=ubifs rootwait=1
    bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
    bootcmd_mmc0=setenv devnum 0; setenv rootpart 2; run mmc_boot;
    bootcmd_nand=run nandboot;
    bootcmd_tftp=run tftpboot;
    bootcmd_usb=setenv devnum 0; run usb_boot;
    bootdelay=3
    bootdir=/boot
    bootenv=uEnv.txt
    bootfile=zImage
    bootpart=1:2
    console=ttyO0,115200n8
    cpu=armv7
    devnum=0
    devtype=mmc
    dfu_alt_info_emmc=rawemmc mmc 0 3751936
    dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw mmc 100 100;u -boot.img.raw mmc 300 400;spl-os-args.raw mmc 80 80;spl-os-image.raw mmc 900 200 0;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=NAND.SPL part 0 1;NAND.SPL.backup1 part 0 2;NAND.SPL.backup2 p art 0 3;NAND.SPL.backup3 part 0 4;NAND.u-boot-spl-os part 0 5;NAND.u-boot part 0 6;NAND.u-boot-env part 0 7;NAND.u-boot-env.backup1 part 0 8;NAND.kernel part 0 9;NAND.rootfs part 0 10
    dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdi sk ram 0x81000000 0x4000000
    eth1addr=78:a5:04:dd:29:21
    ethact=cpsw
    ethaddr=78:a5:04:dd:29:1f
    fdt_high=0xa0000000
    fdtaddr=0x80F80000
    fdtfile=undefined
    findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack.dtb; fi; i f test $board_name = A33515BB; then setenv fdtfile am335x-evm.dtb; fi; if test $ board_name = A335X_SK; then setenv fdtfile am335x-evmsk.dtb; fi; if test $fdtfil e = undefined; then echo WARNING: Could not determine device tree to use; fi;
    importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $ filesize
    loadaddr=0x80200000
    loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
    loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
    loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
    mmc_boot=setenv devtype mmc; if mmc dev ${devnum}; then run mmcargs;run scan_boo t; run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; run mmcboot;fi
    mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot} rootfstype =${mmcrootfstype}
    mmcboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmc dev};if run loadbootenv; then echo Loaded environment from ${bootenv};run import bootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadimage; then run mmcloados;fi;fi;
    mmcdev=1
    mmcloados=run mmcargs; 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;
    mmcroot=/dev/mmcblk0p2 ro
    mmcrootfstype=ext4 rootwait
    mtdids=nand0=nand.0
    mtdparts=mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.bac kup2),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.rootfs)
    nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfsty pe=${nandrootfstype}
    nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-b oot-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=${se rverip}:${rootpath},${nfsopts} rw ip=dhcp
    netboot=echo Booting from network ...; setenv autoload no; dhcp; tftp ${loadaddr } ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fd taddr}
    nfsopts=nolock
    partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_ gpt_rootfs}
    ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype =${ramrootfstype}
    ramboot=echo Booting from ramdisk ...; run ramargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}
    ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
    ramrootfstype=ext2
    rdaddr=0x81000000
    rootpart=2
    rootpath=/export/rootfs
    scan_boot=echo Scanning ${devtype} ${devnum}...; for prefix in ${bootdir}; do fo r script in ${bootfile}; do run script_boot; done; done;
    script_boot=if load ${devtype} ${devnum}:${rootpart} ${loadaddr} ${bootdir}/${bo otfile}; then run findfdt; load ${devtype} ${devnum}:${rootpart} ${fdtaddr} ${bo otdir}/${fdtfile};fi;
    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
    stdin=serial
    stdout=serial
    tftpargs=setenv bootargs console=${console} rootfstype=ramfs
    tftpboot=echo Boot from TFTP...; setenv ethact usb_ether; dhcp; tftp ${fdtaddr} am335x-boneblack.dtb; run tftpargs; bootz ${loadaddr} - ${fdtaddr}
    usb_boot=setenv devtype usb; run usb_init; if usb dev 0; then run usbargs;run sc an_boot; bootz ${loadaddr} - ${fdtaddr}; fi
    usb_init=usb start 0;
    usbargs=setenv bootargs console=${console} ${optargs} root=${usbroot} rootfstype =${usbrootfstype}
    usbnet_devaddr=78:a5:04:dd:29:21
    usbroot=/dev/sda2 rw
    usbrootfstype=ext4 rootwait
    vendor=ti
    ver=U-Boot 2013.10-00189-g78d8ebd-dirty (Jan 19 2015 - 10:22:35)


    I want to know how to set my boot_targets as emmc?
  • Hi,

    Your environment seems correct.  I think the problem may be in building the u-boot correctly.

    Have you built the flasher image (http://processors.wiki.ti.com/index.php/Sitara_Linux_Program_the_eMMC_on_Beaglebone_Black#Preparing_the_Flasher_Image), which you should download to your device?

    If you've successfully built & flashed all needed images described here: http://processors.wiki.ti.com/index.php/Sitara_Linux_Program_the_eMMC_on_Beaglebone_Black#Gather_Files_and_Transfer_to_Host_PC

    Have you tried the following workaround:
      1. Remove power from the board (the sysboot pins that change the boot order are only sampled at power on).
      2. Stop at u-boot
      3. Execute
               setenv devnum 1
               saveenv
      4. Boot with:
           run mmc_boot

    Best Regards,
    Yordan

  • Hi Yordan,

          Thank you so much,i have finished that.

  • Hello, Could you elaborate about your final solution?

    Thanks