[RESEND PATCH] ppc: P2020RDB: add environment partition support
Alexander Aring
alex.aring at gmail.com
Wed Apr 2 07:35:05 PDT 2014
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 at 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
More information about the barebox
mailing list