Google
  Web www.spinics.net

Re: Fw: rootfs as JFFS2 on AT91SAM9260

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Thank you very much Michel and Ulf, everything is working. 

This is my configuration:

I use http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2 
with the patches : http://maxim.org.za/AT91RM9200/2.6/2.6.20-at91.patch.gz 
and http://www.at91.com/repFichier/Project-217/linux-2.6.20-at91-exp.diff.bz2

I also apply a patch to define the Nandflash partitions:
-----------------------------
diff -urN -x CVS linux-2.6.20.orig/arch/arm/mach-at91rm9200/board-sam9260ek.c
linux-2.6.20/arch/arm/mach-at91rm9200/board-sam9260ek.c
--- linux-2.6.20.orig/arch/arm/mach-at91rm9200/board-sam9260ek.c	2007-04-09
15:20:19.000000000 -0400
+++ linux-2.6.20/arch/arm/mach-at91rm9200/board-sam9260ek.c	2007-04-09
15:21:22.000000000 -0400
@@ -129,14 +129,24 @@
  */
 static struct mtd_partition __initdata ek_nand_partition[] = {
 	{
-		.name	= "Partition 1",
+		.name	= "boot",
 		.offset	= 0,
-		.size	= 256 * 1024,
+		.size	= 64 * 2 * 1024, // 0x20000
 	},
 	{
-		.name	= "Partition 2",
-		.offset	= 256 * 1024,
-		.size	= MTDPART_SIZ_FULL,
+		.name	= "uboot",
+		.offset	= 64 * 2 * 1024, // 0x20000
+		.size	= 64 * 14 * 1024, // 0xE0000
+	},
+	{
+		.name	= "kernel",
+		.offset	= 64 * 16 * 1024, // 0x100000
+		.size	= 64 * 48 * 1024, // 0x300000
+	},
+	{
+		.name	= "disk",
+		.offset	= 64 * 64 * 1024, // 0x400000
+		.size	= 64 * 256 * 1024, // 0x1000000
 	},
 };
-----------------------------

My kernel configuration file is here : http://nbrouard.free.fr/kernel.config

When the kernel is built, I launch the kernel with a RAM rootfs and program the
NandFlash with the following commands:
$ flash_eraseall /dev/mtd3
$ tftp –g 192.168.1.1 -r rootfs.arm.jffs2
$ nandwrite –p /dev/mtd3 rootfs.arm.jffs2

Then, I use the following configuration for U-Boot:
bootargs=mem=64M console=ttyS0,115200 root=/dev/mtdblock3 rw rootfstype=jffs2
bootcmd=nand read 0x21500000 0x00100000 0x000F4980; bootm 0x21500000


-------------------------------------------------------------------
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]

Powered by Linux