OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [ecos-2.0/] [doc/] [html/] [ref/] [exec-command.html] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>exec</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
22
TITLE="Executing Programs from RedBoot"
23
HREF="executing-programs.html"><LINK
24
REL="PREVIOUS"
25
TITLE="go"
26
HREF="go-command.html"><LINK
27
REL="NEXT"
28
TITLE="Rebuilding RedBoot"
29
HREF="rebuilding-redboot.html"></HEAD
30
><BODY
31
CLASS="REFENTRY"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="go-command.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
></TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="rebuilding-redboot.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><H1
81
><A
82
NAME="EXEC-COMMAND">exec</H1
83
><DIV
84
CLASS="REFNAMEDIV"
85
><A
86
NAME="AEN4570"
87
></A
88
><H2
89
>Name</H2
90
>exec&nbsp;--&nbsp;Execute a Linux kernel</DIV
91
><DIV
92
CLASS="REFSYNOPSISDIV"
93
><A
94
NAME="AEN4573"><H2
95
>Synopsis</H2
96
><P
97
><B
98
CLASS="COMMAND"
99
>exec</B
100
>  [-w <TT
101
CLASS="REPLACEABLE"
102
><I
103
> timeout</I
104
></TT
105
>] [-r <TT
106
CLASS="REPLACEABLE"
107
><I
108
> ramdisk_address</I
109
></TT
110
>] [-s <TT
111
CLASS="REPLACEABLE"
112
><I
113
> ramdisk_length</I
114
></TT
115
>] [-b <TT
116
CLASS="REPLACEABLE"
117
><I
118
> load_address</I
119
></TT
120
>
121
            {-l <TT
122
CLASS="REPLACEABLE"
123
><I
124
> load_length</I
125
></TT
126
>}
127
        ] [-c <TT
128
CLASS="REPLACEABLE"
129
><I
130
> kernel_command_line</I
131
></TT
132
>] [<TT
133
CLASS="REPLACEABLE"
134
><I
135
> entry_point</I
136
></TT
137
>]</P
138
></DIV
139
><DIV
140
CLASS="REFSECT1"
141
><A
142
NAME="AEN4590"
143
></A
144
><H2
145
>Arguments</H2
146
><DIV
147
CLASS="INFORMALTABLE"
148
><A
149
NAME="AEN4592"><P
150
></P
151
><TABLE
152
BORDER="1"
153
CLASS="CALSTABLE"
154
><THEAD
155
><TR
156
><TH
157
WIDTH="25%"
158
ALIGN="LEFT"
159
VALIGN="TOP"
160
>Name</TH
161
><TH
162
WIDTH="25%"
163
ALIGN="LEFT"
164
VALIGN="TOP"
165
>Type</TH
166
><TH
167
WIDTH="25%"
168
ALIGN="LEFT"
169
VALIGN="TOP"
170
>Description</TH
171
><TH
172
WIDTH="25%"
173
ALIGN="LEFT"
174
VALIGN="TOP"
175
>Default</TH
176
></TR
177
></THEAD
178
><TBODY
179
><TR
180
><TD
181
WIDTH="25%"
182
ALIGN="LEFT"
183
VALIGN="TOP"
184
>-w <TT
185
CLASS="REPLACEABLE"
186
><I
187
>timeout</I
188
></TT
189
></TD
190
><TD
191
WIDTH="25%"
192
ALIGN="LEFT"
193
VALIGN="TOP"
194
>Number</TD
195
><TD
196
WIDTH="25%"
197
ALIGN="LEFT"
198
VALIGN="TOP"
199
>Time to wait before starting execution.</TD
200
><TD
201
WIDTH="25%"
202
ALIGN="LEFT"
203
VALIGN="TOP"
204
>0</TD
205
></TR
206
><TR
207
><TD
208
WIDTH="25%"
209
ALIGN="LEFT"
210
VALIGN="TOP"
211
>-r <TT
212
CLASS="REPLACEABLE"
213
><I
214
>ramdisk_address</I
215
></TT
216
></TD
217
><TD
218
WIDTH="25%"
219
ALIGN="LEFT"
220
VALIGN="TOP"
221
>Number</TD
222
><TD
223
WIDTH="25%"
224
ALIGN="LEFT"
225
VALIGN="TOP"
226
>Address in memory of "initrd"-style ramdisk - passed to Linux kernel.</TD
227
><TD
228
WIDTH="25%"
229
ALIGN="LEFT"
230
VALIGN="TOP"
231
><SPAN
232
CLASS="emphasis"
233
><I
234
CLASS="EMPHASIS"
235
>None</I
236
></SPAN
237
></TD
238
></TR
239
><TR
240
><TD
241
WIDTH="25%"
242
ALIGN="LEFT"
243
VALIGN="TOP"
244
>-s <TT
245
CLASS="REPLACEABLE"
246
><I
247
>ramdisk_length</I
248
></TT
249
></TD
250
><TD
251
WIDTH="25%"
252
ALIGN="LEFT"
253
VALIGN="TOP"
254
>Number</TD
255
><TD
256
WIDTH="25%"
257
ALIGN="LEFT"
258
VALIGN="TOP"
259
>Length of ramdisk image - passed to Linux kernel.</TD
260
><TD
261
WIDTH="25%"
262
ALIGN="LEFT"
263
VALIGN="TOP"
264
><SPAN
265
CLASS="emphasis"
266
><I
267
CLASS="EMPHASIS"
268
>None</I
269
></SPAN
270
></TD
271
></TR
272
><TR
273
><TD
274
WIDTH="25%"
275
ALIGN="LEFT"
276
VALIGN="TOP"
277
>-b <TT
278
CLASS="REPLACEABLE"
279
><I
280
>load_address</I
281
></TT
282
></TD
283
><TD
284
WIDTH="25%"
285
ALIGN="LEFT"
286
VALIGN="TOP"
287
>Number</TD
288
><TD
289
WIDTH="25%"
290
ALIGN="LEFT"
291
VALIGN="TOP"
292
>Address in memory of the Linux kernel image.</TD
293
><TD
294
WIDTH="25%"
295
ALIGN="LEFT"
296
VALIGN="TOP"
297
>Value set by <B
298
CLASS="COMMAND"
299
>load</B
300
> or <B
301
CLASS="COMMAND"
302
>fis load</B
303
></TD
304
></TR
305
><TR
306
><TD
307
WIDTH="25%"
308
ALIGN="LEFT"
309
VALIGN="TOP"
310
>-l <TT
311
CLASS="REPLACEABLE"
312
><I
313
>load_length</I
314
></TT
315
></TD
316
><TD
317
WIDTH="25%"
318
ALIGN="LEFT"
319
VALIGN="TOP"
320
>Number</TD
321
><TD
322
WIDTH="25%"
323
ALIGN="LEFT"
324
VALIGN="TOP"
325
>Length of Linux kernel image.</TD
326
><TD
327
WIDTH="25%"
328
ALIGN="LEFT"
329
VALIGN="TOP"
330
><SPAN
331
CLASS="emphasis"
332
><I
333
CLASS="EMPHASIS"
334
>none</I
335
></SPAN
336
></TD
337
></TR
338
><TR
339
><TD
340
WIDTH="25%"
341
ALIGN="LEFT"
342
VALIGN="TOP"
343
>-c <TT
344
CLASS="REPLACEABLE"
345
><I
346
>kernel_command_line</I
347
></TT
348
></TD
349
><TD
350
WIDTH="25%"
351
ALIGN="LEFT"
352
VALIGN="TOP"
353
>String</TD
354
><TD
355
WIDTH="25%"
356
ALIGN="LEFT"
357
VALIGN="TOP"
358
>Command line to pass to the Linux kernel.</TD
359
><TD
360
WIDTH="25%"
361
ALIGN="LEFT"
362
VALIGN="TOP"
363
><SPAN
364
CLASS="emphasis"
365
><I
366
CLASS="EMPHASIS"
367
>None</I
368
></SPAN
369
></TD
370
></TR
371
><TR
372
><TD
373
WIDTH="25%"
374
ALIGN="LEFT"
375
VALIGN="TOP"
376
><TT
377
CLASS="REPLACEABLE"
378
><I
379
>entry_address</I
380
></TT
381
></TD
382
><TD
383
WIDTH="25%"
384
ALIGN="LEFT"
385
VALIGN="TOP"
386
>Number</TD
387
><TD
388
WIDTH="25%"
389
ALIGN="LEFT"
390
VALIGN="TOP"
391
>Starting address for Linux kernel execution</TD
392
><TD
393
WIDTH="25%"
394
ALIGN="LEFT"
395
VALIGN="TOP"
396
>Implied by architecture</TD
397
></TR
398
></TBODY
399
></TABLE
400
><P
401
></P
402
></DIV
403
></DIV
404
><DIV
405
CLASS="REFSECT1"
406
><A
407
NAME="AEN4653"
408
></A
409
><H2
410
>Description</H2
411
><P
412
>The <B
413
CLASS="COMMAND"
414
>exec</B
415
> command is used to execute a non-eCos application, typically a
416
Linux kernel. Additional information may be passed to the kernel at startup
417
time. This command is quite special (and unique from the <B
418
CLASS="COMMAND"
419
>go</B
420
> command) in
421
that the program being executed may expect certain environmental setups, for
422
example that the MMU is turned off, etc. </P
423
><P
424
>The Linux kernel expects to have been loaded to a particular memory
425
location which is architecture dependent(0xC0008000 in the case of the SA1110).
426
Since this memory is  used
427
by RedBoot internally, it is not possible to load the kernel to that location
428
directly. Thus the requirement for the "-b" option which tells the command
429
where the kernel has been loaded. When the <B
430
CLASS="COMMAND"
431
>exec</B
432
> command runs, the image will
433
be relocated to the appropriate location before being started. The "-r" and
434
"-s" options are used to pass information to the kernel about where a statically
435
loaded ramdisk (initrd) is located.</P
436
><P
437
>The "-c" option can be used to pass textual "command line" information
438
to the kernel.  If the command line data contains any punctuation (spaces,
439
etc), then it must be quoted using the double-quote character '"'. If the
440
quote character is required, it should be written as '\"'.
441
      </P
