From: "Eric Bénard" <eric@eukrea.com>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] eukrea_cpuimx35: switch to default env
Date: Fri, 25 Feb 2011 15:39:23 +0100 [thread overview]
Message-ID: <1298644765-31654-1-git-send-email-eric@eukrea.com> (raw)
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
next reply other threads:[~2011-02-25 14:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 14:39 Eric Bénard [this message]
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
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=1298644765-31654-1-git-send-email-eric@eukrea.com \
--to=eric@eukrea.com \
--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