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.

mountting UBIFS issue.

Hello Sir: 

It has created UBIFS image. we used a NAND Flash (Samsung K9F4G08UOD 8bits page size: 2048).

We were using a DVRRDK_2.80.00.10 and TI814X-LINUX-PSP-04.01.00.07 development.

 

This have created a generator rule for UBIFS.

mkfs.ubifs -r dm8148 -F -m 2048 -e 126976 -c 1024 -o ubifs.img

echo "[ubifs]" >  ubicfg.ini

echo "mode=ubi" >> ubicfg.ini

echo "image=ubifs.img" >> ubicfg.ini

echo "vol_id=0" >> ubicfg.ini

echo "vol_type=dynamic" >> ubicfg.ini

echo "vol_name=rootfs" >> ubicfg.ini

ubinize -o dm8148_ubifs -p 128KiB -m 2048 -s 2048 -O 2048 ./ubicfg.ini

U-Boot booting tag:

setenv bootargs 'console=ttyO0,115200n8 rw ubi.mtd=10,2048 rootfstype=ubifs root=ubi0:rootfs mem=128M eth=00:0C:0C:A0:FF:FA earlyprintk notifyk.vpssm3_sva=0xBFD00000'

Kernel MTD partition:

[    1.350000] m25p80 spi1.0: w25x32 (4096 Kbytes)

[    1.360000] Creating 5 MTD partitions on "spi_flash":

[    1.360000] 0x000000000000-0x000000020000 : "U-Boot-min"

[    1.370000] 0x000000020000-0x000000060000 : "U-Boot"

[    1.380000] 0x000000060000-0x000000062000 : "U-Boot Env"

[    1.380000] 0x000000062000-0x0000002e2000 : "Kernel"

[    1.390000] 0x0000002e2000-0x000000400000 : "File System"

[    1.400000] omap2-nand driver initializing

[    1.400000] NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung )

[    1.410000] Creating 8 MTD partitions on "omap2-nand.0":

[    1.410000] 0x000000000000-0x000000020000 : "U-Boot-min"

[    1.420000] 0x000000020000-0x000000260000 : "U-Boot"

[    1.430000] 0x000000260000-0x000000280000 : "U-Boot_Env"

[    1.430000] 0x000000280000-0x000000780000 : "Kernel_Master"

[    1.440000] 0x000000780000-0x000000c80000 : "Kernel_Slave"

[    1.450000] 0x000000c80000-0x000008c80000 : "File_System_Master"

[    1.510000] 0x000008c80000-0x000010c80000 : "File_System_Slave"

[    1.570000] 0x000010c80000-0x000020000000 : "Others"

 

U-Boot wartting to NAND command:

mw.b 0x81000000 0xFF 0x002000000;

tftp 0x81000000 dm8148_ubifs;

nand erase 0x00c80000 0x008000000;

nand write 0x81000000 0x00c80000 ${filesize};

...................................

I don't know I did write to NAND flash. In first booting kernel why are getting  somes messages.

8741.error_log.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[ 1.680000] UBI: attaching mtd10 to ubi0
[ 1.690000] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 1.690000] UBI: logical eraseblock size: 126976 bytes
[ 1.700000] UBI: smallest flash I/O unit: 2048
[ 1.700000] UBI: sub-page size: 512
[ 1.710000] UBI: VID header offset: 2048 (aligned 2048)
[ 1.720000] UBI: data offset: 4096
[ 1.810000] ata1: SATA link down (SStatus 0 SControl 300)
[ 2.780000] UBI: max. sequence number: 0
[ 2.840000] UBI: volume 0 ("rootfs") re-sized from 129 to 1009 LEBs
[ 2.840000] UBI: attached mtd10 to ubi0
[ 2.850000] UBI: MTD device name: "File_System_Master"
[ 2.860000] UBI: MTD device size: 128 MiB
[ 2.860000] UBI: number of good PEBs: 1023
[ 2.870000] UBI: number of bad PEBs: 1
[ 2.870000] UBI: number of corrupted PEBs: 0
[ 2.870000] UBI: max. allowed volumes: 128
[ 2.880000] UBI: wear-leveling threshold: 4096
[ 2.880000] UBI: number of internal volumes: 1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

so I am trying second booting my system and it is show some messages.