442
></DIV
443
><DIV
444
CLASS="REFSECT1"
445
><A
446
NAME="AEN4661"
447
></A
448
><H2
449
>Examples</H2
450
><P
451
>Execute a Linux kernel, passing a command line, which needs relocation.
452
The result from RedBoot is normally quiet, with the target platform being
453
passed over to Linux immediately.
454
<TABLE
455
BORDER="5"
456
BGCOLOR="#E0E0F0"
457
WIDTH="70%"
458
><TR
459
><TD
460
><PRE
461
CLASS="SCREEN"
462
>RedBoot&#62; <TT
463
CLASS="USERINPUT"
464
><B
465
>exec -b 0x100000 -l 0x80000 -c "noinitrd root=/dev/mtdblock3 console=ttySA0"</B
466
></TT
467
></PRE
468
></TD
469
></TR
470
></TABLE
471
>
472
      </P
473
><P
474
>Execute a Linux kernel, default entry address and no relocation required, with a timeout.
475
The <SPAN
476
CLASS="emphasis"
477
><I
478
CLASS="EMPHASIS"
479
> emphasized lines</I
480
></SPAN
481
> are output from the loaded kernel.
482
<TABLE
483
BORDER="5"
484
BGCOLOR="#E0E0F0"
485
WIDTH="70%"
486
><TR
487
><TD
488
><PRE
489
CLASS="SCREEN"
490
>
491
RedBoot&#62; exec <TT
492
CLASS="USERINPUT"
493
><B
494
>-c "console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-sh" -w 5</B
495
></TT
496
>
497
Now booting linux kernel:
498
Base address 0x8c001000 Entry 0x8c210000
499
Cmdline : console=ttyS0,38400 ip=dhcp nfsroot=/export/elfs-sh
500
About to start execution at 0x8x210000 - abort with ^C within 5 seconds
501
<SPAN
502
CLASS="emphasis"
503
><I
504
CLASS="EMPHASIS"
505
>Linux version 2.4.10-pre6 (...) (gcc version 3.1-stdsh-010931) #3 Thu Sep 27 11:04:23 BST 2001</I
506
></SPAN
507
></PRE
508
></TD
509
></TR
510
></TABLE
511
>
512
      </P
