mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Renaud Barbier <renaud.barbier@ge.com>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] ppc: P2020RDB configuration update
Date: Tue,  3 Sep 2013 15:54:27 +0100	[thread overview]
Message-ID: <1378220067-22296-5-git-send-email-renaud.barbier@ge.com> (raw)
In-Reply-To: <1378220067-22296-1-git-send-email-renaud.barbier@ge.com>

The P2020rdb defconfig has been updated to include
device tree, environment and boot command support for
booting Linux.

Also the P2020RDB board support defines a flash area to
store its environment for users to configure the boot process.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
---
 arch/ppc/boards/freescale-p2020rdb/env/bin/init |    3 +++
 arch/ppc/boards/freescale-p2020rdb/env/config   |    2 ++
 arch/ppc/boards/freescale-p2020rdb/p2020rdb.c   |    7 +++++++
 arch/ppc/configs/p2020rdb_defconfig             |   14 +++++++++++++-
 4 files changed, 25 insertions(+), 1 deletions(-)
 create mode 100644 arch/ppc/boards/freescale-p2020rdb/env/bin/init
 create mode 100644 arch/ppc/boards/freescale-p2020rdb/env/config

diff --git a/arch/ppc/boards/freescale-p2020rdb/env/bin/init b/arch/ppc/boards/freescale-p2020rdb/env/bin/init
new file mode 100644
index 0000000..6bd125c
--- /dev/null
+++ b/arch/ppc/boards/freescale-p2020rdb/env/bin/init
@@ -0,0 +1,3 @@
+#!/bin/sh
+export PATH=/env/bin
+source /env/config
diff --git a/arch/ppc/boards/freescale-p2020rdb/env/config b/arch/ppc/boards/freescale-p2020rdb/env/config
new file mode 100644
index 0000000..26b1a9a
--- /dev/null
+++ b/arch/ppc/boards/freescale-p2020rdb/env/config
@@ -0,0 +1,2 @@
+#!/bin/sh
+export bootargs="root=/dev/nfs rw ip=bootp panic=10"
diff --git a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
index 4d2ff22..bc36b28 100644
--- a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
+++ b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
@@ -92,6 +92,13 @@ static int devices_init(void)
 	fsl_eth_init(2, &gfar_info[0]);
 	fsl_eth_init(3, &gfar_info[1]);
 
+	/* The env0 offset 0x770000 is from the base address of the alternate
+	 * boot area where barebox boots from. Programming barebox in the
+	 * primary boot area in place of U-Boot may lead to loss of data when
+	 * saving the environment.
+	 */
+	devfs_add_partition("nor0", 0x770000, 0x10000, DEVFS_PARTITION_FIXED,
+			    "env0");
 	devfs_add_partition("nor0", 0xf80000, 0x80000, DEVFS_PARTITION_FIXED,
 			    "self0");
 	return 0;
diff --git a/arch/ppc/configs/p2020rdb_defconfig b/arch/ppc/configs/p2020rdb_defconfig
index 0f77903..8907511 100644
--- a/arch/ppc/configs/p2020rdb_defconfig
+++ b/arch/ppc/configs/p2020rdb_defconfig
@@ -5,10 +5,18 @@ CONFIG_LONGHELP=y
 CONFIG_GLOB=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
+CONFIG_CMD_PARTITION=y
 CONFIG_CMD_SLEEP=y
 CONFIG_CMD_FLASH=y
 CONFIG_CMD_RESET=y
 CONFIG_CMD_GO=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC=n
+CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/ppc/boards/freescale-p2020rdb/env"
+CONFIG_CMD_LOADENV=y
+CONFIG_CMD_SAVEENV=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_EXPORT=y
+CONFIG_CMD_EDIT=y
 CONFIG_FSL_ELBC=y
 CONFIG_DRIVER_CFI=y
 CONFIG_DRIVER_CFI_AMD=y
@@ -17,7 +25,7 @@ CONFIG_DRIVER_CFI_BANK_WIDTH_1=n
 CONFIG_DRIVER_CFI_BANK_WIDTH_2=y
 CONFIG_DRIVER_CFI_BANK_WIDTH_4=n
 CONFIG_MTD=y
-CONFIG_MALLOC_SIZE=0x200000
+CONFIG_MALLOC_SIZE=0x800000
 CONFIG_BAUDRATE=115200
 CONFIG_DRIVER_SERIAL_NS16550=y
 CONFIG_RELOCATABLE=y
@@ -32,3 +40,7 @@ CONFIG_I2C=y
 CONFIG_I2C_IMX=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MIITOOL=y
+CONFIG_ZLIB=y
+CONFIG_OFTREE=y
+CONFIG_CMD_OFTREE=y
+CONFIG_OFDEVICE=y
-- 
1.7.1


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

  parent reply	other threads:[~2013-09-03 14:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 14:54 [PATCH v2 0/4] Update P2020RDB board support to allow NFS booting Renaud Barbier
2013-09-03 14:54 ` [PATCH 1/4] of: base: import of_find_node_by_type Renaud Barbier
2013-09-03 14:54 ` [PATCH 2/4] ppc: add and update device tree fixup functions Renaud Barbier
2013-09-03 14:54 ` [PATCH 3/4] ppc: bootm: relocate fdt to valid boot memory Renaud Barbier
2013-09-05 12:21   ` Sascha Hauer
2013-09-06 10:53     ` Renaud Barbier
2013-09-09 15:08       ` Sascha Hauer
2013-09-03 14:54 ` Renaud Barbier [this message]
2013-09-04  6:46 ` [PATCH v2 0/4] Update P2020RDB board support to allow NFS booting Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2013-08-30 13:34 [PATCH " Renaud Barbier
2013-08-30 13:34 ` [PATCH 4/4] ppc: P2020RDB configuration update Renaud Barbier

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=1378220067-22296-5-git-send-email-renaud.barbier@ge.com \
    --to=renaud.barbier@ge.com \
    --cc=barebox@lists.infradead.org \
    /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