defaultenv: add kernel_loc nfs and tftp support
before we can only support tftp so keep it as default Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
3e48ef43ed
commit
9eac282024
|
@ -10,8 +10,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net' or 'nand'
|
# can be either 'nfs', 'tftp' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nand' or 'initrd'
|
# can be either 'net', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net' , 'nor' or 'nand'
|
# can be either 'nfs', 'tftp', 'nor' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nor', 'nand' or 'initrd'
|
# can be either 'net', 'nor', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net' or 'nand'
|
# can be either 'nfs', 'tftp' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nand' or 'initrd'
|
# can be either 'net', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ ip=none
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net' or 'nand'
|
# can be either 'nfs', 'tftp' or 'nand'
|
||||||
kernel_loc=nand
|
kernel_loc=nand
|
||||||
# can be either 'net', 'nand' or 'initrd'
|
# can be either 'net', 'nand' or 'initrd'
|
||||||
rootfs_loc=nand
|
rootfs_loc=nand
|
||||||
|
|
|
@ -15,7 +15,7 @@ ip=none
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net' or 'nand'
|
# can be either 'nfs', 'tftp' or 'nand'
|
||||||
kernel_loc=nand
|
kernel_loc=nand
|
||||||
# can be either 'net', 'nand' or 'initrd'
|
# can be either 'net', 'nand' or 'initrd'
|
||||||
rootfs_loc=nand
|
rootfs_loc=nand
|
||||||
|
|
|
@ -18,7 +18,7 @@ ip=none
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net' or 'nand'
|
# can be either 'nfs', 'tftp' or 'nand'
|
||||||
kernel_loc=nand
|
kernel_loc=nand
|
||||||
# can be either 'net', 'nand' or 'initrd'
|
# can be either 'net', 'nand' or 'initrd'
|
||||||
rootfs_loc=nand
|
rootfs_loc=nand
|
||||||
|
|
|
@ -14,8 +14,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net', 'nor' or 'nand'
|
# can be either 'nfs', 'tftp', 'nor' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nor', 'nand' or 'initrd'
|
# can be either 'net', 'nor', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net', 'nor' or 'nand'
|
# can be either 'nfs', 'tftp', 'nor' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nor', 'nand' or 'initrd'
|
# can be either 'net', 'nor', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net', 'nor' or 'nand'
|
# can be either 'nfs', 'tftp', 'nor' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nor', 'nand' or 'initrd'
|
# can be either 'net', 'nor', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net', 'nor' or 'nand'
|
# can be either 'nfs', 'tftp', 'nor' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nor', 'nand' or 'initrd'
|
# can be either 'net', 'nor', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ ip=dhcp
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net'
|
# can be either 'nfs' or 'tftp'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net' or 'initrd'
|
# can be either 'net' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ ip=dhcp
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net'
|
# can be either 'nfs' or 'tftp'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net' or 'initrd'
|
# can be either 'net' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net', or 'nand'
|
# can be either 'nfs', 'tftp' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nand' or 'initrd'
|
# can be either 'net', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net' or 'nand'
|
# can be either 'nfs', 'tftp' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nand' or 'initrd'
|
# can be either 'net', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net', 'nor' or 'nand'
|
# can be either 'nfs', 'tftp', nor' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nor', 'nand' or 'initrd'
|
# can be either 'net', 'nor', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net', 'nor' or 'nand'
|
# can be either 'nfs', 'tftp', 'nor' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nor', 'nand' or 'initrd'
|
# can be either 'net', 'nor', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net', 'nor' or 'nand'
|
# can be either 'nfs', 'tftp', 'nor' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nor', 'nand' or 'initrd'
|
# can be either 'net', 'nor', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net', 'nor' or 'nand'
|
# can be either 'nfs', 'tftp', 'nor' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nor', 'nand' or 'initrd'
|
# can be either 'net', 'nor', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net' or 'nand'
|
# can be either 'nfs', 'tftp' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nand' or 'initrd'
|
# can be either 'net', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net' or 'nand'
|
# can be either 'nfs', 'tftp' or 'nand'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nand' or 'initrd'
|
# can be either 'net', 'nand' or 'initrd'
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ ip=dhcp
|
||||||
#eth0.gateway=a.b.c.d
|
#eth0.gateway=a.b.c.d
|
||||||
#eth0.serverip=a.b.c.d
|
#eth0.serverip=a.b.c.d
|
||||||
|
|
||||||
# can be either 'net' or 'nor'
|
# can be either 'nfs', 'tftp' or 'nor'
|
||||||
kernel_loc=net
|
kernel_loc=tftp
|
||||||
# can be either 'net', 'nor' or 'initrd'
|
# can be either 'net', 'nor' or 'initrd'
|
||||||
rootfs_loc=initrd
|
rootfs_loc=initrd
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,12 @@ if [ x$1 = xnand ]; then
|
||||||
elif [ x$1 = xnor ]; then
|
elif [ x$1 = xnor ]; then
|
||||||
rootfs_loc=nor
|
rootfs_loc=nor
|
||||||
kernel_loc=nor
|
kernel_loc=nor
|
||||||
elif [ x$1 = xnet ]; then
|
elif [ x$1 = xnfs ]; then
|
||||||
rootfs_loc=net
|
rootfs_loc=net
|
||||||
kernel_loc=net
|
kernel_loc=nfs
|
||||||
|
elif [ x$1 = xtftp ]; then
|
||||||
|
rootfs_loc=net
|
||||||
|
kernel_loc=tftp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ x$ip = xdhcp ]; then
|
if [ x$ip = xdhcp ]; then
|
||||||
|
@ -71,7 +74,7 @@ if [ ! -e /dev/ram0.kernel ]; then
|
||||||
addpart /dev/ram0 8M@8M(kernel)
|
addpart /dev/ram0 8M@8M(kernel)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ x$kernel_loc = xnet ]; then
|
if [ x$kernel_loc = xnfs ] || [ x$kernel_loc = xtftp ]; then
|
||||||
if [ x$ip = xdhcp ]; then
|
if [ x$ip = xdhcp ]; then
|
||||||
dhcp
|
dhcp
|
||||||
fi
|
fi
|
||||||
|
@ -87,14 +90,14 @@ if [ x$kernel_loc = xnet ]; then
|
||||||
echo "error: set kernelimage_type to one of 'uimage', 'zimage', 'raw' or 'raw_lzo'"
|
echo "error: set kernelimage_type to one of 'uimage', 'zimage', 'raw' or 'raw_lzo'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
tftp $kernelimage $netload || exit 1
|
$kernel_loc $kernelimage $netload || exit 1
|
||||||
kdev="$netload"
|
kdev="$netload"
|
||||||
elif [ x$kernel_loc = xnor ]; then
|
elif [ x$kernel_loc = xnor ]; then
|
||||||
kdev="/dev/nor0.kernel"
|
kdev="/dev/nor0.kernel"
|
||||||
elif [ x$kernel_loc = xnand ]; then
|
elif [ x$kernel_loc = xnand ]; then
|
||||||
kdev="/dev/nand0.kernel.bb"
|
kdev="/dev/nand0.kernel.bb"
|
||||||
else
|
else
|
||||||
echo "error: set kernel_loc to one of 'net', 'nand' or 'nor'"
|
echo "error: set kernel_loc to one of 'nfs', 'tftp', 'nand' or 'nor'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue