summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorChristian Hemp <c.hemp@phytec.de>2014-09-12 15:33:41 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-09-15 07:31:51 +0200
commit57fd4426a37d32adf4ee997ad422d3c2a8f3661e (patch)
tree02604116af6d5886ec134d817829605507172456 /arch/arm
parent4790b0ee943d7813e841760436ce61aa29e91010 (diff)
downloadbarebox-57fd4426a37d32adf4ee997ad422d3c2a8f3661e.tar.gz
barebox-57fd4426a37d32adf4ee997ad422d3c2a8f3661e.tar.xz
ARM:imx6:phyflex: Add defaultenv
Add defaultenv_append_directory to phyFLEX-i.MX6. 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-phyflex-imx6/Makefile1
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/board.c3
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/boot/nand6
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/boot/sd-ext36
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/config-board9
-rw-r--r--arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/init/automount14
6 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/boards/phytec-phyflex-imx6/Makefile b/arch/arm/boards/phytec-phyflex-imx6/Makefile
index 01c7a259e9..11e1c7dc38 100644
--- a/arch/arm/boards/phytec-phyflex-imx6/Makefile
+++ b/arch/arm/boards/phytec-phyflex-imx6/Makefile
@@ -1,2 +1,3 @@
obj-y += board.o
lwl-y += lowlevel.o
+bbenv-y += defaultenv-phyflex-imx6
diff --git a/arch/arm/boards/phytec-phyflex-imx6/board.c b/arch/arm/boards/phytec-phyflex-imx6/board.c
index 94e3f6fcf1..843edac70c 100644
--- a/arch/arm/boards/phytec-phyflex-imx6/board.c
+++ b/arch/arm/boards/phytec-phyflex-imx6/board.c
@@ -17,6 +17,7 @@
*
*/
+#include <envfs.h>
#include <common.h>
#include <gpio.h>
#include <init.h>
@@ -102,6 +103,8 @@ static int phytec_pfla02_init(void)
imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT);
+ defaultenv_append_directory(defaultenv_phyflex_imx6);
+
return 0;
}
device_initcall(phytec_pfla02_init);
diff --git a/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/boot/nand b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/boot/nand
new file mode 100644
index 0000000000..79dc03c34a
--- /dev/null
+++ b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/boot/nand
@@ -0,0 +1,6 @@
+#!/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-phyflex-imx6/defaultenv-phyflex-imx6/boot/sd-ext3 b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/boot/sd-ext3
new file mode 100644
index 0000000000..fd35fe0c74
--- /dev/null
+++ b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-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-phyflex-imx6/defaultenv-phyflex-imx6/config-board b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/config-board
new file mode 100644
index 0000000000..b40a4de8c7
--- /dev/null
+++ b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/config-board
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# board defaults, do not change in running system. Change /env/config
+# instead
+
+global.boot.default=nand
+
+global.hostname=phyFLEX-i.MX6
+global.linux.bootargs.base="console=ttymxc3,115200"
diff --git a/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/init/automount b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-imx6/init/automount
new file mode 100644
index 0000000000..49d99bd78d
--- /dev/null
+++ b/arch/arm/boards/phytec-phyflex-imx6/defaultenv-phyflex-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'