mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Renaud Barbier <renaud.barbier@ge.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RESEND PATCH] ppc: P2020RDB: add environment partition support
Date: Wed, 2 Apr 2014 16:35:05 +0200	[thread overview]
Message-ID: <20140402143500.GA25539@omega.Speedport_W_921V_1_24_000> (raw)
In-Reply-To: <1396448321-11342-1-git-send-email-renaud.barbier@ge.com>

Hi Renaud,

On Wed, Apr 02, 2014 at 03:18:41PM +0100, Renaud Barbier wrote:
> Add an environment partition and support commands so that the system
> configuration can be permanent.
> 
> Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
> ---
>  arch/ppc/boards/freescale-p2020rdb/env/bin/init |  2 ++
>  arch/ppc/boards/freescale-p2020rdb/env/config   |  2 ++
>  arch/ppc/boards/freescale-p2020rdb/p2020rdb.c   |  9 +++++----
>  arch/ppc/configs/p2020rdb_defconfig             | 21 ++++++++++++++++++++-
>  4 files changed, 29 insertions(+), 5 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..4d7b03e
> --- /dev/null
> +++ b/arch/ppc/boards/freescale-p2020rdb/env/bin/init
> @@ -0,0 +1,2 @@
> +#!/bin/sh
> +source /env/config
> \ No newline at end of file
> diff --git a/arch/ppc/boards/freescale-p2020rdb/env/config b/arch/ppc/boards/freescale-p2020rdb/env/config
> new file mode 100644
> index 0000000..23e0ba2
> --- /dev/null
> +++ b/arch/ppc/boards/freescale-p2020rdb/env/config
> @@ -0,0 +1,2 @@
> +#!/bin/sh
> +export bootargs="root=/dev/nfs rw ip=bootp"
> \ No newline at end of file
> diff --git a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
> index 4d2ff22..229ae41 100644
> --- a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
> +++ b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
> @@ -83,7 +83,10 @@ struct i2c_platform_data i2cplat = {
>  static int devices_init(void)
>  {
>  	add_cfi_flash_device(DEVICE_ID_DYNAMIC, CFG_FLASH_BASE, 16 << 20, 0);
> -
> +	devfs_add_partition("nor0", 0xf60000, 0x8000, DEVFS_PARTITION_FIXED,
> +			"env0");
> +	devfs_add_partition("nor0", 0xf80000, 0x80000, DEVFS_PARTITION_FIXED,
> +			"self0");

I think this should be:

	devfs_add_partition("nor0", 0xf60000, SZ_512K, DEVFS_PARTITION_FIXED,
			"self0");
	devfs_add_partition("nor0", 0xf60000 + SZ_512K, SZ_32K, DEVFS_PARTITION_FIXED,
			"env0");

or your version is still correct? Or why you placed the env before self0 with a
little room there?

And maybe we can use SZ_512K and SZ_32K.

- Alex

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

  reply	other threads:[~2014-04-02 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 14:18 Renaud Barbier
2014-04-02 14:35 ` Alexander Aring [this message]
2014-04-02 15:01   ` Renaud Barbier
2014-04-03  5:54 ` Sascha Hauer

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=20140402143500.GA25539@omega.Speedport_W_921V_1_24_000 \
    --to=alex.aring@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=renaud.barbier@ge.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