Добрый день!
С большими бубнами закатал кернел и rootfs на NAND (старая версия ubimkvol, watchdog, права на файлы и т.д.)
Делал в итоге в такой последовательности (переносил файлы с USB MFGTool не работает):
mount /dev/sda1 /mnt/cdrom/
flash_eraseall /dev/mtd0
flash_eraseall /dev/mtd1
ubiformat -y /dev/mtd1 (не знаю надо ли)
ubiattach /dev/ubi_ctrl -m 1
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: attached mtd1 to ubi0
UBI: MTD device name: "gpmi-nfc-general-use"
UBI: MTD device size: 236 MiB
UBI: number of good PEBs: 1888
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: 0
UBI: available PEBs: 1866
UBI: total number of reserved PEBs: 22
UBI: number of PEBs reserved for bad PEB handling: 18
UBI: max/mean erase counter: 0/0
UBI: image sequence number: 1628475599
UBI: background thread "ubi_bgt0d" started, PID 1168
kobs-ng init /mnt/cdrom/imx28_~1.sb
ubimkvol /dev/ubi0 -n 0 -N rootfs0 -s 220000000 (версия не поддерживает MiB)
ubiblka: unknown partition table
ubimkvol /dev/ubi0 -n 1 -N data -s 16000000 (хотел сделать вторую партицию и все равно не до конца разбивает т.к. не поддерживает ключ -m)
ubiblkb: unknown partition table
mkdir -p /mnt/ubi0
mount -t ubifs ubi0:rootfs0 /mnt/ubi0/
UBIFS: default file-system created
UBIFS: mounted UBI device 0, volume 0, name "rootfs0"
UBIFS: file system size: 218652672 bytes (213528 KiB, 208 MiB, 1722 LEBs)
UBIFS: journal size: 10919936 bytes (10664 KiB, 10 MiB, 86 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
tar -xvpf /mnt/cdrom/rootfs.tar.bz2 -C /mnt/ubi0
В итоге все запускается вот соответств кусок загрузочного лога:
.......
Scanning for NAND Flash chips...
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Boot area protection is enabled.
Creating 2 MTD partitions on "gpmi-nfc-main":
0x000000000000-0x000001400000 : "gpmi-nfc-0-boot"
0x000001400000-0x000010000000 : "gpmi-nfc-general-use"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: attached mtd1 to ubi0
UBI: MTD device name: "gpmi-nfc-general-use"
UBI: MTD device size: 236 MiB
UBI: number of good PEBs: 1888
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: 2
UBI: available PEBs: 6
UBI: total number of reserved PEBs: 1882
UBI: number of PEBs reserved for bad PEB handling: 18
UBI: max/mean erase counter: 1/0
UBI: image sequence number: 1097558008
UBI: background thread "ubi_bgt0d" started, PID 517
ubiblka: unknown partition table
ubiblkb: unknown partition table
...........
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "rootfs0"
UBIFS: file system size: 218652672 bytes (213528 KiB, 208 MiB, 1722 LEBs)
UBIFS: journal size: 10919936 bytes (10664 KiB, 10 MiB, 86 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 4952683 bytes (4836 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:12.
...........
В итоге при запуске fdisk -l получаю мертвеца (точнее только консоль соответствующая умирает):
fdisk -l
end_request: I/O error, dev mtdblock0, sector 0
Buffer I/O error on device mtdblock0, logical block 0
end_request: I/O error, dev mtdblock0, sector 0
Buffer I/O error on device mtdblock0, logical block 0
Disk /dev/mtdblock1: 247 MB, 247463936 bUnable to handle kernel paging request at virtual address fffffff0
ytes
255 heads, 63 sectpgd = c0004000
[fffffff0] *pgd=405fb031
Units = cylinders of 16, *pte=00000000065 * 512 = 8225280 byte, *ppte=00000000s
Disk /dev/mtdblock1
doesn't contain a validInternal error: Oops: 17 [#1]
last sysfs file: /sys/kernel/uevent_seqnum
Modules linked in:
CPU: 0 Not tainted (2.6.35.3-670-g914558e #12)
PC is at ubi_leb_read+0x10/0x134
LR is at ubiblock_readsect+0xbc/0xe4
pc : [<c0261084>] lr : [<c0267a9c>] psr: 60000013
sp : c7231f00 ip : c7231f38 fp : c7231f34
r10: 0001f000 r9 : 00000000 r8 : 00000200
r7 : 00000000 r6 : c73fb000 r5 : 00000200 r4 : c71e4e40
r3 : 00000000 r2 : c73fb000 r1 : 00000000 r0 : fffffff0
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: 473c4000 DAC: 00000017
Process ubiblk1 (pid: 518, stack limit = 0xc7230270)
Stack: (0xc7231f00 to 0xc7232000)
1f00: c71e4e40 00000008 c73fb000 00000000 c7231f34 c71e4e40 00000200 c73fb000
1f20: 00000000 00000200 c7231f6c c7231f38 c0267a9c c0261084 00000200 00000000
1f40: 00000000 c7202270 00000008 00000000 c049f728 c73fb000 c7230000 c71e47e0
1f60: c7231fc4 c7231f70 c024e3e8 c02679f0 c0043344 00000009 00000008 00000000
1f80: c0494cac c76dd700 c71d04e8 c71e47f0 00000000 00000000 00000000 c7c27de0
1fa0: c7231fcc c024e238 c71e47e0 00000000 00000000 00000000 c7231ff4 c7231fc8
1fc0: c005a51c c024e248 00000000 00000000 c7231fd0 c7231fd0 c7c27de0 c005a498
1fe0: c00489e4 00000013 00000000 c7231ff8 c00489e4 c005a4a8 dfbfa5ee efba27f9
Backtrace:
[<c0261074>] (ubi_leb_read+0x0/0x134) from [<c0267a9c>] (ubiblock_readsect+0xbc/0xe4)
r8:00000200 r7:00000000 r6:c73fb000 r5:00000200 r4:c71e4e40
[<c02679e0>] (ubiblock_readsect+0x0/0xe4) from [<c024e3e8>] (mtd_blktrans_thread+0x1b0/0x29c)
[<c024e238>] (mtd_blktrans_thread+0x0/0x29c) from [<c005a51c>] (kthread+0x84/0x8c)
[<c005a498>] (kthread+0x0/0x8c) from [<c00489e4>] (do_exit+0x0/0x600)
r7:00000013 r6:c00489e4 r5:c005a498 r4:c7c27de0
Code: e1a0c00d e92dd9f0 e24cb004 e24dd014 (e5904000)
partition table
---[ end trace 6abdb8a2c357c611 ]---
На всякий случай вкладываю device.c из кернела (который у меня как итоговый после патчей получается)