summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/zii-common/defaultenv-zii-common/boot/net
blob: 8b07cbbc9982af4a6a2a6a2859ff74404eef6839 (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
#!/bin/sh

path="/mnt/tftp"

#
# Clear seat network config. Some boards don't have that config, so
# check that it is set first
#
if [ -n ${global.linux.bootargs.rdu_network} ]; then
    global.linux.bootargs.rdu_network=
fi

global.bootm.image="${path}/${global.user}-linux-${global.hostname}"

oftree="${path}/${global.user}-oftree-${global.hostname}"
if [ -f "${oftree}" ]; then
	global.bootm.oftree="$oftree"
fi

nfsroot="/home/${global.user}/nfsroot/${global.hostname}"

ip_route_get -b ${global.net.server} global.linux.bootargs.dyn.ip

initramfs="${path}/${global.user}-initramfs-${global.hostname}"
if [ -f "${initramfs}" ]; then
	global.bootm.initrd="$initramfs"
else
	global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
fi