513
></DIV
514
><DIV
515
CLASS="NAVFOOTER"
516
><HR
517
ALIGN="LEFT"
518
WIDTH="100%"><TABLE
519
SUMMARY="Footer navigation table"
520
WIDTH="100%"
521
BORDER="0"
522
CELLPADDING="0"
523
CELLSPACING="0"
524
><TR
525
><TD
526
WIDTH="33%"
527
ALIGN="left"
528
VALIGN="top"
529
><A
530
HREF="go-command.html"
531
ACCESSKEY="P"
532
>Prev</A
533
></TD
534
><TD
535
WIDTH="34%"
536
ALIGN="center"
537
VALIGN="top"
538
><A
539
HREF="ecos-ref.html"
540
ACCESSKEY="H"
541
>Home</A
542
></TD
543
><TD
544
WIDTH="33%"
545
ALIGN="right"
546
VALIGN="top"
547
><A
548
HREF="rebuilding-redboot.html"
549
ACCESSKEY="N"
550
>Next</A
551
></TD
552
></TR
553
><TR
554
><TD
555
WIDTH="33%"
556
ALIGN="left"
557
VALIGN="top"
558
>go</TD
559
><TD
560
WIDTH="34%"
561
ALIGN="center"
562
VALIGN="top"
563
><A
564
HREF="executing-programs.html"
565
ACCESSKEY="U"
566
>Up</A
567
></TD
568
><TD
569
WIDTH="33%"
570
ALIGN="right"
571
VALIGN="top"
572
>Rebuilding RedBoot</TD
573
></TR
574
></TABLE
575
></DIV
576
></BODY
577
></HTML
578
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.