A9M2440: Addapting the default environment
Adapting the default environment to support booting from network and NAND Signed-off-by: Juergen Beisert <juergen@kreuzholzen.de>
This commit is contained in:
parent
f5194c3a3e
commit
5b28d03dbb
|
@ -24,8 +24,6 @@ if [ $? -ne 0 ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
unprotect $part
|
||||
|
||||
echo
|
||||
echo "erasing partition $part"
|
||||
erase $part
|
||||
|
|
|
@ -12,16 +12,16 @@ if [ x$1 = xnet ]; then
|
|||
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 = xnand ]; then
|
||||
bootargs="$bootargs root=$rootpart_nand rootfstype=jffs2"
|
||||
else
|
||||
fi
|
||||
if [ x$root = xnet ]; then
|
||||
bootargs="$bootargs root=/dev/nfs nfsroot=$eth0.serverip:$nfsroot,v3,tcp"
|
||||
if [ x$ip = xdhcp ]; then
|
||||
bootargs="$bootargs ip=dhcp"
|
||||
else
|
||||
bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask:::"
|
||||
fi
|
||||
fi
|
||||
|
||||
bootargs="$bootargs mtdparts=\"NAND 32MiB 3,3V 8-bit:$nand_parts\""
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
. /env/config
|
||||
|
||||
part=/dev/nand0.root.bb
|
||||
|
||||
if [ x$1 = x ]; then
|
||||
image=$jffs2
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue