mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] eukrea_cpuimx35: switch to default env
@ 2011-02-25 14:39 Eric Bénard
  2011-02-25 14:39 ` [PATCH 2/3] eukrea_cpuimx35: use OTG workaround only when gadget is selected Eric Bénard
  2011-02-25 14:39 ` [PATCH 3/3] eukrea_cpuimx35: update defconfig Eric Bénard
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Bénard @ 2011-02-25 14:39 UTC (permalink / raw)
  To: barebox

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/boards/eukrea_cpuimx35/env/bin/_update    |   36 -------------
 arch/arm/boards/eukrea_cpuimx35/env/bin/boot       |   52 -------------------
 arch/arm/boards/eukrea_cpuimx35/env/bin/hush_hack  |    1 -
 arch/arm/boards/eukrea_cpuimx35/env/bin/init       |   45 -----------------
 arch/arm/boards/eukrea_cpuimx35/env/bin/init_board |   20 +++++++
 .../boards/eukrea_cpuimx35/env/bin/update_kernel   |    8 ---
 .../arm/boards/eukrea_cpuimx35/env/bin/update_root |    8 ---
 arch/arm/boards/eukrea_cpuimx35/env/config         |   53 ++++++++++++++------
 8 files changed, 57 insertions(+), 166 deletions(-)
 delete mode 100644 arch/arm/boards/eukrea_cpuimx35/env/bin/_update
 delete mode 100644 arch/arm/boards/eukrea_cpuimx35/env/bin/boot
 delete mode 100644 arch/arm/boards/eukrea_cpuimx35/env/bin/hush_hack
 delete mode 100644 arch/arm/boards/eukrea_cpuimx35/env/bin/init
 create mode 100644 arch/arm/boards/eukrea_cpuimx35/env/bin/init_board
 delete mode 100644 arch/arm/boards/eukrea_cpuimx35/env/bin/update_kernel
 delete mode 100644 arch/arm/boards/eukrea_cpuimx35/env/bin/update_root

