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.

TDA4VM: How to using Uniflash to burn Linux kernel and rootFS into eMMC ON TDA4 Board?

Part Number: TDA4VM
Other Parts Discussed in Thread: UNIFLASH

Hi Many Expert,


Because of some reason, we do not design SDCard interface (slot) on our own board, but we still remain uart(mcu), JTAG, USB interface for feature firmware upgrade.

Our eMMC flash is pure empty , no Partition! so, the only way could be Uniflash.

I try to search answers, this thread could be work ! ( I swap to Uart boot mode do this test! )
e2e.ti.com/.../941068
it cloud burn "tiboot3.bin, tispl.bin and u-boot.img" into eMMC

but how to burning linux kernel & rootFS use the same way? (uniflash)
Could you give us any comment?

BTW,
Are these command necessary in u-boot? because our emmc is empty, no partition
mmc partconf 0 1 1 1
mmc bootbus 0 2 0 0

Many Thanks

  • Hi,

    With UNIFLASH flashing the USER partition (where you will have the file system) is not possible. You can only flash the RAW partition with UNIFLASH.

    Gibbs Shih said:
    we still remain uart(mcu), JTAG, USB interface

    So I'm hoping you could use either of these interface. Let me try to provide you steps, I will try to validate at my end and then send you.

    Also, do you have ethernet?

    Regards,

    Karan

  • Hi, Karan :

    JTAG could be better for this moment, because we do not preserve Ethernet interface.

    we need try to make some hardware modification on our board to let Ethernet works, and we still debugging .... @@!

    by the way, I also try to search Q&A threads : 

    Is it possible burn Kernel & rootFS into emmc from plug-in USB disk in u-boot mode? 

    Many Thanks :)

    Gibbs

  • Hi Gibbs,

    There are some instructions at https://e2e.ti.com/support/processors/f/791/p/898360/3322707#3322707 which talk about this method. So essentially you load the filesystem (which has the kernel image) in the RAM from JTAG and then from u-boot you flash from the RAM to eMMC.

    But with JTAG, the speed to load to the RAM is quite slow. I would suggest to flash a minimal file system using the above approach.

    Regards,

    Karan

  • Hi Gibbs,

    I would suggest try to boot to kernel using a tiny file system.

    1. Create the tisdk-tiny-image.tar.xz (You can take the attached tar ball I generated and skip to Step2)

    git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
    cd tisdk/
     
    # Copy config file from the 7.00 installer yocto-build/configs/psdkla/psdkla-07_00_00.txt
    ./oe-layertool-setup.sh -f psdkla-07_00_00.txt
     
    # export proxy
    export ftp_proxy=http://webproxy.ext.ti.com:80
    export http_proxy=http://webproxy.ext.ti.com:80
    export https_proxy=http://webproxy.ext.ti.com:80
     
    cd build
    # Edit config file if you want to reuse downloads folder
    vi conf/local.conf
    . conf/setenv
     
    # this is the path to the toolchains for ARMv7 and ARMv8
    TOOLCHAIN_BASE=/sdk/tools MACHINE=j7-evm bitbake -k tisdk-tiny-image
     
    # build image can be found here
    la -la tisdk/build/arago-tmp-external-arm-glibc/deploy/images/j7-evm/tisdk-tiny-image-j7-evm.tar.xz

    To save this time, I'm attaching an image I built - /cfs-file/__key/communityserver-discussions-components-files/791/tisdk_2D00_tiny_2D00_image_2D00_j7_2D00_evm.tar.xz

    2. Create the tisdk-tiny-image.img

    # Below code needs to run on the HOST machine
     
    # Create an empty image file. 100MB should be enough for the image I shared.
    dd if=/dev/null of=tisdk-tiny-image.img bs=1M seek=100
     
    # Add a filesystem to it
    mkfs.ext4 -F tisdk-tiny-image.img
     
    # Mount it on your local machine to copy DTB and Kernel image
    mkdir example_mnt_pt
    sudo mount -t ext4 -o loop tisdk-tiny-image.img /home/karan/yocto-build/example_mnt_pt
     
    # Untar tisdk-tiny-image-j7-evm.tar.xz on the mounted file system which is currently empty
    cd example_mnt_pt
    sudo tar xvf ../tisdk-tiny-image-j7-evm.tar.xz
     
    # Copy DTB, DTBOs and Kernel Image for your platform. Without this the board won't boot!!
    sudo cp /media/karan/rootfs/boot/Image* example_mnt_pt/boot
    sudo cp /media/karan/rootfs/boot/*dtb* example_mnt_pt/boot
    sync
     
    # Unmount the image, now the tisdk-tiny-image.img is ready
    cd ../
    sudo umount /home/karan/yocto-build/example_mnt_pt

    3. Use dfu-util / JTAG to flash the file system to eMMC User partition (attaching steps for DFU boot) - takes around 15mins for the image I attached.

    You can also look at https://e2e.ti.com/support/processors/f/791/p/898360/3322707#3322707 in case you want to flash using JTAG (this will be slower)

    • Connect Host PC to the MAIN UART of the board and connect minicom to the first instance
    • Connect the USB Type C cable to the Host PC (Linux)
    • Change boot mode to DFU boot mode
    • Run the below on HOST (LINUX machine) and TARGET (EVM)
    # This will download the images but now flash then to eMMC
    HOST $ sudo dfu-util -l
    HOST $ sudo dfu util -R -a bootloader -D <PATH_TO_BIN>/tiboot3.bin
    HOST $ sudo dfu-util -R -a sysfw.itb -D <PATH_TO_BIN>/sysfw.itb
    HOST $ sudo dfu-util -R -a tispl.bin -D <PATH_TO_BIN>/tispl.bin
    HOST $ sudo dfu-util -R -a u-boot.img -D <PATH_TO_BIN>/u-boot.img
     
    # At this point, the u-boot will start executing. Halt at the u-boot prompt (u-boot logs will appear on the MAIN UART 1st instance)
    TARGET => env default -f -a
    TARGET => setenv mmcdev 0
    TARGET => setenv bootpart 0
    TARGET => saveenv
    TARGET => setenv dfu_alt_info ${dfu_alt_info_emmc}
     
    # one time only per board
    TARGET => gpt write mmc 0 ${partitions}
     
    TARGET => dfu 0 mmc 0
     
    # Flashing a tiny file system to eMMC User partition
    HOST $ sudo dfu-util -l
    HOST $ sudo dfu-util -a rootfs -D <PATH_TO_CREATED_TINYFS>/tisdk-tiny-image.img
     
    #one time only per board, to give ROM access to the boot partition, the following commands must be used for the first time
    TARGET => mmc partconf 0 1 1 1
    TARGET => mmc bootbus 0 2 0 0
    
    # Boot the board
    TARGET => boot

    4. Change bootmode to eMMC (boot) and boot the board.

    Regards,

    Karan

  • This way should be works, I will follow steps try it again

    Karan, Thanks :)

  • Hi Karan, 

         According to the attached steps , we halt at the below:

    TARGET => dfu 0 mmc 0
     
    Regards,
    Cuiqin
  • The next instruction should be executed on the HOST, please see the next set of instructions.

  • Hi Karthik,

        The next set is ok. Thanks for your reply.

    Regards,

    Cuiqin