comparison packages/redboot/current/doc/users_guide @ 115:6ed91473a1cd ecos-sw-2000-08-21

Merge from eCos master repository on 2000-08-21-22:40:54-BST
author jlarmour
date Fri, 25 Aug 2000 17:32:38 +0000
parents
children 0ec04793409a
comparison
equal deleted inserted replaced
114:5ad2b71d525e 115:6ed91473a1cd
1 The standard RedBoot command set is structured around the bootstrap
2 environment. These commands are designed to be simple to use and
3 remember, while still providing sufficient power and flexibility to
4 be useful. No attempt has been made to make RedBoot be the end-all
5 product. As such, things such as the debug environment are left
6 to other modules such as GDB stubs which are typically included in
7 RedBoot.
8
9 Also, the command set may be extended on a platform basis.
10
11 Common commands:
12
13 The general format of commands is:
14 <command> <options, paramters>
15 Elements are separated by the space character. Other control characters,
16 such as TAB or editting keys (Insert) are not currently supported.
17
18 Numbers, such as a memory location, may be specified in either
19 decimal or hexadecimal (requires a 0x prefix).
20
21 Use the 'help' command to get limited help on command syntax.
22
23 =======================================================================
24 RedBoot> help
25 Display (hex dump) a range of memory
26 dump <location> [<length>]
27 Manage FLASH images
28 fis {cmds}
29 Manage configuration kept in FLASH memory
30 fconfig
31 Execute code at a location
32 go [-w <timeout>] [entry]
33 Help about help?
34 help <topic>
35 Load a file
36 load [-raw] [-b <mem_addr>]]
37 RedBoot>
38 =======================================================================
39
40 Commands may be abbreviated to any unique string. E.g. 'lo' is equivalent
41 to 'loa' and 'load'.
42
43 - Download process
44
45 Currently, download is only supported using TFTP over a network.
46 Files to be downloaded may be executable images or raw data.
47 The format of the command is:
48 RedBoot> load <file> [-v] [-b <location>] [-r]
49 where:
50 <file> - The name of the file on the TFTP server. Details of how
51 this is specified are host specific.
52 -v - Display a small spinner (indicator) while download in
53 progress. Just for feedback, especially during long loads.
54 -b - Specify the location in memory to load the file. Executable
55 images normally load at the location the file was linked for.
56 This option allows the file to be loaded to a specific memory
57 location, possibly overriding any assumed location.
58 -r - Download raw data. Normally, the load command is used to
59 load executable images into memory. This option allows for
60 raw data to be loaded. If this option is given, "-b" will
61 be required as well.
62
63 =======================================================================
64 RedBoot> lo redboot.ROM -b 0x8c400000
65 Address offset = 0x0c400000
66 Entry point: 0x80000000, address range: 0x80000000-0x8000fe80
67 =======================================================================
68
69 - Flash Image System (FIS)
70
71 If the platform has flash memory, RedBoot can use this for image storage.
72 Executable images, as well as data, can be stored in flash in a simple
73 file store. The 'fis' command is used to manipulate and maintain flash images.
74
75 The available 'fis' commands are:
76
77 fis init [-f]
78
79 This command is used to initialize the Flash Image System (FIS). It should
80 only be executed once, when RedBoot is first installed on the hardware.
81 Subsequent executions will cause loss of data in the flash (previously saved
82 images will no longer be accessible).
83
84 If the "-f" option is specified, all blocks of flash memory will be erased
85 as part of this process.
86
87 =======================================================================
88 RedBoot> fis init -f
89 About to initialize [format] FLASH image system - are you sure (y/n)? n
90 =======================================================================
91
92 fis list
93
94 This command lists the images currently available in the FIS. Certain images
95 are used by RedBoot and have fixed names. Other images can be manipulated by
96 the user.
97
98 =======================================================================
99 RedBoot> fis list
100 Name FLASH addr Mem addr Length Entry point
101 RedBoot 0xA0000000 0xA0000000 0x020000 0x80000000
102 RedBoot[backup] 0xA0020000 0x8C010000 0x010000 0x8C010000
103 RedBoot config 0xA0FC0000 0xA0FC0000 0x020000 0x00000000
104 FIS directory 0xA0FE0000 0xA0FE0000 0x020000 0x00000000
105 =======================================================================
106
107 fis free
108
109 This command shows which areas of the flash memory are currently not in use.
110 In use means that the block contains non-erased contents. Since it is possible
111 to force an image to be loaded at a particular flash location, this command
112 can be used to check whether that location is in use by any other image.
113
114 Note: there currently is no cross-checking between actual flash contents and
115 the image directory. i.e. there could be a segment of flash which is not erased
116 that does not correspond to a named image, or vice-versa.
117
118 =======================================================================
119 RedBoot> fis free
120 0xA0040000 .. 0xA07C0000
121 0xA0840000 .. 0xA0FC0000
122 =======================================================================
123
124 fis create -b <mem_base> -l <length> [-f <flash_addr>] [-e <entry_point>] [-r <ram_addr>] <name>
125
126 This command creates an image in the FIS directory. The data for the image must
127 exist in RAM memory before the copy. Typically, one would use the RedBoot 'load'
128 command to load an image into RAM and then the 'fis create' command to write it
129 to flash.
130
131 Options:
132 <name> - The name of the file, as shown in the FIS directory.
133 -b - The location in RAM used to obtain the image *required*
134 -l - The length of the location *required*
135 -f - The location in flash for the image. If not provided, the first free
136 block which is large enough will be used. See 'fis free'.
137 -e - The execution entry address. Used if the starting address for an image
138 is not known, or needs to be overridden.
139 -r - The location in RAM when the image is loaded via 'fis load'. This only
140 needs to be specified for images which will eventually loaded via 'fis load'.
141 Fixed images, such as RedBoot itself, will not need this.
142
143 =======================================================================
144 RedBoot> fis create RedBoot -f 0xa0000000 -b 0x8c400000 -l 0x20000
145 An image named 'RedBoot' exists - are you sure (y/n)? n
146 RedBoot> fis create junk -b 0x8c400000 -l 0x20000
147 ... Erase from 0xa0040000-0xa0060000: .
148 ... Program from 0x8c400000-0x8c420000 at 0xa0040000: .
149 ... Erase from 0xa0fe0000-0xa1000000: .
150 ... Program from 0x8c7d0000-0x8c7f0000 at 0xa0fe0000: .
151 =======================================================================
152
153 fis load name
154
155 This command is used to transfer an image from flash memory to RAM. Once loaded,
156 it may be executed using the 'go' command.
157
158 =======================================================================
159 RedBoot> fis load RedBoot[backup]
160 RedBoot> go
161 =======================================================================
162
163 fis delete name
164
165 This command removes an image from the FIS. The flash memory will be erased
166 as part of the execution of this command, as well as removal of the name from
167 the FIS directory.
168
169 =======================================================================
170 RedBoot> fis list
171 Name FLASH addr Mem addr Length Entry point
172 RedBoot 0xA0000000 0xA0000000 0x020000 0x80000000
173 RedBoot[backup] 0xA0020000 0x8C010000 0x020000 0x8C010000
174 RedBoot config 0xA0FC0000 0xA0FC0000 0x020000 0x00000000
175 FIS directory 0xA0FE0000 0xA0FE0000 0x020000 0x00000000
176 junk 0xA0040000 0x8C400000 0x020000 0x80000000
177 RedBoot> fis delete junk
178 Delete image 'junk' - are you sure (y/n)? y
179 ... Erase from 0xa0040000-0xa0060000: .
180 ... Erase from 0xa0fe0000-0xa1000000: .
181 ... Program from 0x8c7d0000-0x8c7f0000 at 0xa0fe0000: .
182 =======================================================================
183
184 fis erase -f <flash_addr> -l <length>
185
186 This command is used to forceably erase a portion of flash memory. There is
187 no cross-checking to ensure that the area being erased does not correspond to
188 a loaded image.
189
190 =======================================================================
191 RedBoot> fis erase -f 0xa0040000 -l 0x20000
192 ... Erase from 0xa0040000-0xa0060000: .
193 =======================================================================
194
195 - Persistent state [flash-based configuration] control
196
197 Additionally, if the platform has flash memory, certain control and configuration
198 information used by RedBoot can be stored in flash. The details of what information
199 is maintained in flash differs based on the platform and the configuration.
200
201 However, the basic operation used to maintain this information is the same.
202 Using the 'fconfig' command, the information may be displayed and/or changed.
203
204 Usage:
205 RedBoot> fconfig [-l]
206 If the optional flag "-l" is specified, the configuration data is simply listed.
207 Otherwise, each configuration parameter will be displayed and the user given
208 a chance to change it. The entire value must be typed. Typing just carriage
209 return will leave a value unchanged. Boolean values may be entered by just the
210 first letter ('t' for true, 'f' for false). At any time the editting process
211 may be stopped by entering just a '.' (period) on the line. Entry of the character
212 '^' will move the editting back to the previous item.
213
214 If any changes are made in the configuration, then the updated data will be
215 written back to flash.
216
217 One item which is always present in the configuration data is the ability to
218 execute a script at boot/startup time. A sequence of RedBoot commands can
219 be entered which will be executed when the system starts up. Optionally,
220 a time out period can be provided which allows the user to abort the
221 startup script and proceed with normal command processing from the console.
222
223 =======================================================================
224 RedBoot> fconfig -l
225 Run script at boot: false
226 Use BOOTP for network configuration: false
227 Local IP address: 192.168.1.29
228 Default server IP address: 192.168.1.101
229 GDB connection port: 9000
230 Network debug at boot time: false
231 =======================================================================
232
233 The following example sets a boot script and then shows it running.
234 =======================================================================
235 RedBoot> fconfig
236 ^^^^^^^
237 Run script at boot: false t
238 ^
239 Boot script:
240 Enter script, terminate with empty line
241 >> fi li
242 ^^^^^
243 >>
244 ^
245 Boot script timeout: 0 10
246 ^^
247 Use BOOTP for network configuration: false .
248 ^
249 Update RedBoot non-volatile configuration - are you sure (y/n)? y
250 ^
251 ... Erase from 0xa0fc0000-0xa0fe0000: .
252 ... Program from 0x8c021f60-0x8c022360 at 0xa0fc0000: .
253 RedBoot>
254 RedBoot(tm) debug environment - built 08:22:24, Aug 23 2000
255 Copyright (C) 2000, Red Hat, Inc.
256
257 RAM: 0x8c000000-0x8c800000
258 FLASH: 0xa0000000 - 0xa1000000, 128 blocks of 0x00020000 bytes ea.
259 Socket Communications, Inc: Low Power Ethernet CF Revision C 5V/3.3V 08/27/98
260 IP: 192.168.1.29, Default server: 192.168.1.101
261 == Executing boot script in 10 seconds - enter ^C to abort
262 RedBoot> fi li
263 Name FLASH addr Mem addr Length Entry point
264 RedBoot 0xA0000000 0xA0000000 0x020000 0x80000000
265 RedBoot[backup] 0xA0020000 0x8C010000 0x020000 0x8C010000
266 RedBoot config 0xA0FC0000 0xA0FC0000 0x020000 0x00000000
267 FIS directory 0xA0FE0000 0xA0FE0000 0x020000 0x00000000
268 RedBoot>
269 ^
270 =======================================================================
271
272 Note: the '^' characters above indicate where something was entered on the
273 console. As you can see, the 'fi li' command at the end came from the script,
274 not the console. Once the script was executed, command processing reverted
275 to the console.
276
277 - Program execution
278
279 Once an image has been loaded into memory, either via the 'load' command
280 or the 'fis load' command, execution may be transfered to that image.
281 Note: the image is assumed to be a stand-alone entity, as RedBoot gives
282 the entire platform over to it. Typical examples would be an eCos application
283 or a Linux kernel.
284
285 The format of the 'go' command is:
286 RedBoot> go [-w <time>] [<location>]
287 Execution will begin at <location> if specified. Otherwise, the "entry
288 point" of the last image loaded will be used.
289
290 The "-w" option gives the user <time> seconds before execution begins.
291 The execution may be aborted by typing ^C on the console. This mode
292 would typically be used in startup scripts.