Re: Fw: rootfs as JFFS2 on AT91SAM9260 | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
You can define the nand partitions in
arch/arm/mach/mach-at91rm9200/board-at91sam9260ek.c.
Here is an example:
/*
* NAND flash
*/
static struct mtd_partition __initdata ek_nand_partition[] = {
{
.name = "boot",
.offset = 0,
.size = 0x00080000,
.mask_flags = MTD_WRITEABLE, /* force read-only */
},
{
.name = "kernel0",
.offset = 0x00080000,
.size = 0x00300000,
// .mask_flags = MTD_WRITEABLE, /* force read-only */
},
{
.name = "kernel1",
.offset = 0x00380000,
.size = 0x00300000,
// .mask_flags = MTD_WRITEABLE, /* force read-only */
},
{
.name = "rfs0",
.offset = 0x00680000,
.size = 0x00A00000,
// .mask_flags = MTD_WRITEABLE, /* force read-only */
},
{
.name = "rfs1",
.offset = 0x01080000,
.size = 0x00A00000,
// .mask_flags = MTD_WRITEABLE, /* force read-only */
},
{
.name = "user",
.offset = 0x01A80000,
.size = 0x0E580000,
},
};
static struct mtd_partition *nand_partitions(int size, int *num_partitions)
{
*num_partitions = ARRAY_SIZE(ek_nand_partition);
return ek_nand_partition;
}
static struct at91_nand_data __initdata ek_nand_data = {
.ale = 21,
.cle = 22,
// .det_pin = ... not connected
.rdy_pin = AT91_PIN_PC13,
.enable_pin = AT91_PIN_PC14,
.partition_info = nand_partitions,
#if defined(CONFIG_MTD_NAND_AT91_BUSWIDTH_16)
.bus_width_16 = 1,
#else
.bus_width_16 = 0,
#endif
};
On 4/5/07, Nicolas Brouard <nicolas.brouard@xxxxxxxxxxx> wrote:
Ulf Samuelsson <ulf <at> atmel.com> writes: > > I have never set those parameters, when I created the JFFS2 system. > Maybe you shouldn't do that either... I.E set PHYSMAP to no. > > Create a directory structure containing your root file systems > and then run mkfs.jffs2 on that according to Michels advice. > > I automate this by using Buildroot... > > Best Regards > Ulf Samuelsson ulf <at> atmel.com OK, but how can I do the mapping between mtd devices (/dev/mtdx and /dev/mtdblocx) and the physical address of the flash? I don't know how to set the size and the start address of each partitions? Nicolas ------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
------------------------------------------------------------------- List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
[Site Home] [IETF Annouce] [Security] [Bugtraq] [Linux] [Linux ARM Kernel] [Linux MIPS] [ECOS] [Tools] [DDR & Rambus] [Monitors]