blob: 6f9357fd0db81e335d8fb52511bc46ba75bf7054 [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}
Andre Schwarz1a9eeb72008-08-20 11:11:52 +02008setenv bootfromflash run flashkernel cpird ramparam addcons bootdtb
Andre Schwarza1293e52008-06-10 09:14:05 +02009setenv 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
Andre Schwarz1a9eeb72008-08-20 11:11:52 +020013if test ${console} = yes;
14then
15setenv addcons setenv bootargs \${bootargs} console=ttyS\${console_nr},\${baudrate}N8
16else
17setenv addcons setenv bootargs \${bootargs} console=tty0
18fi
Andre Schwarza1293e52008-06-10 09:14:05 +020019setenv set_static_ip setenv ipaddr \${static_ipaddr}
20setenv set_static_nm setenv netmask \${static_netmask}
21setenv set_static_gw setenv gatewayip \${static_gateway}
22setenv set_ip setenv ip \${ipaddr}::\${gatewayip}:\${netmask}
23setenv ramparam setenv bootargs root=/dev/ram0 ro rootfstype=squashfs
24if test ${autoscr_boot} != no;
25then
26 if test ${netboot} = yes;
27 then
28 bootp
29 if test $? = 0;
30 then
31 echo "=== bootp succeeded -> netboot ==="
32 run set_ip
Andre Schwarz1a9eeb72008-08-20 11:11:52 +020033 run getdtb rundtb bootfromnet ramparam addcons bootdtb
Andre Schwarza1293e52008-06-10 09:14:05 +020034 else
35 echo "=== netboot failed ==="
36 fi
37 fi
38 run set_static_ip set_static_nm set_static_gw set_ip
39 echo "=== bootfromflash ==="
40 run cpdtb rundtb bootfromflash
41else
42 echo "=== boot stopped with autoscr_boot no ==="
43fi