I'm trying to get Nand flash support compiled into the kernel for a custom board with an AM3359 processor. But,after booting this kernel, I don't see a /dev/mtdX or /dev/mtdblockX device. And when I ‘cat /proc/mtd’,it prints like follows(not any more):
dev: size erasesize name
To follow what steps can I use the nand flash in linux
I want to boot ubifs on NAND(stand alone: mtd7)
check the information list :
1. kernel boot log : Don't appear MTD partition setting
2. in u-boot mtdparts info
device nand0 <omap2-nand.0>, # parts = 8 #: name size offset mask_flags 0: SPL 0x00020000 0x00000000 0 1: SPL.backup1 0x00020000 0x00020000 0 2: SPL.backup2 0x00020000 0x00040000 0 3: SPL.backup3 0x00020000 0x00060000 0 4: u-boot 0x001e0000 0x00080000 0 5: u-boot-env 0x00020000 0x00260000 0 6: kernel 0x00500000 0x00280000 0 7: root 0x0f880000 0x00780000 0 active partition: nand0,0 - (SPL) 0x00020000 @ 0x00000000 defaults: mtdids : nand0=omap2-nand.0 mtdparts: mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),12 8k(SPL.backup3),1920k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs) U-Boot#
3. <kernel dir>/arch/arm/mach-omap2/board-am335xevm.c
/* NAND partition information */ static struct mtd_partition am335x_nand_partitions[] = { /* All the partition sizes are listed in terms of NAND block size */ { .name = "SPL", .offset = 0, /* Offset = 0x0 */ .size = SZ_128K, }, { .name = "SPL.backup1", .offset = MTDPART_OFS_APPEND, /* Offset = 0x20000 */ .size = SZ_128K, }, { .name = "SPL.backup2", .offset = MTDPART_OFS_APPEND, /* Offset = 0x40000 */ .size = SZ_128K, }, { .name = "SPL.backup3", .offset = MTDPART_OFS_APPEND, /* Offset = 0x60000 */ .size = SZ_128K, }, { .name = "U-Boot", .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ .size = 15 * SZ_128K, }, { .name = "U-Boot-Env", .offset = MTDPART_OFS_APPEND, /* Offset = 0x260000 */ .size = 1 * SZ_128K, }, { .name = "Kernel", .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ .size = 40 * SZ_128K, }, { .name = "File System", .offset = MTDPART_OFS_APPEND, /* Offset = 0x780000 */ .size = MTDPART_SIZ_FULL, }, };
4. all this working in 'root' acoount
what can I do solve this problem?