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.

creating ubifs filesystem

Guru 20755 points

Hello,

I had an issue with jffs filesystem, therefore I am trying to move to ubifs. I am using DM8148 with RDK 4.1.0.2.

When using the prebuilt ubifs, the kernel boot fine. The next try was to compile the target filesystem for ubifs. 
At first I had an issue when compiling ubifs : make ubifs_128 which failed with the given mtdutils. I then compiled mtd utils for my host. I suspect that maybe my mtdutils is still does not match something

it compiles without error, but after programming and booting it fails to recognize ubifs

please advise,

Thansk,

Ran

  • Ran,

    I am using EZSDK and I create UBIFS as follows:

    pbotev@pbotev:~/mtd$ mkfs.ubifs -r ~/workdir/aragofs/ -m 2048 -e 126976 -c 1601 -o ubifs.img

    pbotev@pbotev:~/mtd$ cat ubinize.cfg
    [ubifs]
        mode=ubi
        image=ubifs.img
        vol_id=0
        vol_size=160MiB
        vol_type=dynamic
        vol_name=rootfs
        vol_flags=autoresize

    pbotev@pbotev:~/mtd$ ubinize -o ubi.img -m 2048 -p 128KiB -s 2048 ubinize.cfg

    See my whole process in the below e2e post. I think for DVR RDK should be similar. Make sure you are using the latest version of the linux kernel and u-boot:

    http://arago-project.org/git/projects/?p=linux-dvr-rdk-dm81xx.git;a=shortlog;h=refs/heads/dvrrdk_kernel_int_branch

    http://arago-project.org/git/projects/?p=u-boot-dvr-rdk-dm81xx.git;a=shortlog;h=refs/heads/dvrrdk_uboot_int_branch

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/377262/1328376.aspx#1328376

    Regards,
    Pavel

  • Hi Pavel,

    Thanks very much.

    I manage doing the above, when I installed again on ubuntu 10.04 the mtd-utils (not compiling them myself, but just with get-install mtd-utils)
    The only thing is that we are programming all binraies in u-boot and I find in TI's wiki

    http://processors.wiki.ti.com/index.php/UBIFS_Support

    instruction to use -F option with mkfs.ubifs, while the version I installed from net, unfortunately does not support this option. I am afraid that it might be important.
    I do manage to boot now, but I see in 2nd boot that it did not find the ubifs.

    Thanks,

    Ran

  • Ran,

    Ran S. said:
    instruction to use -F option with mkfs.ubifs

    I am not using this -F option with mkfs.ubifs, and ubifs is working fine. This is my mkfs.ubifs command:

    pbotev@pbotev:~/mtd$ mkfs.ubifs -r ~/workdir/aragofs/ -m 2048 -e 126976 -c 1601 -o ubifs.img

    I also have Ubuntu 10.04 and I also do not have the -F option in the mtd-utils.

    I found several examples where -F option is not used (at least for EZSDK):

    http://processors.wiki.ti.com/index.php/EZSDK_Using_data_on_SD_and_filesystem_on_NAND

    http://processors.wiki.ti.com/index.php/EZSDK_Fast_Boot_Streaming_Video

    I can also find example where -F option is used:

    http://processors.wiki.ti.com/index.php/TI811x_UBIFS_Support

    http://processors.wiki.ti.com/index.php/TI-Android-JB-4.2.2-DevKit-4.1.1_DeveloperGuide

    I found one e2e thread with UBIFS, DVR RDK and Ubuntu 10.04, and no -F option is used:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/289282.aspx

    BR
    Pavel

  • Hi Pavel,

    After doing: "nand scrub", and programming the ubi image, it works OK. 

    I've managed to compile mtd-utils 1.5.0 version, and work with -F option, and use that version too (but only after the nand scrub).

    The only disadvantage I can see with this, is that whenever we'll need to update the filesystem image, we will need to do nand scrub, otherwise, the ubi is not detected in boot.

    Thanks,

    Ran

  • Hi Ran,

    Can you try this, and see if  your issues get fixed,

    $ flash_erase /dev/mtd4 0 0
    $ ubiattach /dev/ubi_ctrl -m 4
    $ ubimkvol /dev/ubi0 -N rootfs -m

    $ mkdir /mnt/nand
    $ mount -t ubifs ubi0:rootfs /mnt/nand
    $ tar xvf rootfs.tar.gz -C /mnt/nand

    Thanks,

    --Prabhakar Lad