summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/imx233-olinuxino/env/bin/boot
blob: 60dd93f2974aca4f654f956894b72325c94b97ac (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
#!/bin/sh

. /env/config

if [ x$1 = xdisk ]; then
	rootfs_loc=disk
	kernel_loc=disk
elif [ x$1 = xnet ]; then
	rootfs_loc=net
	kernel_loc=net
fi

if [ x$ip = xdhcp ]; then
	bootargs="$bootargs ip=dhcp"
elif [ x$ip = xnone ]; then
	bootargs="$bootargs ip=none"
else
	bootargs="$bootargs ip=$eth0.ipaddr::$eth0.gateway:$eth0.netmask:::"
fi

if [ x$rootfs_loc = xdisk ]; then
	bootargs="$bootargs noinitrd rootfstype=$rootfs_type root=/dev/$rootfs_part"
elif [ x$rootfs_loc = xnet ]; then
	bootargs="$bootargs root=/dev/nfs nfsroot=$nfsroot,v3,tcp noinitrd"
elif [ x$rootfs_loc = xinitrd ]; then
	bootargs="$bootargs root=/dev/ram0 rdinit=/sbin/init"
fi


bootm -o $oftree_loc/imx23-olinuxino.dtb /dev/$kernel_part

echo "Booting failed. Correct setup of 'kernel_part'?"