2 # hush bootscript for PPCBOOT on L1
3 # note: all #s are in hex, do _NOT_ prefix it with 0x
12 echo already booted before
14 echo first boot in environment, create and save settings
20 # clear out stale env stuff, so we get fresh from dhcp.
21 for setting in initrd fromflash kernel rootfs rootpath
28 # if host provides us with a different bootscript, us it.
29 if printenv bootscript
31 tftp $tftp_addr $bootcript
38 # default base kernel arguments.
39 setenv bootargs $xbootargs devfs=mount ip=$ipaddr:$serverip:$gatewayip:$netmask:L1:eth0:off wdt=120
41 # Have a kernel in flash?
44 echo ok kernel to boot from $flash_krl
45 setenv kernel $flash_krl
47 echo no kernel to boot from $flash_krl, need tftp
50 # Have a rootfs in flash?
51 echo test for SQUASHfs at $flash_rfs
55 echo appears to be a good initrd image at base of flash OK
56 setenv rootfs $flash_rfs
58 echo no image at base of flash, need nfsroot or initrd
61 # I boot from flash if told to and I can.
62 if printenv fromflash && printenv kernel && printenv rootfs
64 echo booting entirely from flash
65 setenv bootargs root=/dev/ram0 rw $bootargs
67 echo oh no failed so I try some other stuff
73 tftp $tftp_addr $bootfile
74 setenv kernel $tftp_addr
75 echo I will boot the TFTP kernel
79 echo no bootfile specified, will use one from flash
81 setenv bootfile /opt/crayx1/craymcu/l1/flash/linux.image
82 echo OH NO! we have no bootfile,nor flash kernel! try default: $bootfile
83 tftp $tftp_addr $bootfile
84 setenv kernel $tftp_addr
91 echo rootpath is $rootpath
94 echo initrd is also specified, so use $initrd
95 tftp $tftp2_addr $initrd
96 setenv bootargs root=/dev/ram0 rw cwsroot=$serverip:$rootpath $bootargs
97 bootm $kernel $tftp2_addr
99 echo initrd is not specified, so use NFSROOT $rootpat
100 setenv bootargs root=/dev/nfs ro nfsroot=$serverip:$rootpath $bootargs
104 echo we have no rootpath check for one in flash
107 echo I will use the one in flash
108 setenv bootargs root=/dev/mtdblock/0 ro rootfstype=squashfs $bootargs
111 setenv rootpath /export/crayl1
112 echo OH NO! we have no rootpath,nor flash kernel! try default: $rootpath
113 setenv bootargs root=/dev/mtdblock/0 ro rootfstype=squashfs $bootargs