4010.error_log_1.txt
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[ 1.340000] ata1: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a150fff] port 0x100 irq 16
[ 1.350000] m25p80 spi1.0: w25x32 (4096 Kbytes)
[ 1.360000] Creating 5 MTD partitions on "spi_flash":
[ 1.360000] 0x000000000000-0x000000020000 : "U-Boot-min"
[ 1.370000] 0x000000020000-0x000000060000 : "U-Boot"
[ 1.380000] 0x000000060000-0x000000062000 : "U-Boot Env"
[ 1.380000] 0x000000062000-0x0000002e2000 : "Kernel"
[ 1.390000] 0x0000002e2000-0x000000400000 : "File System"
[ 1.400000] omap2-nand driver initializing
[ 1.400000] NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung )
[ 1.410000] Creating 8 MTD partitions on "omap2-nand.0":
[ 1.410000] 0x000000000000-0x000000020000 : "U-Boot-min"
[ 1.420000] 0x000000020000-0x000000260000 : "U-Boot"
[ 1.430000] 0x000000260000-0x000000280000 : "U-Boot_Env"
[ 1.430000] 0x000000280000-0x000000780000 : "Kernel_Master"
[ 1.440000] 0x000000780000-0x000000c80000 : "Kernel_Slave"
[ 1.450000] 0x000000c80000-0x000008c80000 : "File_System_Master"
[ 1.510000] 0x000008c80000-0x000010c80000 : "File_System_Slave"
[ 1.570000] 0x000010c80000-0x000020000000 : "Others"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I don't know why happen ?  please told me how to setting U-boot env.

Thank you.

 

 

 

 

 

  • Few things to take care.

    1. Erase the complete partition before writing.

    2. Write the exact file size.

    3. Switch to BCH8 ECC algorithm. 

    These steps will improve the situation, but will not solve it completely. I'm currently looking into it in a latest version of EZSDK.

  • Hello Thomas:

    Thank you for help.

     

    I was trying UBIFS of U-boot with BCH8 ECC algorithm.

    A trying command:

    U-Boot wartting to NAND command:

    mw.b 0x81000000 0xFF 0x002000000;

    tftp 0x81000000 dm8148_ubifs;

    nand erase 0x00c80000 0x008000000;

    nandecc hw 2;  (add BCH8 ECC command)

    nand write 0x81000000 0x00c80000 ${filesize};

     

    8182.bch8_ecc_log.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    [ 1.400000] NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung )
    [ 1.410000] Creating 8 MTD partitions on "omap2-nand.0":
    [ 1.410000] 0x000000000000-0x000000020000 : "U-Boot-min"
    [ 1.420000] 0x000000020000-0x000000260000 : "U-Boot"
    [ 1.430000] 0x000000260000-0x000000280000 : "U-Boot_Env"
    [ 1.430000] 0x000000280000-0x000000780000 : "Kernel_Master"
    [ 1.440000] 0x000000780000-0x000000c80000 : "Kernel_Slave"
    [ 1.450000] 0x000000c80000-0x000008c80000 : "File_System_Master"
    [ 1.510000] 0x000008c80000-0x000010c80000 : "File_System_Slave"
    [ 1.570000] 0x000010c80000-0x000020000000 : "Others"
    [ 1.680000] UBI: attaching mtd10 to ubi0
    [ 1.690000] UBI: physical eraseblock size: 131072 bytes (128 KiB)
    [ 1.690000] UBI: logical eraseblock size: 126976 bytes
    [ 1.700000] UBI: smallest flash I/O unit: 2048
    [ 1.700000] UBI: sub-page size: 512
    [ 1.710000] UBI: VID header offset: 2048 (aligned 2048)
    [ 1.720000] UBI: data offset: 4096
    [ 1.720000] UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
    [ 1.730000] UBI error: ubi_io_read: error -74 (ECC error) while reading 512 bytes from PEB 0:2048, read 512 bytes
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Why is there such a problem with ECC error (e.g. UBI error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes) ?

    My MTD version is 1.5.0.

    I got a ubiformat tool writing to NAND, but it was okay.

    ===============================

    A command:

    flash_eraseall /dev/mtd10

    /usr/sbin/ubiformat /dev/mtd10 -s 2048 -f ./dm8148_ubifs

    ===============================

    I don't know why are different with u-boot command to nand and ubiformat to nand ?

    reference URL:

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

    http://processors.wiki.ti.com/index.php/DM814x_AM387x_PSP_U-Boot

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

     

     

     

     

     

     

  • The BCH8 implementation is wrong. It calculates the ECC wrong. I'm trying to fix it during my free time. Please mail me @ renjith.thomas@pathpartnertech.com, I'll mail you the patch for enabling Hamming code. I'm unable to attach here as my  Silverlight plugin is not working.

  • Thank you. I have sent you an email.