summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorChristian Hemp <c.hemp@phytec.de>2014-09-12 15:33:40 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-15 07:31:51 +0200
commit4790b0ee943d7813e841760436ce61aa29e91010 (patch)
tree8a9d3fcc1ff9b8d696c5c7b156f9bbf055069713 /arch/arm
parent71d06f83b426df979d9f358e2b690520bed88a68 (diff)
downloadbarebox-4790b0ee943d7813e841760436ce61aa29e91010.tar.gz
barebox-4790b0ee943d7813e841760436ce61aa29e91010.tar.xz
ARM:imx6:phycard: Switch env to defaultenv_append_directory
Signed-off-by: Christian Hemp <c.hemp@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/Makefile1
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/board.c3
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/boot/nand7
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/boot/sd-ext36
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/config-board (renamed from arch/arm/boards/phytec-phycard-imx6/env/config-board)2
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/init/automount14
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/env/boot/nand7
-rw-r--r--arch/arm/boards/phytec-phycard-imx6/env/boot/sd-ext36
8 files changed, 33 insertions, 13 deletions
diff --git a/arch/arm/boards/phytec-phycard-imx6/Makefile b/arch/arm/boards/phytec-phycard-imx6/Makefile
index 01c7a259e9..de67f04dde 100644
--- a/arch/arm/boards/phytec-phycard-imx6/Makefile
+++ b/arch/arm/boards/phytec-phycard-imx6/Makefile
@@ -1,2 +1,3 @@
obj-y += board.o
lwl-y += lowlevel.o
+bbenv-y += defaultenv-phycard-imx6
diff --git a/arch/arm/boards/phytec-phycard-imx6/board.c b/arch/arm/boards/phytec-phycard-imx6/board.c
index d425b48347..27b84aa1b8 100644
--- a/arch/arm/boards/phytec-phycard-imx6/board.c
+++ b/arch/arm/boards/phytec-phycard-imx6/board.c
@@ -17,6 +17,7 @@
*
*/
+#include <envfs.h>
#include <environment.h>
#include <bootsource.h>
#include <common.h>
@@ -44,6 +45,8 @@ static int phytec_pcaaxl3_init(void)
imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT);
+ defaultenv_append_directory(defaultenv_phycard_imx6);
+
return 0;
}
device_initcall(phytec_pcaaxl3_init);
diff --git a/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/boot/nand b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/boot/nand
new file mode 100644
index 0000000000..3f3a9aa2fc
--- /dev/null
+++ b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/boot/nand
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+global.bootm.image="/dev/nand0.kernel.bb"
+global.bootm.oftree="/dev/nand0.oftree.bb"
+bootargs-ip
+global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=root rootfstype=ubifs rw"
+
diff --git a/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/boot/sd-ext3 b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/boot/sd-ext3
new file mode 100644
index 0000000000..fd35fe0c74
--- /dev/null
+++ b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/boot/sd-ext3
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+global.bootm.image="/mnt/mmc/linuximage"
+global.bootm.oftree="/mnt/mmc/oftree"
+bootargs-ip
+global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext3 rootwait rw"
diff --git a/arch/arm/boards/phytec-phycard-imx6/env/config-board b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/config-board
index 44008aa3e7..4d7b37c313 100644
--- a/arch/arm/boards/phytec-phycard-imx6/env/config-board
+++ b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/config-board
@@ -3,5 +3,7 @@
# board defaults, do not change in running system. Change /env/config
# instead
+global.boot.default=nand
+
global.hostname=phyCARD-i.MX6
global.linux.bootargs.base="console=ttymxc2,115200"
diff --git a/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/init/automount b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/init/automount
new file mode 100644
index 0000000000..49d99bd78d
--- /dev/null
+++ b/arch/arm/boards/phytec-phycard-imx6/defaultenv-phycard-imx6/init/automount
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ "$1" = menu ]; then
+ init-menu-add-entry "$0" "Automountpoints"
+ exit
+fi
+
+# automount tftp server based on $eth0.serverip
+
+mkdir -p /mnt/tftp
+automount /mnt/tftp 'ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp'
+
+mkdir -p /mnt/mmc
+automount -d /mnt/mmc 'mmc2.probe=1 && [ -e /dev/mmc2.0 ] && mount /dev/mmc2.0 /mnt/mmc'
diff --git a/arch/arm/boards/phytec-phycard-imx6/env/boot/nand b/arch/arm/boards/phytec-phycard-imx6/env/boot/nand
deleted file mode 100644
index cf3b25c11d..0000000000
--- a/arch/arm/boards/phytec-phycard-imx6/env/boot/nand
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-global.bootm.image="/dev/nand0.kernel.bb"
-#global.bootm.oftree="/env/oftree"
-bootargs-ip
-global.linux.bootargs.dyn.root="root=ubi0:root ubi.mtd=nand0.root rootfstype=ubifs"
-
diff --git a/arch/arm/boards/phytec-phycard-imx6/env/boot/sd-ext3 b/arch/arm/boards/phytec-phycard-imx6/env/boot/sd-ext3
deleted file mode 100644
index 443563390c..0000000000
--- a/arch/arm/boards/phytec-phycard-imx6/env/boot/sd-ext3
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-global.bootm.image="/mnt/kernel/linuximage"
-#global.bootm.oftree="/boot/oftree"
-bootargs-ip
-global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext3 rootwait"