blob: 02c802c8c7699799cee38ef49dce8ec87bf83626 [file] [log] [blame]
Andre Schwarz1f2463d2010-04-01 21:26:55 +02001echo
2echo "==== running autoscript ===="
3echo
4setenv boot24 'bootm ${kernel_boot} ${mv_initrd_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 addcons boot24
9setenv bootfromnet 'tftp ${mv_initrd_addr_ram} ${initrd_name};run ramkernel'
10if test ${console} = yes;
11then
12setenv addcons 'setenv bootargs ${bootargs} console=ttyS${console_nr},${baudrate}N8'
13else
14setenv addcons 'setenv bootargs ${bootargs} console=tty0'
15fi
16setenv set_static_ip 'setenv ipaddr ${static_ipaddr}'
17setenv set_static_nm 'setenv netmask ${static_netmask}'
18setenv set_static_gw 'setenv gatewayip ${static_gateway}'
19setenv set_ip 'setenv ip ${ipaddr}::${gatewayip}:${netmask}'
20if test ${servicemode} != yes;
21then
22 echo "=== forced flash mode ==="
23 run set_static_ip set_static_nm set_static_gw set_ip bootfromflash
24fi
25if test ${autoscript_boot} != no;
26then
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
40else
41 echo "=== boot stopped with autoscript_boot no ==="
42fi