blob: 43cab1d1ce7de5edf9684af3faf609f05a6e5caf [file] [log] [blame]
wdenk6dd652f2003-06-19 23:40:20 +00001# DONT FORGET TO CHANGE THE "version" VAR BELOW IF YOU MAKE CHANGES TO THIS FILE
2
3# (C) Copyright 2001
4# Murray Jensen, CSIRO-MIT, <Murray.Jensen@csiro.au>
5#
6# See file CREDITS for list of people who contributed to this
7# project.
8#
9# This program is free software; you can redistribute it and/or
10# modify it under the terms of the GNU General Public License as
11# published by the Free Software Foundation; either version 2 of
12# the License, or (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program; if not, write to the Free Software
21# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22# MA 02111-1307 USA
23
24#
25# global_env
26#
27# file used by Hymod boards to initialise the u-boot non-volatile
28# environment when u-boot is first run (it determines this by the
29# absence of the environment variable "global_env_loaded")
30#
wdenke2211742002-11-02 23:30:20 +000031# format of this file is:
32#
33# 1. blank lines and lines beginning with '#' are ignored
34# 2. all other lines must have the form <name>=<value>
35# 3. if a percent appears anywhere, it is replaced like so:
36#
37# %s serial number of the main board (10 digit zero filled)
38# %S serial number of the main board (plain number)
39# %% a percentage character
wdenk6dd652f2003-06-19 23:40:20 +000040# ... otherwise the %x is discarded
wdenke2211742002-11-02 23:30:20 +000041#
42# if first character in <name> is a dash ('-'), then an existing env var
wdenk6dd652f2003-06-19 23:40:20 +000043# will not be overwritten (the dash is removed). i.e. it is only set if
44# it does not exist
wdenke2211742002-11-02 23:30:20 +000045#
46# if last character in <name> is a plus ('+'), then <value> will be appended
wdenk6dd652f2003-06-19 23:40:20 +000047# to any existing env var (the plus is ignored). Duplicates of <value> are
wdenke2211742002-11-02 23:30:20 +000048# removed.
49#
wdenk6dd652f2003-06-19 23:40:20 +000050# similarly, if the last character in <name> is a minus ('-'), then any
51# occurences of <value> in the current value of <name> will removed (the
52# minus is ignored).
53#
54# leading and trailing whitespace is removed in both <name> and <value>
55# (after processing any initial or final plus/minus in <name>).
56#
57
58# MISCELLANEOUS PARAMETERS
59
60# version must always come first
wdenk592c5ca2003-06-21 00:17:24 +000061version=4
wdenke2211742002-11-02 23:30:20 +000062
63# set the ip address based on the main board serial number
64ipaddr=192.168.1.%S
65serverip=192.168.1.254
66
wdenk6dd652f2003-06-19 23:40:20 +000067# stop auto execute after tftp (not a very good name really)
wdenke2211742002-11-02 23:30:20 +000068autostart=no
69
wdenk6dd652f2003-06-19 23:40:20 +000070# setting this to "yes" forces the global_env file to be loaded and processed
71# if the current version is different to the version in the file
72always_check_env=no
73
74# BOOTING COMMANDS AND PARAMETERS
75
76# command to run when "auto-booting"
wdenk592c5ca2003-06-21 00:17:24 +000077bootcmd=bootm 40080000
wdenk6dd652f2003-06-19 23:40:20 +000078
79# how long the "countdown" to automatically running "bootcmd" is
80bootdelay=2
81
82# how long before it "times out" console input and attempts to run "bootcmd"
83bootretry=5
84
85# arguments passed to the boot program (i.e. linux kernel) via register 6
86# the linux kernel (v2.4) uses the following registers:
87# r3 - address of board information structure
88# r4 - address of initial ramdisk image (0 means no initrd)
89# r5 - size of initial ramdisk image
90# r6 - address of command line string
wdenk592c5ca2003-06-21 00:17:24 +000091-bootargs=root=/dev/mtdblock5 rootfstype=squashfs ro
wdenk6dd652f2003-06-19 23:40:20 +000092
wdenk592c5ca2003-06-21 00:17:24 +000093# these four are for hymod linux integrated into our Sun network
wdenk6dd652f2003-06-19 23:40:20 +000094bootargs+=serialno=%S
95bootargs+=nisclient nisdomain=mlb.dmt.csiro.au nissrvadr=138.194.112.4
96bootargs+=nfsclient
97bootargs+=automount
98
99# start a web server by default
100bootargs+=webserver
101
102# give negotiation time to finish
103bootargs+=netsleep=5
104
105# then our ciscos don't pass packets for 25-30 secs after that, so
106# pinging the server until it responds prevents network connections
107# from failing...
108bootargs+=netping
109
110# these are old bootargs - we don't need them anymore
111bootargs-=preload=unix,i2c-cpm,i2c-dev
112bootargs-=ramdisk_size=32768
113bootargs-=ramdisk_size=24576
114
115# FLASH MANIPULATION COMMANDS
116
wdenke2211742002-11-02 23:30:20 +0000117#
wdenk6dd652f2003-06-19 23:40:20 +0000118# 16M flash, 64 x 256K sectors, mapped at address 0x40000000
wdenke2211742002-11-02 23:30:20 +0000119#
wdenk6dd652f2003-06-19 23:40:20 +0000120# Sector(s) Address Size Description
121#
122# 0 - 0 0x40000000 256K boot code
123# 1 - 1 0x40040000 256K non volatile environment
124# 2 - 4 0x40080000 768K linux kernel image
125# 5 - 7 0x40140000 768K alternate linux kernel image
126# 8 - 47 0x40200000 10M linux initial ramdisk image
127# 48 - 63 0x40c00000 4M ramdisk image for applications
wdenke2211742002-11-02 23:30:20 +0000128#
129
130fetchboot=tftp 100000 /hymod/u-boot.bin
131eraseboot=protect off 1:0 ; erase 1:0 ; protect on 1:0
132copyboot=protect off 1:0 ; cp.b 100000 40000000 40000 ; protect on 1:0
133cmpboot=cmp.b 100000 40000000 40000
134newboot=run fetchboot eraseboot copyboot cmpboot
135
136fetchlinux=tftp 100000 /hymod/linux.bin
137eraselinux=erase 1:2-4
138copylinux=cp.b 100000 40080000 $(filesize)
139cmplinux=cmp.b 100000 40080000 $(filesize)
140newlinux=run fetchlinux eraselinux copylinux cmplinux
141
142fetchaltlinux=tftp 100000 /hymod/altlinux.bin
143erasealtlinux=erase 1:5-7
wdenk6dd652f2003-06-19 23:40:20 +0000144copyaltlinux=cp.b 100000 40140000 $(filesize)
145cmpaltlinux=cmp.b 100000 40140000 $(filesize)
wdenke2211742002-11-02 23:30:20 +0000146newaltlinux=run fetchaltlinux erasealtlinux copyaltlinux cmpaltlinux
147
wdenk592c5ca2003-06-21 00:17:24 +0000148fetchroot=tftp 100000 /hymod/root.bin
149eraseroot=erase 1:8-47
150copyroot=cp.b 100000 40200000 $(filesize)
151cmproot=cmp.b 100000 40200000 $(filesize)
152newroot=run fetchroot eraseroot copyroot cmproot
wdenke2211742002-11-02 23:30:20 +0000153
wdenk6dd652f2003-06-19 23:40:20 +0000154fetchard=tftp 100000 /hymod/apprd.bin
155eraseard=erase 1:48-63
156copyard=cp.b 100000 40c00000 $(filesize)
157cmpard=cmp.b 100000 40c00000 $(filesize)
158newapprd=run fetchard eraseard copyard cmpard
wdenk592c5ca2003-06-21 00:17:24 +0000159
160# pass above map to linux mtd driver
161bootargs+=mtdparts=phys:256k(u-boot),256k(u-boot-env),768k(linux),768k(altlinux),10m(root),4m(hymod)