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.

Can I change Ubifs Files in uboot?

Hi Community,

Im working on K2K EVM(4arm+8dsp). I have 4 different arm loads & 8 different dsp loads. I can write this loads on NAND Flash and copy to RAM when uboot start.

I seperate NAND 8x8Mb area in my mind. Core0's load flashed "0x800000-0x1000000", core1's load flashed "0x1000000-0x1800000" ... core11's load flashed "0x6000000-0x6800000". This is an unpractical way to save loads in memory. Because if core0 loads bigger than 8Mb, i will shift all core load's areas.

I wonder if i use ubifs filesystem for these loads?  For example, i seperate 80Mb area for all loads from ubifs, flashed all loads to this filesystem. So i can use this loads with "ubifsload ${addr_load_core0} ${name_load_core0}".

This seems usefully to me. Because i dont waste 8Mb area for 5,6 Mb loads, and dont suffer for 10,12Mb loads. I create 80Mb for all loads, so if core load bigger than 8Mb, it wont be a problem. and i dont need to know what the nand offset is for all cores.

I use "ubifsls" command in uboot promp and see bin files below. How can i flashed my own loads into ubifs? How can i replace my own loads with these belows? I couldnt find any related document.

41542 Tue Aug 05 17:17:21 2014      uImage-k2l-evm.dtb
45056 Tue Aug 05 18:08:38 2014      skern-k2l-evm.bin
39238 Tue Aug 05 17:16:08 2014      uImage-k2e-evm.dtb
3866448 Tue Aug 05 17:17:21 2014 uImage-keystone-evm.bin
45056 Tue Aug 05 17:38:08 2014      skern-k2hk-evm.bin
45056 Tue Aug 05 17:53:11 2014      skern-k2e-evm.bin
50892 Tue Aug 05 17:14:56 2014      uImage-k2hk-evm.dtb
28 Tue Aug 05 18:08:38 2014             securedb.key.bin

Best Regards,

Srt

  • Hi Srt,

    Please refer below post from "Titus" that would help to create your own UBIFS.

    https://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/466318/1674083#1674083

    Also we support only SMP Linux on ARM cores and recommend you to post device/MCSDK related queries on this forum for appropriate and faster response.

    http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Exploring#Calculations

    Thank you.

  • Hi Raja,

    I read "Titus"s post. I understand that, if i want to use filesystem with own specific files, i have to rebuild it with changing inside of  "ubinize_k2e-evm.cfg" and build the "k2e-evm-ubifs.ubi".

    When i want to update own specific files, i have to change "ubinize_k2e-evm.cfg" and rebuild the "k2e-evm-ubifs.ubi" with new specific files. I cant just update files with uboot commands, Is that right?

    Is There any filesystem which let changing files with uboot commands?

    Best Regards,

    Srt

  • Hi Srt,

    When i want to update own specific files, i have to change "ubinize_k2e-evm.cfg" and rebuild the "k2e-evm-ubifs.ubi" with new specific files. I cant just update files with uboot commands, Is that right?

    Yes.

    Is There any filesystem which let changing files with uboot commands?

    I am not aware of u-boot command to update ubifs. Also, i recommend you to use Network file system for development where frequent changes of images required. On the field or final testing can be done using ubifs after the system is stabilized.

    Thank you.

  • Dear Srt,

    Yes, you can update/modify the ubifs boot binaries (kernel image, boot monitor and dtb) at u-boot and Linux.

    processors.wiki.ti.com/.../MCSDK_UG_Chapter_Exploring

    In u-boot, you can update the boot ubifs folder which has dtb, kernel image and boot monitor.

    At u-boot:

    Rebuild DTB and create a boot ubifs image (keystone-evm-boot.ubifs) using the new DTBas described at the end of the section creating boot ubifs. Then remove and create a new boot volume on UBI from u-boot using following commands

    u-boot# dhcp ${addr_file} ${tftp_root}/keystone-evm-boot.ubifs
    u-boot# ubi part ubifs
    u-boot# ubifsmount boot
    u-boot# ubi remove boot
    u-boot# ubi create boot [size in hex of the ubifs image]
    u-boot# ubi write $addr_file} boot [size in hex of the ubifs image]


    In Linux, you can update the boot ubifs files which has dtb, kernel image and boot monitor.

    At Linux:

    processors.wiki.ti.com/.../MCSDK_UG_Chapter_Exploring

    root@keystone-evm:~# mkdir /mnt/boot
    root@keystone-evm:~# mount -t ubifs ubi0_0 /mnt/boot


    root@keystone-evm:~# root@keystone-evm:~# cd /mnt/boot
    root@keystone-evm:/mnt/boot# ls
    uImage-k2hk-evm.dtb uImage-keystone-evm.bin skern-keystone-evm.bin

    root@keystone-evm:/mnt/boot# rm uImage-k2hk-evm.dtb

    root@keystone-evm:/# umount /mnt/boot
  • Updated my above post. Thank you Titus for pointing out the ubifs commands on u-boot.