nokia900.conf: added ubifs arguments
authorDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Thu, 3 Feb 2011 19:42:59 +0000 (20:42 +0100)
committerDenis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Thu, 3 Feb 2011 19:47:07 +0000 (20:47 +0100)
Thanks JaMa on #openmoko-cdevel on Freenode on irc for help on the sub-pages:
Feb 02 11:41:58 <JaMa|Wrk>      GNUtoo|laptop: also for gta02 I had to sacrifise sub-pages, -s same as -m otherwise it always failed

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
conf/machine/nokia900.conf

index 484b1a9..5d1c2d9 100644 (file)
@@ -62,6 +62,24 @@ EXTRA_IMAGEDEPENDS += "u-boot"
 ROOT_FLASH_SIZE = "100"
 EXTRA_IMAGECMD_jffs2_nokia900 = "--pad --little-endian --eraseblock=0x20000 -n"
 
+# Add "rootfstype=ubifs ubi.mtd=5,2048 root=ubi0:nokia900-rootfs"
+# to the kernel cmdline to boot an ubifs image flashed on /dev/mtd5
+# Here are the arguments with the corresponding dmesg messages :
+# -m: UBI: smallest flash I/O unit:    2048
+# -e: UBI: logical eraseblock size:    126976 bytes
+# -c: UBI: number of good PEBs:        2009
+# -p: UBI: physical eraseblock size:   131072 bytes (128 KiB)
+# -x: best compression ratio
+# -s and -O : set to the smallest flash I/O unit to bypass the subpages
+# See http://www.linux-mtd.infradead.org/faq/ubi.html#L_vid_offset_mismatch for more details
+# else you have some errors like theses in dmesg with ubiattach:
+# onenand_write_ops_nolock: verify failed -74
+# UBI error: ubi_io_write: error -74 while writing 512 bytes to PEB 961:512, written 512 bytes
+# UBI warning: ubi_eba_write_leb: failed to write VID header to LEB 2147479551:0, PEB 961
+# UBI warning: ubi_ro_mode: switch to read-only mode
+MKUBIFS_ARGS = "-m 2048 -e 126976 -c 2009 -x zlib"
+UBINIZE_ARGS = "-m 2048 -p 131072 -s 2048 -O 2048"
+
 IMAGE_FSTYPES ?= "jffs2 tar.gz"
 
 PREFERRED_PROVIDER_virtual/kernel = "linux"