mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] eukrea_cpuimx27: update board support
@ 2010-10-13 10:14 Eric Bénard
  0 siblings, 0 replies; only message in thread
From: Eric Bénard @ 2010-10-13 10:14 UTC (permalink / raw)
  To: s.hauer; +Cc: barebox

- fix for LCD support
- environment update (last one before trying to use the generic env)

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/boards/eukrea_cpuimx27/env/bin/boot      |   12 +++++++-----
 arch/arm/boards/eukrea_cpuimx27/env/bin/init      |   10 ++++++++++
 arch/arm/boards/eukrea_cpuimx27/env/config        |    9 +++++++--
 arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c |    3 +++
 4 files changed, 27 insertions(+), 7 deletions(-)

diff --git a/arch/arm/boards/eukrea_cpuimx27/env/bin/boot b/arch/arm/boards/eukrea_cpuimx27/env/bin/boot
index 7272e56..0e1c80a 100644
--- a/arch/arm/boards/eukrea_cpuimx27/env/bin/boot
+++ b/arch/arm/boards/eukrea_cpuimx27/env/bin/boot
@@ -27,12 +27,14 @@ else
 	bootargs="$bootargs ip=off"
 fi
 
-if [ x$root = xnand ]; then
-	bootargs="$bootargs root=$rootpart_nand rootfstype=jffs2"
-elif [ x$root = xnor ]; then
-	bootargs="$bootargs root=$rootpart_nor rootfstype=jffs2"
+if [ x$rootfstype = xubifs ]; then
+	bootargs="$bootargs root=ubi0:$ubiroot ubi.mtd=$rootpartnum rootfstype=ubifs"
 else
-	bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp"
+	if [ x$root = xnand ]; then
+		bootargs="$bootargs root=$rootpart_nand rootfstype=jffs2"
+	elif [ x$root = xnor ]; then
+		bootargs="$bootargs root=$rootpart_nor rootfstype=jffs2"
+	fi
 fi
 
 bootargs="$bootargs mtdparts=physmap-flash.0:$nor_parts;mxc_nand:$nand_parts"
diff --git a/arch/arm/boards/eukrea_cpuimx27/env/bin/init b/arch/arm/boards/eukrea_cpuimx27/env/bin/init
index 3bfd194..aefd67c 100644
--- a/arch/arm/boards/eukrea_cpuimx27/env/bin/init
+++ b/arch/arm/boards/eukrea_cpuimx27/env/bin/init
@@ -16,11 +16,21 @@ if [ -e /dev/nand0 ]; then
 	source /env/bin/hush_hack 
 fi
 
+if [ -f /env/logo.bmp ]; then
+	bmp /env/logo.bmp
+	fb0.enable=1
+elif [ -f /env/logo.bmp.lzo ]; then
+	unlzo /env/logo.bmp.lzo /logo.bmp
+	bmp /logo.bmp
+	fb0.enable=1
+fi
+
 if [ -z $eth0.ethaddr ]; then
 	while [ -z $eth0.ethaddr ]; do
 		readline "no MAC address set for eth0. please enter the one found on your board: " eth0.ethaddr
 	done
 	echo -a /env/config "eth0.ethaddr=$eth0.ethaddr"
+	saveenv
 fi
 
 echo
diff --git a/arch/arm/boards/eukrea_cpuimx27/env/config b/arch/arm/boards/eukrea_cpuimx27/env/config
index 505ada3..6449cdf 100644
--- a/arch/arm/boards/eukrea_cpuimx27/env/config
+++ b/arch/arm/boards/eukrea_cpuimx27/env/config
@@ -3,9 +3,11 @@
 # can be either 'net', 'nor' or 'nand''
 kernel=nor
 root=nor
+rootfstype=ubifs
 
-uimage=mx27/uImage
-jffs2=mx27/rootfs.jffs2
+basedir=cpuimx27
+uimage=$basedir/uImage
+rootfs=$basedir/rootfs
 
 autoboot_timeout=1
 
@@ -19,6 +21,9 @@ rootpart_nor="/dev/mtdblock3"
 nand_parts="-(nand)"
 rootpart_nand=""
 
+rootpartnum=3
+ubiroot="eukrea-cpuimx27-rootfs"
+
 nfsroot=""
 
 # use 'dhcp' to do dhcp in barebox and in kernel
diff --git a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
index 4d1797b..c7570cf 100644
--- a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
+++ b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
@@ -275,6 +275,7 @@ static int eukrea_cpuimx27_devices_init(void)
 		PA29_PF_VSYNC,
 		PA31_PF_OE_ACD,
 		GPIO_PORTE | 5 | GPIO_GPIO | GPIO_OUT,
+		GPIO_PORTA | 25 | GPIO_GPIO | GPIO_OUT,
 #endif
 	};
 
@@ -311,6 +312,8 @@ static int eukrea_cpuimx27_devices_init(void)
 	register_device(&imxfb_dev);
 	gpio_direction_output(GPIO_PORTE | 5, 0);
 	gpio_set_value(GPIO_PORTE | 5, 1);
+	gpio_direction_output(GPIO_PORTA | 25, 0);
+	gpio_set_value(GPIO_PORTA | 25, 1);
 #endif
 
 	armlinux_add_dram(&sdram_dev);
-- 
1.7.0.4


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-10-13 10:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-13 10:14 [PATCH] eukrea_cpuimx27: update board support Eric Bénard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox