mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] ARM: AM335x: phycore: change to defaultenv_append_directory
Date: Thu, 15 May 2014 13:57:20 +0200	[thread overview]
Message-ID: <1400155042-30101-1-git-send-email-s.hauer@pengutronix.de> (raw)

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boards/phytec-phycore-am335x/Makefile                |  1 +
 arch/arm/boards/phytec-phycore-am335x/board.c                 |  2 ++
 .../phytec-phycore-am335x/defaultenv-phycore-am335x/boot/mmc  | 10 ++++++++++
 .../phytec-phycore-am335x/defaultenv-phycore-am335x/boot/nand | 10 ++++++++++
 .../phytec-phycore-am335x/defaultenv-phycore-am335x/boot/spi  | 11 +++++++++++
 .../defaultenv-phycore-am335x/config-board                    |  7 +++++++
 arch/arm/boards/phytec-phycore-am335x/env/boot/mmc            | 10 ----------
 arch/arm/boards/phytec-phycore-am335x/env/boot/nand           | 10 ----------
 arch/arm/boards/phytec-phycore-am335x/env/boot/spi            | 11 -----------
 arch/arm/boards/phytec-phycore-am335x/env/config-board        |  7 -------
 arch/arm/configs/phytec-phycore-am335x_defconfig              |  1 -
 11 files changed, 41 insertions(+), 39 deletions(-)
 create mode 100644 arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/mmc
 create mode 100644 arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/nand
 create mode 100644 arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/spi
 create mode 100644 arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/config-board
 delete mode 100644 arch/arm/boards/phytec-phycore-am335x/env/boot/mmc
 delete mode 100644 arch/arm/boards/phytec-phycore-am335x/env/boot/nand
 delete mode 100644 arch/arm/boards/phytec-phycore-am335x/env/boot/spi
 delete mode 100644 arch/arm/boards/phytec-phycore-am335x/env/config-board

diff --git a/arch/arm/boards/phytec-phycore-am335x/Makefile b/arch/arm/boards/phytec-phycore-am335x/Makefile
index 092c31d..173a6b6 100644
--- a/arch/arm/boards/phytec-phycore-am335x/Makefile
+++ b/arch/arm/boards/phytec-phycore-am335x/Makefile
@@ -1,2 +1,3 @@
 lwl-y += lowlevel.o
 obj-y += board.o
+bbenv-y += defaultenv-phycore-am335x
diff --git a/arch/arm/boards/phytec-phycore-am335x/board.c b/arch/arm/boards/phytec-phycore-am335x/board.c
index 59de42b..5ff6511 100644
--- a/arch/arm/boards/phytec-phycore-am335x/board.c
+++ b/arch/arm/boards/phytec-phycore-am335x/board.c
@@ -23,6 +23,7 @@
 #include <init.h>
 #include <io.h>
 #include <sizes.h>
+#include <envfs.h>
 #include <asm/armlinux.h>
 #include <generated/mach-types.h>
 #include <linux/phy.h>
@@ -67,6 +68,7 @@ static int pcm051_devices_init(void)
 
 	omap_set_barebox_part(&pcm051_barebox_part);
 	armlinux_set_architecture(MACH_TYPE_PCM051);
