there are two tips when initializing MTD partition struct:
use MTDPART_OFS_APPEND to define .offset
1024 multiple to .size (4MB = 4194304 bytes or 4 * 1024 * 1024)
static struct mtd_partition nand_flash_partitions[] = {
{
.name = “bootloader”,
.offset = 0,
.size = 3 * 1024 * 1024},
{
.name = “nand.kernel”,
.offset = MTDPART_OFS_APPEND,
.size = 5 * 1024 * 1024},
{
.name = “nand.rootfs”,
.offset = [...]
Since I’m still using 32-bit machines I had to switch the way I mount large (> 128MiB) JFFS2 images. Now I’m using NAND simulator, an extremely useful debugging and development tool which simulates NAND flashes in RAM. The main problem with mtdram is related with space reserved to vmalloc function on 32-bits processors (an hardware [...]