summaryrefslogtreecommitdiffstats
path: root/defaultenv/bin/init
blob: 6e85a82e8c8e4b1b30ccb06a9261848e7210415e (plain) (blame)
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
#!/bin/sh

PATH=/env/bin
export PATH

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

if [ -e /dev/disk0 -a -n "$disk_parts" ]; then
	addpart /dev/disk0 $disk_parts
fi

if [ -e /dev/nand0 -a -n "$nand_parts" ]; then
	addpart /dev/nand0 $nand_parts
	nand -a /dev/nand0.*
fi

if [ -f /env/bin/init_board ]; then
	. /env/bin/init_board
fi

if [ -f /env/bin/boot_board ]; then
	. /env/bin/boot_board
else
	echo
	echo -n "Hit any key to stop autoboot: "
	timeout -a $autoboot_timeout
	if [ $? != 0 ]; then
		exit
	fi

	boot
fi