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.
Hi..
i am facing some problem in creating UBIFS image, please anybody help me.
i am issuing following command to create UBIFS image
mkfs.ubifs -r /srikanta/ezsdk/ti-ezsdk_dm816x-evm_5_05_02_00/filesystem/target_fs_ubifs -m 4096 -e 512KiB -c 2048 -o /tftpbootubifs/ubifs.img
i am getting the following error: output file cannot be in the UBIFS root directory.
i have extracted the "ezsdk-dm816x-evm-rootfs.tar " file in "target_fs_ubifs" folder.
can anybody please help me to solve this issue. Since i am new to linux can you please be some elaborate on explaining.
Hi,
Can you try the same command using "sudo" in front of it?
Best regards,
Miroslav
hi... i tried yours but then also same error..
now iam getting the new error like "failed to open the file /......../sbin/mount.nfs
Did you get both errors with the sudo command or did you do something different to get the second error?
What command caused the second error?
Best regards,
Miroslav
Hi.. i tried different command and i got that error. Actually i was creating the ubifs.img in the same direcory where i have installed the rootfs. Now i created a new directory and i gave the path to the new directory.
I am able to create the ubifs.img in the destnation, but with the error saying "
"failed to open the file /srikanta/ezsdk/ti-ezsdk_dm816x-evm_5_05_02_00/filesystem/target_fs_ubifs/sbin/mount.nfs"
Please check if this file exists and also check it's permissions and owner.
Best regards,
Miroslav
hi..
i checked that file exists, and in the permissions it t is like Owner: root access: read only.
Owner: group access:no access
Owner:others access:no access
you tell me one more thing, what is the volume size i need to give in ubifs.cfg file
-m 4096 -e 512KiB -c 2048 and also
image=ubifs.img <== Source image
vol_id=0 <== Volume ID in UBI image
vol_size=----( <== Volume size????????????????????????????
vol_type=dynamic <== Allow for dynamic resize
vol_name=rootfs <== Volume name
vol_flags=autoresize
The file should be accessible with the "sudo" command.
Srikanta G C said:you tell me one more thing, what is the volume size i need to give in ubifs.cfg file
Please read this post, where this is explained: http://e2e.ti.com/support/arm/sitara_arm/f/791/p/268305/941327.aspx#941327
Other useful links:
http://processors.wiki.ti.com/index.php/UBIFS_Support#Creating_UBIFS_file_system
http://www.linux-mtd.infradead.org/faq/ubifs.html#L_mkfubifs
Best regards,
Miroslav
Hi.. Miroslav
thank you verry much for the reply, i followed that link and i got what to write in the ubifs.cfg.
I need one more clarification from you can you please verify, what i have calculated is right or not???
I am using MT29F16G08ABACAWP NAND flash chip, with the following parameter in the datasheet.
SLC NAND flash
Page size x8: 4320 bytes (4096 + 224 bytes)
– Block size: 128 pages (512K + 28K bytes)
– Plane size: 2 planes x 2048 blocks per plane
– Device size: 16Gb: 4096 blocks;
32Gb: 8192 blocks; 64Gb: 16,384 block
-m 4096
-e 512KiB
-c 4075
i.e.... SP PEB SIZE = 512KiB
SL LEB SIZE = SP- 2*2KiB =512-4= 508kiB
P Total number of PEBs on the MTD device = 2GiB / 512 kiB = 4096
B Number of PEBs reserved for bad PEB handling 1% of P 41
O The overhead related to storing EC and VID headers in bytes =SP -SL =4KiB
UBI overhead = (B+4)*SP+O*(P-B-4) = (41+4)*512KiB+4kiB(4096-41-4) = 53
this leaves withP-53=4096-53= 4043 PEB's or 2070016KiB
2070016/ SL = 4075 ( -c)
volume size 2070016kiB (2021MiB)
please let me know if i have done any mistake or if i have taken any wrong value from the flash datasheet.
i will be waiting for your reply.
Regards
Srikanta
Hi,
The LEB size (SL) is the PEB size minus 2 min. I/O units for overhead = 512K - 2*4K = 504KB
-e should be the LEB size in bytes, so 504*1024 = 516096
Then the overhead (O = SP-SL) becomes 8KB
And once you have these you can recalculate the UBI overhead.
Best regards,
Miroslav