+	defaultenv_append_directory(defaultenv_phycore_am335x);
 
 	am33xx_bbu_spi_nor_mlo_register_handler("MLO.spi", "/dev/m25p0.xload");
 
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/mmc b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/mmc
new file mode 100644
index 0000000..93a2357
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/mmc
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+	boot-menu-add-entry "$0" "kernel & rootfs on SD card"
+	exit
+fi
+
+global.bootm.image=/boot/uImage
+#global.bootm.oftree=/boot/oftree
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext3 rootwait"
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/nand b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/nand
new file mode 100644
index 0000000..22d657e
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/nand
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+	boot-menu-add-entry "$0" "nand (UBI)"
+	exit
+fi
+
+global.bootm.image="/dev/nand0.kernel.bb"
+#global.bootm.oftree="/env/oftree"
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root,2048 rootfstype=ubifs"
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/spi b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/spi
new file mode 100644
index 0000000..2d10184
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/boot/spi
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+        boot-menu-add-entry "$0" "SPI NOR Flash"
+        exit
+fi
+
+global.bootm.image="/dev/m25p0.kernel"
+
+# Use rootfs form NAND for now as rootfs partition < 4MB
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root,2048 rootfstype=ubifs"
diff --git a/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/config-board b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/config-board
new file mode 100644
index 0000000..7f0b2b7
--- /dev/null
+++ b/arch/arm/boards/phytec-phycore-am335x/defaultenv-phycore-am335x/config-board
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.hostname=pcm051
+global.linux.bootargs.base="console=ttyO0,115200"
diff --git a/arch/arm/boards/phytec-phycore-am335x/env/boot/mmc b/arch/arm/boards/phytec-phycore-am335x/env/boot/mmc
deleted file mode 100644
index 93a2357..0000000
--- a/arch/arm/boards/phytec-phycore-am335x/env/boot/mmc
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	boot-menu-add-entry "$0" "kernel & rootfs on SD card"
-	exit
-fi
-
-global.bootm.image=/boot/uImage
-#global.bootm.oftree=/boot/oftree
-global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext3 rootwait"
diff --git a/arch/arm/boards/phytec-phycore-am335x/env/boot/nand b/arch/arm/boards/phytec-phycore-am335x/env/boot/nand
deleted file mode 100644
index 22d657e..0000000
--- a/arch/arm/boards/phytec-phycore-am335x/env/boot/nand
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-	boot-menu-add-entry "$0" "nand (UBI)"
-	exit
-fi
-
-global.bootm.image="/dev/nand0.kernel.bb"
-#global.bootm.oftree="/env/oftree"
-global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root,2048 rootfstype=ubifs"
diff --git a/arch/arm/boards/phytec-phycore-am335x/env/boot/spi b/arch/arm/boards/phytec-phycore-am335x/env/boot/spi
deleted file mode 100644
index 2d10184..0000000
--- a/arch/arm/boards/phytec-phycore-am335x/env/boot/spi
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-if [ "$1" = menu ]; then
-        boot-menu-add-entry "$0" "SPI NOR Flash"
-        exit
-fi
-
-global.bootm.image="/dev/m25p0.kernel"
-
-# Use rootfs form NAND for now as rootfs partition < 4MB
-global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root,2048 rootfstype=ubifs"
diff --git a/arch/arm/boards/phytec-phycore-am335x/env/config-board b/arch/arm/boards/phytec-phycore-am335x/env/config-board
deleted file mode 100644
index 7f0b2b7..0000000
--- a/arch/arm/boards/phytec-phycore-am335x/env/config-board
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-# board defaults, do not change in running system. Change /env/config
-# instead
-
-global.hostname=pcm051
-global.linux.bootargs.base="console=ttyO0,115200"
diff --git a/arch/arm/configs/phytec-phycore-am335x_defconfig b/arch/arm/configs/phytec-phycore-am335x_defconfig
index c74116b..cb06183 100644
--- a/arch/arm/configs/phytec-phycore-am335x_defconfig
+++ b/arch/arm/configs/phytec-phycore-am335x_defconfig
@@ -22,7 +22,6 @@ CONFIG_MENU=y
 # CONFIG_TIMESTAMP is not set
 CONFIG_BLSPEC=y
 CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
-CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/phytec-phycore-am335x/env"
 CONFIG_DEBUG_INFO=y
 CONFIG_CMD_EDIT=y
 CONFIG_CMD_SLEEP=y
-- 
2.0.0.rc0


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

             reply	other threads:[~2014-05-15 11:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15 11:57 Sascha Hauer [this message]
2014-05-15 11:57 ` [PATCH 2/3] ARM: AM335x: beaglebone: " Sascha Hauer
2014-05-15 11:57 ` [PATCH 3/3] ARM: AM335x: merge am335x config in a single config file 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=1400155042-30101-1-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --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