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.

AM1808 and ubiFS

Other Parts Discussed in Thread: AM1808

TI Team,

I read through the wiki on UBIFS support but am still having issues getting this to work with the AM1808.  Here are the steps I tried, I was hoping for some guidance on steps people have used with NAND to get ubifs to work. I did verify my hardware and it matches the Hawkboard implementation for NAND

1.) Updated to newest u-boot (2012.04.01 version of U-boot (the newest arago/davinci version)).  Here are the errors I get with NAND from Uboot:

AM1808 initialization passed!
Booting TI User Boot Loader
        UBL Version: 1.65
        UBL Flashtype: NAND
Starting NAND Copy...
Valid magicnum, 0x55424CBB, found in block 0x00000006.
   DONE
úNAND:  128 MiBy point at 0xC1080000.
MMC:   davinci: 0
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01

2.) Here are the commands I used to make the file system:

Host$: mkfs.ubifs -r arago-base/ -m 2048 -e 124KiB -c 1023 -F -v -o ubifs.img

mkfs.ubifs

      root:         arago-base/

      min_io_size:  2048

      leb_size:     126976

      max_leb_cnt:  1023

      output:       ubifs.img

      jrn_size:     8388608

      reserved:     0

      compr:        lzo

      keyhash:      r5

      fanout:       8

      orph_lebs:    1

      space_fixup:  1

      super lebs:   1

      master lebs:  2

      log_lebs:     5

      lpt_lebs:     2

      orph_lebs:    1

      main_lebs:    137

      gc lebs:      1

      index lebs:   5

      leb_cnt:      148

      UUID:         AD78FDBF-F5AF-4753-8CAE-46D4DF9E478A

Success!

 

Host$: ubinize -o rootfs.ubi -p 128KiB -m 2048 -v ubinize.cfg

ubinize: LEB size:                  126976

ubinize: PEB size:                  131072

ubinize: min. I/O size:             2048

ubinize: sub-page size:             2048

ubinize: VID offset:                2048

ubinize: data offset:               4096

ubinize: UBI image sequence number: 1697789623

ubinize: loaded the ini-file "ubinize.cfg"

ubinize: count of sections: 1

 

ubinize: parsing section "ubifs"

ubinize: mode=ubi, keep parsing

ubinize: volume type: dynamic

ubinize: volume ID: 0

ubinize: volume size: 119537664 bytes

ubinize: volume name: rootfs

ubinize: volume alignment: 1

ubinize: autoresize flags found

ubinize: adding volume 0

ubinize: writing volume 0

ubinize: image file: ubifs.img

 

ubinize: writing layout volume

ubinize: done

 

Additionally:

 

host$: cat ubinize.cfg

[ubifs]                

mode=ubi             

image=ubifs.img      

vol_id=0             

vol_size=114MiB      

vol_type=dynamic     

vol_name=rootfs      

vol_flags=autoresize

-Jason

  • Jason,

    Instead of creating the image from host, can you try creating it from the target itself? You can follow the steps given below.

    1. First you should have your rootfs as a tar ball in your SD card or NFS from where you mount the filesystem.
    2. Boot up the device and the filesystem from NFS or SD card according your preference.
    3. Boot it up and login. Hope you have all the required command binaries like "flash_erase" etc in your filesystem. 

    4. Follow the steps below

    $ 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

    5. Change the bootargs like below for booting from UBIFS.
    # setenv bootargs 'console=ttyO0,115200n8 mem=160M ubi.mtd=4 rootfstype=ubifs root=ubi0:rootfs rw'