summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board')
-rw-r--r--arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board41
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board b/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board
new file mode 100644
index 0000000000..8f4151c357
--- /dev/null
+++ b/arch/arm/boards/eukrea_cpuimx25/defaultenv-eukrea_cpuimx25/bin/init_board
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+if [ -f /env/logo.bmp ]; then
+ splash /env/logo.bmp
+ fb0.enable=1
+elif [ -f /env/logo.bmp.lzo ]; then
+ uncompress /env/logo.bmp.lzo /logo.bmp
+ splash /logo.bmp
+ fb0.enable=1
+fi
+
+if [ ! -z $use_dfu ]; then
+ gpio_get_value 82
+ if [ $? -eq 0 ]; then
+ gpio_set_value 83 0
+ usbserial
+ timeout -s -a 2
+ gpio_get_value 82
+ if [ $? -eq 0 ]; then
+ usbserial -d
+ dfu -V 0x1234 -P 0x1234 /dev/nand0.barebox.bb(barebox)sr,/dev/nand0.kernel.bb(kernel)r,/dev/nand0.root.bb(root)r
+ gpio_get_value 82
+ if [ $? -eq 0 ]; then
+ usbserial
+ autoboot_timeout=60
+ else
+ reset
+ fi
+ else
+ autoboot_timeout=28
+ fi
+ fi
+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