summaryrefslogtreecommitdiffstats
path: root/arch/x86/boards/x86_generic/env/bin/boot
blob: fcfffe3194245c1b13c1ab33c08c0984d4636cac (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
36
37
#!/bin/sh

. /env/config

if [ x$1 = xdisk ]; then
	root=disk
	kernel=disk
fi

if [ x$1 = xnet ]; then
	root=net
	kernel=net
fi

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

if [ x$root = xdisk ]; then
	bootargs="$bootargs root=$rootpart_disk rootfstype=$rootpart_fs rw"
else
	bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp rw"
fi

if [ $kernel = net ]; then
	if [ x$ip = xdhcp ]; then
		dhcp
	fi
	tftp $uimage uImage || exit 1
	bootm uImage
else
	bootargs="BOOT_IMAGE=$kernel_device auto $bootargs"
	linux16 $kernel_device
fi