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.

AM37xx ti-sdk-beagleboard-06.00.00.00 Nand Flashing Issue

Hi All,

I am trying to flashing the sdk 06,00,00 images to Beagleboard xm based custom board.

Getting errors while loading the file system partition. 

[ 1.060333] NAND device: Manufacturer ID: 0xad, Chip ID: 0xbc (Hynix NAND 512MiB 1,8V 16-bit)
[ 1.070220] Creating 5 MTD partitions on "omap2-nand.0":
[ 1.075836] 0x000000000000-0x000000080000 : "X-Loader"
[ 1.082733] 0x000000080000-0x000000260000 : "U-Boot"
[ 1.089843] 0x000000260000-0x000000280000 : "U-Boot Env"
[ 1.096710] 0x000000280000-0x000000680000 : "Kernel"
[ 1.104583] 0x000000680000-0x000020000000 : "File System"
[ 1.290527] UBI: attaching mtd4 to ubi0
[ 1.294586] UBI: physical eraseblock size: 131072 bytes (128 KiB)
[ 1.301177] UBI: logical eraseblock size: 129024 bytes
[ 1.306854] UBI: smallest flash I/O unit: 2048
[ 1.311767] UBI: sub-page size: 512
[ 1.316619] UBI: VID header offset: 512 (aligned 512)
[ 1.322753] UBI: data offset: 2048
[ 1.327972] UBI error: validate_ec_hdr: bad VID header offset 2048, expected 512
[ 1.335754] UBI error: validate_ec_hdr: bad EC header
[ 1.341064] UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0
[ 1.347961] UBI error: ubi_init: cannot attach mtd4

I assume there is a error with sub page size.but  Couldnt  find the exact issue.

Can any one point me how to fix this error.

Regards,

Dibin

  • Hi Dibin,

    What procedure are you using to do this?

  • Hi Biser,

    Thankyou verymuch for your response.

    Below are the steps i Followed.

    1. mkfs.ubifs -r /home/salher/ti-sdk-beagleboard-06.00.00.00/filesystem/TI -m 2048 -e 131072 -c 4095 -F -o ubifs.img

    2. ubinize -o ubi.img -O 2048 -m 2048 -p 128KiB -s 512 ubinize.cfg


    3. where ubinize.cfg contains:

    $ cat ubinize.cfg
    [ubifs]
    mode=ubi
    image=ubifs.img
    vol_id=0
    vol_size=450MiB
    vol_type=dynamic
    vol_name=rootfs
    vol_alignment=1
    vol_flags=autoresize

    On Board.

    1. ubiformat -y /dev/mtd4 -s 512 -O 2048

    2. ubiformat -y /dev/mtd4 -f ubi.img -s 512 -O 2048

    3. ubiattach /dev/ubi_ctrl -m 4 -O 2048

    Regards,

    Dibin

  • Hi Dibin,

    Try to follow this guide where I have explained all the calculations: http://e2e.ti.com/support/arm/sitara_arm/f/791/p/268305/941327.aspx#941327

    Best regards,
    Miroslav

  • Hi Miroslave,

    Thankyou verymuch for link. 

    I am little confused about sub-page support .

    In This link : http://processors.wiki.ti.com/index.php/UBIFS_Support#Creating_UBIFS_file_system

    It is specified that sub page is not supported .

    And mtdinfo in ez-sdk 06.00.00 shows 

    root@beagleboard:~# mtdinfo /dev/mtd4
    mtd4
    Name: File System
    Type: nand
    Eraseblock size: 131072 bytes, 128.0 KiB
    Amount of eraseblocks: 3968 (520093696 bytes, 496.0 MiB)
    Minimum input/output unit size: 2048 bytes
    Sub-page size: 512 bytes
    OOB size: 64 bytes
    Character device major/minor: 90:8
    Bad blocks are allowed: true
    Device is writable: true

    Does it support sub page? ez-sdk 06.00.00 

    Regards,

    Dibin

  • Hi Misoslav,

    Can you please confirm the subpage support of sdk 06.00.00 nand driver.

    Regards,

    Dibin

  • Hi Dibin,

    This particular section of the wiki page hasn't been updated for a long time, so mu suggestion is to direct your question to the U-Boot mailing list: http://lists.denx.de/mailman/listinfo/u-boot

    Best regards,
    Miroslav

  • Hi Miroslav,

       The filesystem is written from kernel , how is it related to u-boot.

        http://e2e.ti.com/support/arm/sitara_arm/f/791/t/230032.aspx  As per this link

       rather than creating ubi.img image I have extracted the rootfs directly to mtd4 .

      but still getting below error

     List of all partitions:
    [    4.320922] 1f00             512 mtdblock0  (driver?)
    [    4.326263] 1f01            1920 mtdblock1  (driver?)
    [    4.331604] 1f02             128 mtdblock2  (driver?)
    [    4.336883] 1f03            4096 mtdblock3  (driver?)
    [    4.342193] 1f04          507904 mtdblock4  (driver?)
    [    4.347503] No filesystem could mount root, tried:  ubifs
    [    4.353179] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

    I have again rooted with memory card to check the mtd4 , and I can see all the rootfs in mtd4.

    So I belive the nandwrite to mt4 is working fine.

    The problem is at start-up there is something going wrong with mounting mtd4 .

    Can you give me any input regarding this.

    Regards,

    Dibin

  • Hi Miroslav,

    I have made further improvements . 

    With the change in boot parameter I was able to boot from nand.

    Issue is the booting is not consistent  it fails to load the filesystem randomly.

    Below are the error messages when booting fails

    [ 1.368408] uncorrectable error :
    [ 1.385009] uncorrectable error :
    [ 1.400634] uncorrectable error :
    [ 1.431915] uncorrectable error :
    [ 1.446502] uncorrectable error :
    [ 1.463134] uncorrectable error :
    [ 1.470794] UBI warning: process_eb: valid VID header but corrupted EC header at PEB 490
    [ 1.501342] UBI warning: process_eb: valid VID header but corrupted EC header at PEB 599

    If you have any input to debug this issue please share.

    Regards,

    Dibin