summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/eukrea_cpuimx27/env/bin/init
blob: cd74974e25d21696f7ad242372cae4cc9b3a23b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

PATH=/env/bin
export PATH

. /env/config
if [ -e /dev/nor0 ]; then
	addpart /dev/nor0 $nor_parts
fi

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
	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 $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 nand|nor [<imagename>] to update kernel into flash"
	echo "type update_root nand|nor [<imagename>] to update rootfs into flash"
	echo
	exit
fi

boot