mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org, Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice VILCHEZ <patrice.vilchez@atmel.com>
Subject: [PATCH 06/14] at91sam9261ek/9g10ek: update partition layout
Date: Mon, 12 Mar 2012 12:17:54 +0100	[thread overview]
Message-ID: <1331551082-7730-6-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1331551082-7730-1-git-send-email-plagnioj@jcrosoft.com>

Update partition layout to be able to boot from nand with the bootstrap.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9261ek/env/config |    4 ++--
 arch/arm/boards/at91sam9261ek/init.c     |    8 ++++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boards/at91sam9261ek/env/config b/arch/arm/boards/at91sam9261ek/env/config
index d6eeea4..9be6331 100644
--- a/arch/arm/boards/at91sam9261ek/env/config
+++ b/arch/arm/boards/at91sam9261ek/env/config
@@ -25,8 +25,8 @@ kernelimage=uImage
 #kernelimage=Image.lzo
 
 nand_device=atmel_nand
-nand_parts="256k(barebox)ro,128k(bareboxenv),1536k(kernel),-(root)"
-rootfs_mtdblock_nand=3
+nand_parts="128k(at91bootstrap),256k(barebox)ro,128k(bareboxenv),128k(bareboxenv2),4M(kernel),120M(rootfs),-(data)"
+rootfs_mtdblock_nand=5
 
 autoboot_timeout=3
 
diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index 8b192b2..2272fd6 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -30,6 +30,7 @@
 #include <io.h>
 #include <asm/hardware.h>
 #include <nand.h>
+#include <sizes.h>
 #include <linux/mtd/nand.h>
 #include <mach/at91_pmc.h>
 #include <mach/board.h>
@@ -147,10 +148,13 @@ static int at91sam9261ek_devices_init(void)
 	ek_add_device_nand();
 	ek_add_device_dm9000();
 
-	devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED, "self_raw");
+	devfs_add_partition("nand0", 0x00000, SZ_128K, PARTITION_FIXED, "at91bootstrap_raw");
+	devfs_add_partition("nand0", SZ_128K, SZ_256K, PARTITION_FIXED, "self_raw");
 	dev_add_bb_dev("self_raw", "self0");
-	devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw");
+	devfs_add_partition("nand0", SZ_256K + SZ_128K, SZ_128K, PARTITION_FIXED, "env_raw");
 	dev_add_bb_dev("env_raw", "env0");
+	devfs_add_partition("nand0", SZ_512K, SZ_128K, PARTITION_FIXED, "env_raw1");
+	dev_add_bb_dev("env_raw1", "env1");
 
 	armlinux_set_bootparams((void *)(AT91_CHIPSELECT_1 + 0x100));
 	if (machine_is_at91sam9g10ek())
-- 
1.7.7


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-03-12 11:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 11:17 [PATCH 01/14] macb: fix mmu support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 02/14] at91sam9263ek: add runtime nor detection Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 03/14] at91sam9263ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 04/14] at91sam9263ek: add dfu and usb serial support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 05/14] at91sam9263ek: update defconfig Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-03-12 11:17 ` [PATCH 07/14] at91sam9261ek/9g10ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 08/14] at91sam9261ek/9g10ek: add dfu and usb serial support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 09/14] at91sam9261ek/9g10ek: add gpio Keyboard support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 10/14] at91sam9261ek/9g10ek: update board supprt Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:17 ` [PATCH 11/14] at91sam9m10g45ek: update partition layout Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:18 ` [PATCH 12/14] at91sam9m10g45ek: add leds support Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:18 ` [PATCH 13/14] at91sam9m10g45ek: update defconfig Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 11:18 ` [PATCH 14/14] at91sam9260ek/9g20ek: " Jean-Christophe PLAGNIOL-VILLARD
2012-03-13 13:37 ` [PATCH 01/14] macb: fix mmu support Sascha Hauer
2012-03-13 17:13   ` Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1331551082-7730-6-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=patrice.vilchez@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox