• Home
  • Help
  • Search
  • Login
  • Register
Pages: 1 [2]
Author Topic: ubimkvol fails  (Read 12255 times)
pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #15 on: February 11, 2010, 02:05:03 PM »

@dodiak,

I guess you want to transfer you live rootfs to NAND. This is different from my suggestion of making ubi image first then flush the ready image to NAND. I am not sure why ubimkvol seems to be always fail, however ubiformat seems to be have better chance. So have a look at the sequence I suggest a few post above may be that will work for you.

Good luck.  Smiley
Logged

Good Luck Smiley

diefrisur
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #16 on: February 14, 2010, 07:25:23 AM »

Okay, I've now installed a new debian on a SD card and tried it all over again. Now success but I've now the complete process with kernel version, mtd-utils version and error messages. I really hope this helps in any way to find an answer.

Thanks!

root@JGServer:/tmp# uname -a
Linux JGServer 2.6.32-trunk-kirkwood #1 Mon Jan 11 10:57:12 UTC 2010 armv5tel GNU/Linux

root@JGServer:/sys/class/ubi# dpkg -l | grep mtd-utils
ii  mtd-utils                                  20090606-1            Memory Technology Device Utilities
root@JGServer:/sys/class/ubi#

root@JGServer:/tmp/ubifsinst# tar -C /tmp/ubifsinst -xf /tmp/rootfs.tar.gz

root@JGServer:/tmp/ubifsinst# mkfs.ubifs -v -r /tmp/ubifsinst -m 2048 -e 129024 -c 4096 -o /tmp/ubifs.img
mkfs.ubifs
   root:         /tmp/ubifsinst/
   min_io_size:  2048
   leb_size:     129024
   max_leb_cnt:  4096
   output:       /tmp/ubifs.img
   jrn_size:     8388608
   reserved:     0
   compr:        lzo
   keyhash:      r5
   fanout:       8
   orph_lebs:    1
   super lebs:   1
   master lebs:  2
   log_lebs:     5
   lpt_lebs:     2
   orph_lebs:    1
   main_lebs:    608
   gc lebs:      1
   index lebs:   12
   leb_cnt:      619
   UUID:         F5E19CDD-9B19-4B0C-BD66-497AA91EC32B
Success!
root@JGServer:/tmp/ubifsinst#

root@JGServer:/tmp/ubifsinst# cat > /tmp/ubi.cfg <<_EOF_
> [rootfs-volume]
> mode=ubi
> image=/tmp/ubifs.img
> vol_id=0
> vol_size=400MiB
> vol_type=dynamic
> vol_name=rootfs
> vol_flags=autoresize
> _EOF_
root@JGServer:/tmp/ubifsinst#

root@JGServer:/tmp/ubifsinst# ubinize -v -o /tmp/ubi.img -m 2048 -p 128KiB -s 512 /tmp/ubi.cfg
ubinize: LEB size:      129024
ubinize: PEB size:      131072
ubinize: min. I/O size: 2048
ubinize: sub-page size: 512
ubinize: VID offset:    512
ubinize: data offset:   2048
ubinize: loaded the ini-file "/tmp/ubi.cfg"
ubinize: count of sections: 1

ubinize: parsing section "rootfs-volume"
ubinize: mode=ubi, keep parsing
ubinize: volume type: dynamic
ubinize: volume ID: 0
ubinize: volume size: 419430400 bytes
ubinize: volume name: rootfs
ubinize: volume alignment: 1
ubinize: autoresize flags found
ubinize: adding volume 0
ubinize: writing volume 0
ubinize: image file: /tmp/ubifs.img

ubinize: writing layout volume
ubinize: done
root@JGServer:/tmp/ubifsinst#

root@JGServer:/tmp/ubifsinst# ubiformat /dev/mtd2 -s 512 -f /tmp/ubi.img
ubiformat: mtd2 (nand), size 531628032 bytes (507.0 MiB), 4056 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 4055 -- 100 % complete 
ubiformat: 4056 eraseblocks have valid erase counter, mean value is 9
ubiformat: flashing eraseblock 620 -- 100 % complete 
ubiformat: formatting eraseblock 4055 -- 100 % complete 
root@JGServer:/tmp/ubifsinst#


