summaryrefslogtreecommitdiffstats
path: root/arch/ppc/boards/owc-da923rc/defaultenv-owc-da923rc/bin/init
blob: 80cc2cffb3aff092fd19ebcf3916cc61806bbc45 (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
#!/bin/sh
export PATH=/env/bin

source /env/config

#Define a 26MB partition in flash starting at offset 0x20000
addpart -n /dev/nor0 0x1a00000@0x20000(boot)
ubiattach /dev/boot

if [ $? -ne 0 ]; then
	echo "Fail to attach UBI device"
	exit 1;
fi

mkdir /mnt
mount -t ubifs /dev/ubi0.boot /mnt

echo
echo -n "Hit ctrl-c to stop autoboot: "
timeout -c 5

if [ $? -ne 0 ]; then
	exit 0
fi

boot