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.

AM335x UBI support in u boot

Other Parts Discussed in Thread: AM3352

Hi ,

Im using a custom design board with AM3352 processor running at 300 MHz.

attaching ubi image of about 40 MB size from u-boot using following command takes 5 secs

ubi part rootfs 2048


But when it is attached from kernel  it takes only about 1.3 sec.

What could be the reason? Can any one help me here

  • Hi,

    I will ask the software team to comment.
  • Hi,

    Have you checked against kernel performance guide:
    processors.wiki.ti.com/.../Processor_SDK_Linux_Kernel_Performance_Guide

    Also inspect the gpmc & nand drivers in both u-boot & kernel (especially the way gpmc is initialized, i.e.: ecc, clock speed, etc..).

    Best Regards,
    Yordan
  • Hi,

    Thanks for the reply, was going to compare gpmc and nand drivers..
    but it would be great help if someone who already has attached ubi image from u-boot tell me whether they have experienced same time difference,
    and whether booting kernel from boot directory of root filesystem in case of Nand device is a good option to follow or not.
  • UBI related informations

    mtdinfo output
    mtd6
    Name:                           NAND.file-system
    Type:                           nand
    Eraseblock size:                131072 bytes, 128.0 KiB
    Amount of eraseblocks:          1663 (217972736 bytes, 207.9 MiB)
    Minimum input/output unit size: 2048 bytes
    Sub-page size:                  512 bytes
    OOB size:                       64 bytes
    Character device major/minor:   90:12
    Bad blocks are allowed:         true
    Device is writable:             true

    arguments used for creation
    # UBI: smallest flash I/O unit:    2048
    # UBI: logical eraseblock size:    126976 bytes
    # UBI: logical eraseblock no.s:       1619 LEBs
    MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 1619"

    # UBI: smallest flash I/O unit:    2048
    # UBI: physical eraseblock size:   131072 bytes (128 KiB)
    # UBI: sub-page size:              2048
    UBINIZE_ARGS = "-m 2048 -p 128KiB -s 2048"

    ubinize.cfg contents

    [ubifs]
    mode=ubi
    image={my loc}
    vol_id=0
    vol_type=dynamic
    vol_name= rootfs
    vol_flags=autoresize

    ubi part output from u-boot
    ubi0: attaching mtd1
    ubi0: scanning is finished
    ubi0: attached mtd1 (name "mtd=4", size 207 MiB)
    ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512
    ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
    ubi0: good PEBs: 1663, bad PEBs: 0, corrupted PEBs: 0
    ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128
    ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 290038407
    ubi0: available PEBs: 0, total reserved PEBs: 1663, PEBs reserved for bad PEB handling: 40

    ubi info output from u-boot
    UBI: MTD device name:            "mtd=4"
    UBI: MTD device size:            207 MiB
    UBI: physical eraseblock size:   131072 bytes (128 KiB)
    UBI: logical eraseblock size:    126976 bytes
    UBI: number of good PEBs:        1663
    UBI: number of bad PEBs:         0
    UBI: smallest flash I/O unit:    2048
    UBI: VID header offset:          2048 (aligned 2048)
    UBI: data offset:                4096
    UBI: max. allowed volumes:       128
    UBI: wear-leveling threshold:    4096
    UBI: number of internal volumes: 1
    UBI: number of user volumes:     1
    UBI: available PEBs:             0
    UBI: total number of reserved PEBs: 1663
    UBI: number of PEBs reserved for bad PEB handling: 40
    UBI: max/mean erase counter: 2/0

  • Hi ,
    gone through

    e2e.ti.com/.../222527
    e2e.ti.com/.../312922

    In those we are advised to enable dcache.

    Im using a newer version of u-boot
    u-boot source from
    git://git.ti.com/ti-u-boot/ti-u-boot.git;
    banch :- ti-u-boot-2016.05

    I have tried using dcache on command in my u-boot without any improvement in time.

    Am I missing some configuration here?
    Im not using CONFIG_DM_NAND will that be causing issue? or something like that?