root@JGServer:/tmp/ubifsinst# ubiattach /dev/ubi_ctrl -m 2

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.219770] Internal error: Oops: 817 [#1]

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.223883] last sysfs file: /sys/class/ubi/version

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.298528] Process ubiattach (pid: 1011, stack limit = 0xdebee270)

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.304823] Stack: (0xdebefde0 to 0xdebf0000)

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.309207] fde0: 00000000 c00c8b78 00000cb3 de69f000 de69f000 ffffffe2 00000000 de6f3800

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.317429] fe00: 00000000 c0206408 df858100 c00ce7bc df858100 df81ee60 00000000 c03c3f8c

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.325652] fe20: deae2060 00000000 00000000 c02ca160 00000000 c01cf518 debefef0 00000000

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.333875] fe40: 00000000 00000000 df858100 deae2060 def91400 c00ce9e0 deb29400 c00ceb5c

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.342097] fe60: 00000001 0000003e 00000008 00000000 deb29400 00000000 deae2060 ffffff9c

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.350322] fe80: def91400 c00ce9e0 df4aed00 c00c9e74 df9bf000 deb29400 debea800 df9bf000

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.358544] fea0: 00020001 ffffff9c 00000024 00000000 00000000 c00ca06c 00000000 de6f3800

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.366767] fec0: 00000000 debefed0 c02b5318 40186f40 de945000 bea476a0 00000003 bea476a0

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.374989] fee0: debee000 00000000 00000000 c0206794 ffffffff 00000002 00000000 00000000

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.383212] ff00: 00000000 00000000 deb29400 40186f40 bea476a0 c00d8a28 00000000 deb29400

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.391436] ff20: 00000003 c00d912c 00000000 df4a9180 df4a9180 c03aa6f0 00000000 00020001

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.399659] ff40: 00000000 deb29400 00000003 00000000 00000002 deae2060 ded969c4 df4aed00

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.407882] ff60: 00000020 df4aed00 00000000 bea476a0 40186f40 00000003 deb29400 debee000

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.416104] ff80: 00000000 c00d91e4 bea479db 00000000 00000000 bea47740 00000003 00000036

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.424327] ffa0: c0027048 c0026ea0 00000000 bea47740 00000003 40186f40 bea476a0 00000003

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.432550] ffc0: 00000000 bea47740 00000003 00000036 00016008 000156b0 000156cc 00000000

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.440773] ffe0: bea479db bea476a0 00009da0 400e419c 60000010 00000003 00000000 00000000

Message from syslogd@JGServer at Feb 14 15:17:04 ...
 kernel:[ 1874.508396] Code: e1a01000 e59f000c eb0a25b6 e3a03000 (e5833000)
Segmentation fault
root@JGServer:/tmp/ubifsinst#
Logged

pingtoo
Sr. Member
****

Karma: 15
Posts: 318


View Profile
« Reply #17 on: February 14, 2010, 08:04:27 AM »

Your build of ubi image is correct and successful.
This is at kernel UBI driver level error. May be try to rebuild the kernel or change a different version of kernel may help.
Logged

Good Luck Smiley

rooster
Administrator
Sr. Member
*****

Karma: 8
Posts: 311


View Profile
« Reply #18 on: February 17, 2010, 08:11:11 AM »

We have investigated the UBIFS issue, and found that it’s related to some kernel configuration options.
In order to be able to work with UBIFS, you need to changes the following:
-          Enable “NFTL support”
-          Enable “write support for NFTL”
-          Disable “Verify NAND page writes”.
Logged

sebbo
Newbie
*

Karma: 1
Posts: 3


View Profile
« Reply #19 on: February 17, 2010, 07:13:19 PM »

did you follow the guide in the wiki about installing debian with ubifs on the internal flash? if you did, are you really sure, that you booted the kernel which you previously loaded into nand?

can you print your u-boot envs pls?
Logged

diefrisur
Newbie
*

Karma: 0
Posts: 11


View Profile
« Reply #20 on: February 20, 2010, 04:18:39 PM »

Having updated the kernel to 2.6.32.8 everything is now working. I do have a plug that is running Debian from the nand with UBIFS.

After I figured how to update the kernel I started with a complete new installation of Debian on USB drive following the instructions in the Wiki (http://www.plugcomputer.org/plugwiki/index.php/Installing_Debian_To_Flash)

If you update the kernel before converting internal flash root partition to UBIFS I could even use
Code:
ubiformat /dev/mtd2 -s 512
 ubiattach /dev/ubi_ctrl -m 2
 ubimkvol /dev/ubi0 -N rootfs -m
 mount -t ubifs ubi0:rootfs /mnt

without any problem.

The only thing that didn't work from that manual was the setup of the boot loader. For that point I found some useful instructions at http://www.jukie.net/~bart/blog/20100215083725

The ultimate problem then was that the sheeva stopped booting after uncompressing the kernel. I solved this by reentering

Code:
   setenv mainlineLinux yes
   setenv arcNumber 2097
   saveenv
   reset

Thanks for your help.
Logged

Pages: 1 [2]
Print
Jump to: