You need to learn flash programmer before using mtd.
First, resize your cfi flash to 4M base addr 0 ,in sopc builder, and regenerate sof.
Then enable epcs mtd and cfi mtd,
in drivers/mtd/maps/
edit epcs_map.c
static struct mtd_partition epcs_partitions =
{
{
.name = "sof_kernel",
.size = 0x200000,
.offset = 0x000000,
}
};
static const char *part_probes __initdata = {NULL};
edit altera.c
static struct mtd_partition alteramap_partitions = {
{
.name = "romfs/jffs2",
.size = 0x400000,
.offset = 0x000000,
}
};
Rebuild kernel image from the start "make clean", "make linux_hwselect...."....
Follow the wiki,
http://nioswiki.jot.com/wikihome/operating...flashprogrammer (
http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/flashprogrammer)
To program sof and zImage to your EPCS.
And erase cfi flash.