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} |
Andre Schwarz | 1a9eeb7 | 2008-08-20 11:11:52 +0200 | [diff] [blame] | 8 | setenv bootfromflash run flashkernel cpird ramparam addcons bootdtb |
Andre Schwarz | a1293e5 | 2008-06-10 09:14:05 +0200 | [diff] [blame] | 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 |
Andre Schwarz | 1a9eeb7 | 2008-08-20 11:11:52 +0200 | [diff] [blame] | 13 | if test ${console} = yes; |
| 14 | then |
| 15 | setenv addcons setenv bootargs \${bootargs} console=ttyS\${console_nr},\${baudrate}N8 |
| 16 | else |
| 17 | setenv addcons setenv bootargs \${bootargs} console=tty0 |
| 18 | fi |
Andre Schwarz | a1293e5 | 2008-06-10 09:14:05 +0200 | [diff] [blame] | 19 | setenv set_static_ip setenv ipaddr \${static_ipaddr} |
| 20 | setenv set_static_nm setenv netmask \${static_netmask} |
| 21 | setenv set_static_gw setenv gatewayip \${static_gateway} |
| 22 | setenv set_ip setenv ip \${ipaddr}::\${gatewayip}:\${netmask} |
| 23 | setenv ramparam setenv bootargs root=/dev/ram0 ro rootfstype=squashfs |
Peter Tyser | 3202d33 | 2009-09-16 21:38:10 -0500 | [diff] [blame^] | 24 | if test ${autoscript_boot} != no; |
Andre Schwarz | a1293e5 | 2008-06-10 09:14:05 +0200 | [diff] [blame] | 25 | then |
| 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 Schwarz | 1a9eeb7 | 2008-08-20 11:11:52 +0200 | [diff] [blame] | 33 | run getdtb rundtb bootfromnet ramparam addcons bootdtb |
Andre Schwarz | a1293e5 | 2008-06-10 09:14:05 +0200 | [diff] [blame] | 34 | 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 |
| 41 | else |
Peter Tyser | 3202d33 | 2009-09-16 21:38:10 -0500 | [diff] [blame^] | 42 | echo "=== boot stopped with autoscript_boot no ===" |
Andre Schwarz | a1293e5 | 2008-06-10 09:14:05 +0200 | [diff] [blame] | 43 | fi |