diff options
author | wdenk <wdenk> | 2003-05-20 14:25:27 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-05-20 14:25:27 +0000 |
commit | 7f70e85309c6367138c0ebd14abdd49964b8d50a (patch) | |
tree | 07a10be9b048491fd4a1da6b459728ac16739861 /board/cray/L1/bootscript.hush | |
parent | 59de2ed6b5631c709d6e9c6dce7c0bffdf5a2058 (diff) | |
download | u-boot-imx-7f70e85309c6367138c0ebd14abdd49964b8d50a.zip u-boot-imx-7f70e85309c6367138c0ebd14abdd49964b8d50a.tar.gz u-boot-imx-7f70e85309c6367138c0ebd14abdd49964b8d50a.tar.bz2 |
* Patch by David Updegraff, 22 Apr 2003:
update for CrayL1 board
* Patch by Pantelis Antoniou, 21 Apr 2003:
add boot support for ARTOS (a proprietary OS)
* Patch by Steven Scholz, 11 Apr 2003:
Add support for RTC DS1338
* Patch by Rod Boyce, 24 Jan 2003:
Fix counting of extended partitions in diskboot command
Diffstat (limited to 'board/cray/L1/bootscript.hush')
-rw-r--r-- | board/cray/L1/bootscript.hush | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/board/cray/L1/bootscript.hush b/board/cray/L1/bootscript.hush new file mode 100644 index 0000000..ec4839b --- /dev/null +++ b/board/cray/L1/bootscript.hush @@ -0,0 +1,117 @@ +# $Header$ +# hush bootscript for PPCBOOT on L1 +# note: all #s are in hex, do _NOT_ prefix it with 0x + +flash_rfs=ffc00000 +flash_krl=fff00000 +tftp_addr=100000 +tftp2_addr=1000000 + +if printenv booted +then + echo already booted before +else + echo first boot in environment, create and save settings + setenv booted OK + saveenv +fi + +setenv autoload no +# clear out stale env stuff, so we get fresh from dhcp. +for setting in initrd fromflash kernel rootfs rootpath +do +setenv $setting +done + +dhcp + +# if host provides us with a different bootscript, us it. +if printenv bootscript + then + tftp $tftp_addr $bootcript + if imi $tftp_addr + then + autoscript $tftp_addr + fi +fi + +# default base kernel arguments. +setenv bootargs $xbootargs devfs=mount ip=$ipaddr:$serverip:$gatewayip:$netmask:L1:eth0:off wdt=120 + +# Have a kernel in flash? +if imi $flash_krl +then + echo ok kernel to boot from $flash_krl + setenv kernel $flash_krl +else + echo no kernel to boot from $flash_krl, need tftp +fi + +# Have a rootfs in flash? +echo test for SQUASHfs at $flash_rfs + +if imi $flash_rfs +then + echo appears to be a good initrd image at base of flash OK + setenv rootfs $flash_rfs +else + echo no image at base of flash, need nfsroot or initrd +fi + +# I boot from flash if told to and I can. +if printenv fromflash && printenv kernel && printenv rootfs +then + echo booting entirely from flash + setenv bootargs root=/dev/ram0 rw $bootargs + bootm $kernel $rootfs + echo oh no failed so I try some other stuff +fi + +# TFTP down a kernel +if printenv bootfile +then + tftp $tftp_addr $bootfile + setenv kernel $tftp_addr + echo I will boot the TFTP kernel +else + if printenv kernel + then + echo no bootfile specified, will use one from flash + else + setenv bootfile /opt/crayx1/craymcu/l1/flash/linux.image + echo OH NO! we have no bootfile,nor flash kernel! try default: $bootfile + tftp $tftp_addr $bootfile + setenv kernel $tftp_addr + fi +fi + +# the rootfs. +if printenv rootpath +then + echo rootpath is $rootpath + if printenv initrd + then + echo initrd is also specified, so use $initrd + tftp $tftp2_addr $initrd + setenv bootargs root=/dev/ram0 rw cwsroot=$serverip:$rootpath $bootargs + bootm $kernel $tftp2_addr + else + echo initrd is not specified, so use NFSROOT $rootpat + setenv bootargs root=/dev/nfs ro nfsroot=$serverip:$rootpath $bootargs + bootm $kernel + fi +else + echo we have no rootpath check for one in flash + if printenv rootfs + then + echo I will use the one in flash + setenv bootargs root=/dev/mtdblock/0 ro rootfstype=squashfs $bootargs + bootm $kernel + else + setenv rootpath /export/crayl1 + echo OH NO! we have no rootpath,nor flash kernel! try default: $rootpath + setenv bootargs root=/dev/mtdblock/0 ro rootfstype=squashfs $bootargs + bootm $kernel + fi +fi +reset |