Andre Schwarz | a1293e5 | 2008-06-10 09:14:05 +0200 | [diff] [blame^] | 1 | echo |
| 2 | echo "==== running autoscript ====" |
| 3 | echo |
| 4 | setenv bootdtb bootm \${kernel_boot} \${mv_initrd_addr_ram} \${mv_dtb_addr_ram} |
| 5 | setenv ramkernel setenv kernel_boot \${loadaddr} |
| 6 | setenv flashkernel setenv kernel_boot \${mv_kernel_addr} |
| 7 | setenv cpird cp \${mv_initrd_addr} \${mv_initrd_addr_ram} \${mv_initrd_length} |
| 8 | setenv bootfromflash run flashkernel cpird ramparam bootdtb |
| 9 | setenv getdtb tftp \${mv_dtb_addr_ram} \${dtb_name} |
| 10 | setenv cpdtb cp \${mv_dtb_addr} \${mv_dtb_addr_ram} 0x2000 |
| 11 | setenv rundtb fdt addr \${mv_dtb_addr_ram}\;fdt boardsetup |
| 12 | setenv bootfromnet tftp \${mv_initrd_addr_ram} \${initrd_name}\;run ramkernel |
| 13 | setenv set_static_ip setenv ipaddr \${static_ipaddr} |
| 14 | setenv set_static_nm setenv netmask \${static_netmask} |
| 15 | setenv set_static_gw setenv gatewayip \${static_gateway} |
| 16 | setenv set_ip setenv ip \${ipaddr}::\${gatewayip}:\${netmask} |
| 17 | setenv ramparam setenv bootargs root=/dev/ram0 ro rootfstype=squashfs |
| 18 | if test ${autoscr_boot} != no; |
| 19 | then |
| 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 |
| 35 | else |
| 36 | echo "=== boot stopped with autoscr_boot no ===" |
| 37 | fi |