Hi
I want to partition N25Q128 SPI nor flash. I don't know how to do that.
If anyone aware of it,then please help me to partition the spi flash as mtd0,mtd1,and mtd2.
Board : MCIMX28EVK
Linux Kernel version :2.6.35
Linux BSP : L2.6.35_1.1.0_130130_source
SPI flash : N25Q128
I need to store bootloader,uImage and rootfs in spi.
Regards
Pt A R
已解决! 转到解答。
Hi,
With bootloader do you use ? u-boot or barebox ?
On linux, to add partition on this memory you have to do something like that on mx28evk.c :
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition mx28evk_flash_part[] = {
{
.name = "bootloader",
.offset = 0,
.size = 2 * 1024 * 1024},
//.mask_flags = MTD_WRITEABLE}, /* read only partition */
{
.name = "env",
.offset = MTDPART_OFS_NXTBLK,
.size = MTDPART_SIZ_FULL},
//.mask_flags = MTD_WRITEABLE}, /* read only partition */
};
static struct flash_platform_data mx28_spi_flash_data = {
.name = "m25p80",
.parts = mx28evk_flash_part,
.nr_parts = ARRAY_SIZE(mx28evk_flash_part),
.type = "m25p32",
};
#endif
Hi,
With bootloader do you use ? u-boot or barebox ?
On linux, to add partition on this memory you have to do something like that on mx28evk.c :
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition mx28evk_flash_part[] = {
{
.name = "bootloader",
.offset = 0,
.size = 2 * 1024 * 1024},
//.mask_flags = MTD_WRITEABLE}, /* read only partition */
{
.name = "env",
.offset = MTDPART_OFS_NXTBLK,
.size = MTDPART_SIZ_FULL},
//.mask_flags = MTD_WRITEABLE}, /* read only partition */
};
static struct flash_platform_data mx28_spi_flash_data = {
.name = "m25p80",
.parts = mx28evk_flash_part,
.nr_parts = ARRAY_SIZE(mx28evk_flash_part),
.type = "m25p32",
};
#endif