diff --git a/arch/arm/boards/eukrea_cpuimx35/env/bin/_update b/arch/arm/boards/eukrea_cpuimx35/env/bin/_update
deleted file mode 100644
index 014bce3..0000000
--- a/arch/arm/boards/eukrea_cpuimx35/env/bin/_update
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-
-if [ -z "$part" -o -z "$image" ]; then
-	echo "define \$part and \$image"
-	exit 1
-fi
-
-if [ ! -e "$part" ]; then
-	echo "Partition $part does not exist"
-	exit 1
-fi
-
-if [ $# = 1 ]; then
-	image=$1
-fi
-
-if [ x$ip = xdhcp ]; then
-	dhcp
-fi
-
-ping $eth0.serverip
-if [ $? -ne 0 ] ; then
-	echo "update aborted"
-	exit 1
-fi
-
-unprotect $part
-
-echo
-echo "erasing partition $part"
-erase $part
-
-echo
-echo "flashing $image to $part"
-echo
-tftp $image $part
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/bin/boot b/arch/arm/boards/eukrea_cpuimx35/env/bin/boot
deleted file mode 100644
index fca5b8c..0000000
--- a/arch/arm/boards/eukrea_cpuimx35/env/bin/boot
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh
-
-. /env/config
-
-if [ x$1 = xjffS2 ]; then
-	root=jffs2
-	kernel=nand
-fi
-
-if [ x$1 = xubifs ]; then
-	root=ubifs
-	kernel=nand
-fi
-
-if [ x$1 = xnet ]; then
-	root=net
-	kernel=net
-fi
-
-if [ x$ip = xdhcp ]; then
-	bootargs="$bootargs ip=dhcp"
-else
-	if [ x$ip = xoff ]; then
-		bootargs="$bootargs ip=off"
-	else
-		bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::"
-	fi
-fi
-
-if [ x$root = xjffs2 ]; then
-	bootargs="$bootargs root=/dev/mtdblock$rootpartnum_nand rootfstype=jffs2"
-fi
-
-if [ x$root = xubifs ]; then
-	bootargs="$bootargs root=ubi0:$ubiroot ubi.mtd=$rootpartnum_nand rootfstype=ubifs"
-fi
-
-if [ x$root = xnet ]; then
-	bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp"
-fi
-
-bootargs="$bootargs mtdparts=mxc_nand:$nand_parts"
-
-if [ $kernel = net ]; then
-	if [ x$ip = xdhcp ]; then
-		dhcp
-	fi
-	tftp $uimage uImage || exit 1
-	bootm uImage
-else
-	bootm /dev/nand0.kernel.bb
-fi
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/bin/hush_hack b/arch/arm/boards/eukrea_cpuimx35/env/bin/hush_hack
deleted file mode 100644
index 5fffa92..0000000
--- a/arch/arm/boards/eukrea_cpuimx35/env/bin/hush_hack
+++ /dev/null
@@ -1 +0,0 @@
-nand -a /dev/nand0.*
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/bin/init b/arch/arm/boards/eukrea_cpuimx35/env/bin/init
deleted file mode 100644
index b56d7b5..0000000
--- a/arch/arm/boards/eukrea_cpuimx35/env/bin/init
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-PATH=/env/bin
-export PATH
-
-. /env/config
-if [ -e /dev/nand0 ]; then
-	addpart /dev/nand0 $nand_parts
-
-	# Uh, oh, hush first expands wildcards and then starts executing
-	# commands. What a bug!
-	source /env/bin/hush_hack 
-fi
-
-if [ -f /env/logo.bmp ]; then
-	fb0.enable=1
-	bmp /env/logo.bmp
-	gpio_set_value 1 1
-elif [ -f /env/logo.bmp.lzo ]; then
-	unlzo /env/logo.bmp.lzo /logo.bmp
-	fb0.enable=1
-	bmp /logo.bmp
-	gpio_set_value 1 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
-echo -n "Hit any key to stop autoboot: "
-timeout -a $autoboot_timeout
-if [ $? != 0 ]; then
-	echo
-	echo "type update_kernel [<imagename>] to update kernel into flash"
-	echo "type update_root [<imagename>] to update rootfs into flash"
-	echo
-	exit
-fi
-
-boot
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board b/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board
new file mode 100644
index 0000000..173ecf9
--- /dev/null
+++ b/arch/arm/boards/eukrea_cpuimx35/env/bin/init_board
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if [ -f /env/logo.bmp ]; then
+	bmp /env/logo.bmp
+	fb0.enable=1
+	gpio_set_value 1 1
+elif [ -f /env/logo.bmp.lzo ]; then
+	unlzo /env/logo.bmp.lzo /logo.bmp
+	bmp /logo.bmp
+	fb0.enable=1
+	gpio_set_value 1 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
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/bin/update_kernel b/arch/arm/boards/eukrea_cpuimx35/env/bin/update_kernel
deleted file mode 100644
index c2d2cc3..0000000
--- a/arch/arm/boards/eukrea_cpuimx35/env/bin/update_kernel
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-. /env/config
-
-image=$uimage
-part=/dev/nand0.kernel.bb
-
-. /env/bin/_update $1
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/bin/update_root b/arch/arm/boards/eukrea_cpuimx35/env/bin/update_root
deleted file mode 100644
index dd89a5a..0000000
--- a/arch/arm/boards/eukrea_cpuimx35/env/bin/update_root
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-. /env/config
-
-image=$rootfs
-part=/dev/nand0.root.bb
-
-. /env/bin/_update $1
diff --git a/arch/arm/boards/eukrea_cpuimx35/env/config b/arch/arm/boards/eukrea_cpuimx35/env/config
index fc99e51..6ed6b24 100644
--- a/arch/arm/boards/eukrea_cpuimx35/env/config
+++ b/arch/arm/boards/eukrea_cpuimx35/env/config
@@ -1,27 +1,48 @@
 #!/bin/sh
 
-# can be either 'net' or 'nand''
-kernel=nand
-root=ubifs
+# otg port mode : can be 'host' or 'device'
+otg_mode="device"
 
-basedir=cpuimx35
-uimage=$basedir/uImage
-rootfs=$basedir/rootfs
-
-autoboot_timeout=1
-
-nfsroot=""
-bootargs="console=ttymxc0,115200"
-
-nand_parts="256k(barebox)ro,128k(bareboxenv),2432k(kernel),-(root)"
-rootpartnum_nand=3
-ubiroot="eukrea-cpuimx35-rootfs"
+machine=eukrea-cpuimx35
 
 # use 'dhcp' to do dhcp in barebox and in kernel
-ip=off
+# use 'none' if you want to skip kernel ip autoconfiguration
+ip=none
 
 # or set your networking parameters here
 #eth0.ipaddr=a.b.c.d
 #eth0.netmask=a.b.c.d
 #eth0.gateway=a.b.c.d
 #eth0.serverip=a.b.c.d
+
+# can be either 'net' or 'nand'
+kernel_loc=nand
+# can be either 'net', 'nand' or 'initrd'
+rootfs_loc=nand
+
+# rootfs
+rootfs_type=ubifs
+rootfsimage=$machine/rootfs.$rootfs_type
+
+# kernel
+kernelimage_type=uimage
+kernelimage=$machine/uImage-${machine}.bin
+
+# barebox and it's env
+bareboximage=$machine/barebox-${machine}.bin
+bareboxenvimage=$machine/bareboxenv-${machine}.bin
+
+nfsroot="$eth0.serverip:/srv/nfs/$machine"
+
+autoboot_timeout=1
+
+bootargs="console=ttymxc0,115200 otg_mode=$otg_mode"
+
+nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)"
+rootfs_mtdblock_nand=3
+nand_device="mxc_nand"
+ubiroot="$machine-rootfs"
+device_type="nand"
+
+# set a fancy prompt (if support is compiled in)
+PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m "
-- 
1.7.4


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/3] eukrea_cpuimx35: use OTG workaround only when gadget is selected
  2011-02-25 14:39 [PATCH 1/3] eukrea_cpuimx35: switch to default env Eric Bénard
