4 Replies Latest reply: May 18, 2012 1:24 PM by MarkBishop RSS

    UBIFS on 2011R1-RC5 isn't working from upgrade on 2010RC1-RC5

    MarkBishop

      On 2010RC1-RC5 I have a working ubi partition on NAND, but when I upgrade to 2011RC1-RC5 it breaks.

       

      Steps used to create the image:

      ./mkfs.ubifs -r filesystem/ -m 2048 -e 129024 -c 1012 -o ubifs.img

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

       

      Contents of ubinize.cfg:

      mark@linux-hez9:~/UBI> cat ubinize.cfg

      [ubifs]

      mode=ubi

      image=ubifs.img

      vol_id=0

      vol_size=100MiB

      vol_type=dynamic

      vol_name=cooper

      vol_flags=autoresize

      vol_alignment=1

       

      On the target (works on 2010R1-RC3):

      root:/> ubiattach /dev/ubi_ctrl -m 3

      UBI: attaching mtd3 to ubi0

      UBI: physical eraseblock size:   131072 bytes (128 KiB)

      UBI: logical eraseblock size:    129024 bytes

      UBI: smallest flash I/O unit:    2048

      UBI: sub-page size:              512

      UBI: VID header offset:          512 (aligned 512)

      UBI: data offset:                2048

      UBI: attached mtd3 to ubi0

      UBI: MTD device name:            "file system(ubifs)"

      UBI: MTD device size:            126 MiB

      UBI: number of good PEBs:        1012

      UBI: number of bad PEBs:         0

      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: 1012

      UBI: number of PEBs reserved for bad PEB handling: 10

      UBI: max/mean erase counter: 1/0

      UBI: image sequence number: 0

      UBI: background thread "ubi_bgt0d" started, PID 48

      UBI device number 0, total 1012 LEBs (130572288 bytes, 124.5 MiB), available 0 LEBs (0 bytes), LEB size 129024 bytes (126.0 KiB)

      root:/> mount -t ubifs ubi0 /mnt/ubitest/

       

      On 2011R1-RC5:

      root:/> ubiattach /dev/ubi_ctrl -m 3

      UBI: attaching mtd3 to ubi0

      UBI: physical eraseblock size:   131072 bytes (128 KiB)

      UBI: logical eraseblock size:    129024 bytes

      UBI: smallest flash I/O unit:    2048

      UBI: sub-page size:              512

      UBI: VID header offset:          512 (aligned 512)

      UBI: data offset:                2048

      UBI: max. sequence number:       2

      UBI: attached mtd3 to ubi0

      UBI: MTD device name:            "file system(ubifs)"

      UBI: MTD device size:            126 MiB

      UBI: number of good PEBs:        996

      UBI: number of bad PEBs:         16

      UBI: number of corrupted PEBs:   0

      UBI: max. allowed volumes:       128

      UBI: wear-leveling threshold:    4096

      UBI: number of internal volumes: 1

      UBI: number of user volumes:     0

      UBI: available PEBs:             983

      UBI: total number of reserved PEBs: 13

      UBI: number of PEBs reserved for bad PEB handling: 9

      UBI: max/mean erase counter: 1/1

      UBI: image sequence number:  1446951812

      UBI: background thread "ubi_bgt0d" started, PID 305

       

      root:/> mount -t ubifs ubi0 /mnt/ubitest

      UBIFS error (pid 313): ubifs_mount: cannot open "ubi0", error -19

      mount: mounting ubi0 on /mnt/ failed: No such device

       

      Also tried:

      root:/> mount -t ubifs ubi0:cooper /mnt/ubitest/

      root:/> mount -t ubifs ubi0!cooper /mnt/ubitest/

       

      All with the same error code.  "UBI: number of user volumes:  0" is what I am seeing different.

       

      For 2010R1-RC5:

      I utilized the 'ubinize' located: /usr/sbin/ubinize as that I couldn't find one in the distribution.

      and 'mkfs.ubifs' located: ./user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/mkfs.ubifs

       

      For 2011R1-RC5:

      I utilized the 'ubinize' located: ./user/mtd-utils/build-36d8de81049c9c908740b690c664b5bd3703ccd6-host/ubi-utils

      and 'mkfs.ubifs' located: ./user/mtd-utils/build-36d8de81049c9c908740b690c664b5bd3703ccd6-host/mkfs.ubifs

       

      I also tried my local copy of ubinize for 2011R1-RC5 and it didn't work as well.

       

      I followed the setup here: http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:ubifs

      And I am trying to load a pre-made image (from filesystem), and not create a blank image.