blob: ec6e34ef05a403d59b2b2ab2be4dab0b1bf38e3e [file] [log] [blame]
Andre Schwarza1293e52008-06-10 09:14:05 +02001echo
2echo "==== running autoscript ===="
3echo
4setenv bootdtb bootm \${kernel_boot} \${mv_initrd_addr_ram} \${mv_dtb_addr_ram}
5setenv ramkernel setenv kernel_boot \${loadaddr}
6setenv flashkernel setenv kernel_boot \${mv_kernel_addr}
7setenv cpird cp \${mv_initrd_addr} \${mv_initrd_addr_ram} \${mv_initrd_length}
8setenv bootfromflash run flashkernel cpird ramparam bootdtb
9setenv getdtb tftp \${mv_dtb_addr_ram} \${dtb_name}
10setenv cpdtb cp \${mv_dtb_addr} \${mv_dtb_addr_ram} 0x2000
11setenv rundtb fdt addr \${mv_dtb_addr_ram}\;fdt boardsetup
12setenv bootfromnet tftp \${mv_initrd_addr_ram} \${initrd_name}\;run ramkernel
13setenv set_static_ip setenv ipaddr \${static_ipaddr}
14setenv set_static_nm setenv netmask \${static_netmask}
15setenv set_static_gw setenv gatewayip \${static_gateway}
16setenv set_ip setenv ip \${ipaddr}::\${gatewayip}:\${netmask}
17setenv ramparam setenv bootargs root=/dev/ram0 ro rootfstype=squashfs
18if test ${autoscr_boot} != no;
19then
20 if test ${netboot} = yes;
21 then
22 bootp
23 if test $? = 0;
24 then
25 echo "=== bootp succeeded -> netboot ==="
26 run set_ip
27 run getdtb rundtb bootfromnet ramparam bootdtb
28 else
29 echo "=== netboot failed ==="
30 fi
31 fi
32 run set_static_ip set_static_nm set_static_gw set_ip
33 echo "=== bootfromflash ==="
34 run cpdtb rundtb bootfromflash
35else
36 echo "=== boot stopped with autoscr_boot no ==="
37fi