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.

[FAQ] TDA4VM: Update SD card over the air - PSDK RTOS+Linux

Part Number: TDA4VM

Hi,

I'm working with TDA4VM and I'm booting from SD card. Would like to keep this way, but also would like to be able to occasionally update FW on the board without having to remove the SD card.

I know during development we can use NFS. But this board will be sent to a remote location and would like to develop a way in which we can update the FW once over network connection (not necessarily NFS) and then always have it boot from SD card using that update.

Basically there would be 2 scenarios:

1. Normal operation booting from SD card

2. Somehow update SD card contents over network once there is FW update. Then go back to normal operation.

Is there any method to do this?

Thanks,

David

  • Hi David,

    I just tried one way & this should be possible. If there is network then you can always use tftpboot.

    If no network you can use UART to load the changed boot loader binaries to RAM.

    For example:

    Boot to u-boot prompt. Then on U-boot prompt enter command loady. You will see something like below:

    Then transfer your new binaries using the YMODEM interface in Teraterm:


    You should pick your binary and send:

    It will take some time and it completes.

    ## Ready for binary (ymodem) download to 0x82000000 at 115200 bps...
    CCxyzModem - CRC mode, 1(SOH)/1029(STX)/0(CAN) packets, 5 retries
    ## Total Size = 0x00101378 = 1053560 Bytes

    The Binary would be loaded to ${loadaddr}.

    You can just verify by doing:

    md ${loadaddr}

    Now we have the new u-boot.img in RAM at location ${loadaddr} need to write a file to FAT i.e the boot partition of SD card using:

    fatwrite mmc 1 ${loadaddr} u-boot.img 101378

    Note; The size should always be given in Hex. U-boot takes size in hex so i am using 101378 in hex instead of 1053560  in decimal.

    Similar approach can be used to update any binary on the SD card.

    If no other questions please click on verify answer.


    Best Regards,
    Keerthy

  • Hi Keerthy,

    This seems to be useful. Although I just realized the only section that I would be updating constantly is the vision apps outputs.

    Right now to do this I compile vision apps and then do "make linux_fs_install_sd". From what I see it seems it is mostly copying compiled outputs into the SD file system.

    Is this something that could be done simply over ssh/scp?

    Where can I find what "make linux_fs_install_sd" is doing?

  • Is this something that could be done simply over ssh/scp?

    Yes. That could be done over the network.


    Where can I find what "make linux_fs_install_sd" is doing?

    $PSDKRA_PATH/vision_apps

    File: makerules/makefile_linux_arm.mak

    If no other questions please click on verify answer.

    Best Regards,
    Keerthy

  • HI Keerthy,

    Thanks, I modified makefile_linux_arm.mak to do the same steps as "make linux_fs_install_sd" but installing the filesystem on a mounted filesystem over ssh directly from the evm.

    Is a bit slow but works for what we need.

    Thanks!