2008-06-10 07:14:05 +00:00
|
|
|
echo
|
|
|
|
echo "==== running autoscript ===="
|
|
|
|
echo
|
|
|
|
setenv bootdtb bootm \${kernel_boot} \${mv_initrd_addr_ram} \${mv_dtb_addr_ram}
|
|
|
|
setenv ramkernel setenv kernel_boot \${loadaddr}
|
|
|
|
setenv flashkernel setenv kernel_boot \${mv_kernel_addr}
|
|
|
|
setenv cpird cp \${mv_initrd_addr} \${mv_initrd_addr_ram} \${mv_initrd_length}
|
2008-08-20 09:11:52 +00:00
|
|
|
setenv bootfromflash run flashkernel cpird ramparam addcons bootdtb
|
2008-06-10 07:14:05 +00:00
|
|
|
setenv getdtb tftp \${mv_dtb_addr_ram} \${dtb_name}
|
|
|
|
setenv cpdtb cp \${mv_dtb_addr} \${mv_dtb_addr_ram} 0x2000
|
|
|
|
setenv rundtb fdt addr \${mv_dtb_addr_ram}\;fdt boardsetup
|
|
|
|
setenv bootfromnet tftp \${mv_initrd_addr_ram} \${initrd_name}\;run ramkernel
|
2008-08-20 09:11:52 +00:00
|
|
|
if test ${console} = yes;
|
|
|
|
then
|
|
|
|
setenv addcons setenv bootargs \${bootargs} console=ttyS\${console_nr},\${baudrate}N8
|
|
|
|
else
|
|
|
|
setenv addcons setenv bootargs \${bootargs} console=tty0
|
|
|
|
fi
|
2008-06-10 07:14:05 +00:00
|
|
|
setenv set_static_ip setenv ipaddr \${static_ipaddr}
|
|
|
|
setenv set_static_nm setenv netmask \${static_netmask}
|
|
|
|
setenv set_static_gw setenv gatewayip \${static_gateway}
|
|
|
|
setenv set_ip setenv ip \${ipaddr}::\${gatewayip}:\${netmask}
|
|
|
|
setenv ramparam setenv bootargs root=/dev/ram0 ro rootfstype=squashfs
|
2009-09-17 02:38:10 +00:00
|
|
|
if test ${autoscript_boot} != no;
|
2008-06-10 07:14:05 +00:00
|
|
|
then
|
|
|
|
if test ${netboot} = yes;
|
|
|
|
then
|
|
|
|
bootp
|
|
|
|
if test $? = 0;
|
|
|
|
then
|
|
|
|
echo "=== bootp succeeded -> netboot ==="
|
|
|
|
run set_ip
|
2008-08-20 09:11:52 +00:00
|
|
|
run getdtb rundtb bootfromnet ramparam addcons bootdtb
|
2008-06-10 07:14:05 +00:00
|
|
|
else
|
|
|
|
echo "=== netboot failed ==="
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
run set_static_ip set_static_nm set_static_gw set_ip
|
|
|
|
echo "=== bootfromflash ==="
|
|
|
|
run cpdtb rundtb bootfromflash
|
|
|
|
else
|
2009-09-17 02:38:10 +00:00
|
|
|
echo "=== boot stopped with autoscript_boot no ==="
|
2008-06-10 07:14:05 +00:00
|
|
|
fi
|