Andre Schwarz | 1f2463d | 2010-04-01 21:26:55 +0200 | [diff] [blame] | 1 | echo |
| 2 | echo "==== running autoscript ====" |
| 3 | echo |
| 4 | setenv boot24 'bootm ${kernel_boot} ${mv_initrd_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 addcons boot24 |
| 9 | setenv bootfromnet 'tftp ${mv_initrd_addr_ram} ${initrd_name};run ramkernel' |
| 10 | if test ${console} = yes; |
| 11 | then |
| 12 | setenv addcons 'setenv bootargs ${bootargs} console=ttyS${console_nr},${baudrate}N8' |
| 13 | else |
| 14 | setenv addcons 'setenv bootargs ${bootargs} console=tty0' |
| 15 | fi |
| 16 | setenv set_static_ip 'setenv ipaddr ${static_ipaddr}' |
| 17 | setenv set_static_nm 'setenv netmask ${static_netmask}' |
| 18 | setenv set_static_gw 'setenv gatewayip ${static_gateway}' |
| 19 | setenv set_ip 'setenv ip ${ipaddr}::${gatewayip}:${netmask}' |
| 20 | if test ${servicemode} != yes; |
| 21 | then |
| 22 | echo "=== forced flash mode ===" |
| 23 | run set_static_ip set_static_nm set_static_gw set_ip bootfromflash |
| 24 | fi |
| 25 | if test ${autoscript_boot} != no; |
| 26 | then |
| 27 | if test ${netboot} = yes; |
| 28 | then |
| 29 | bootp |
| 30 | if test $? = 0; |
| 31 | then |
| 32 | echo "=== bootp succeeded -> netboot ===" |
| 33 | run set_ip bootfromnet addcons boot24 |
| 34 | else |
| 35 | echo "=== netboot failed ===" |
| 36 | fi |
| 37 | fi |
| 38 | echo "=== bootfromflash ===" |
| 39 | run set_static_ip set_static_nm set_static_gw set_ip bootfromflash |
| 40 | else |
| 41 | echo "=== boot stopped with autoscript_boot no ===" |
| 42 | fi |