@ 2011-02-25 14:39 ` Eric Bénard
  2011-02-25 14:39 ` [PATCH 3/3] eukrea_cpuimx35: update defconfig Eric Bénard
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Bénard @ 2011-02-25 14:39 UTC (permalink / raw)
  To: barebox

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
index f7a6169..f377793 100644
--- a/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/arch/arm/boards/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -199,11 +199,12 @@ static int eukrea_cpuimx35_devices_init(void)
 	imx35_usb_init();
 	register_device(&usbh2_dev);
 #endif
+#ifdef CONFIG_USB_GADGET
 	/* Workaround ENGcm09152 */
 	tmp = readl(IMX_OTG_BASE + 0x608);
 	writel(tmp | (1 << 23), IMX_OTG_BASE + 0x608);
 	register_device(&usbotg_dev);
-
+#endif
 	armlinux_add_dram(&sdram_dev);
 	armlinux_set_bootparams((void *)0x80000100);
 	armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX35);
-- 
1.7.4


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 3/3] eukrea_cpuimx35: update defconfig
  2011-02-25 14:39 [PATCH 1/3] eukrea_cpuimx35: switch to default env Eric Bénard
  2011-02-25 14:39 ` [PATCH 2/3] eukrea_cpuimx35: use OTG workaround only when gadget is selected Eric Bénard
@ 2011-02-25 14:39 ` Eric Bénard
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Bénard @ 2011-02-25 14:39 UTC (permalink / raw)
  To: barebox

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/configs/eukrea_cpuimx35_defconfig |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/configs/eukrea_cpuimx35_defconfig b/arch/arm/configs/eukrea_cpuimx35_defconfig
index af82827..6964332 100644
--- a/arch/arm/configs/eukrea_cpuimx35_defconfig
+++ b/arch/arm/configs/eukrea_cpuimx35_defconfig
@@ -2,17 +2,19 @@ CONFIG_ARCH_IMX=y
 CONFIG_CACHE_L2X0=y
 CONFIG_ARCH_IMX_INTERNAL_BOOT=y
 CONFIG_ARCH_IMX35=y
+CONFIG_IMX_IIM=y
+CONFIG_IMX_IIM_FUSE_BLOW=y
 CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
 CONFIG_MMU=y
 CONFIG_MALLOC_SIZE=0x800000
 CONFIG_LONGHELP=y
 CONFIG_GLOB=y
 CONFIG_HUSH_FANCY_PROMPT=y
-CONFIG_HUSH_GETOPT=y
 CONFIG_CMDLINE_EDITING=y
 CONFIG_AUTO_COMPLETE=y
 # CONFIG_CONSOLE_ACTIVATE_FIRST is not set
 CONFIG_CONSOLE_ACTIVATE_ALL=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
 CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/eukrea_cpuimx35/env"
 CONFIG_CMD_EDIT=y
 CONFIG_CMD_SLEEP=y
@@ -24,8 +26,6 @@ CONFIG_CMD_READLINE=y
 CONFIG_CMD_ECHO_E=y
 CONFIG_CMD_LOADB=y
 CONFIG_CMD_MEMINFO=y
-CONFIG_CMD_CRC=y
-CONFIG_CMD_CRC_CMP=y
 CONFIG_CMD_MTEST=y
 CONFIG_CMD_FLASH=y
 CONFIG_CMD_RESET=y
@@ -40,6 +40,7 @@ CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_PING=y
 CONFIG_NET_TFTP=y
+CONFIG_NET_TFTP_PUSH=y
 CONFIG_DRIVER_NET_FEC_IMX=y
 # CONFIG_SPI is not set
 CONFIG_I2C=y
@@ -49,7 +50,6 @@ CONFIG_NAND=y
 CONFIG_NAND_IMX=y
 CONFIG_USB=y
 CONFIG_USB_EHCI=y
-CONFIG_USB_GADGET=y
 CONFIG_VIDEO=y
 CONFIG_DRIVER_VIDEO_IMX_IPU=y
 CONFIG_MCI=y
-- 
1.7.4


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-02-25 14:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-25 14:39 [PATCH 1/3] eukrea_cpuimx35: switch to default env Eric Bénard
2011-02-25 14:39 ` [PATCH 2/3] eukrea_cpuimx35: use OTG workaround only when gadget is selected Eric Bénard
2011-02-25 14:39 ` [PATCH 3/3] eukrea_cpuimx35: update defconfig 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