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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [user-guide/] [using-ecosconfig-on-linux.html] - Blame information for rev 446

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- 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
>Ecosconfig on Windows and Linux Quick Start</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 User Guide"
20
HREF="ecos-user-guide.html"><LINK
21
REL="UP"
22
TITLE="Configuring and Building eCos from Source"
23
HREF="configuring-and-building-ecos-from-source.html"><LINK
24
REL="PREVIOUS"
25
TITLE="Configuration Tool on Windows and Linux Quick Start"
26
HREF="using-configtool-windows-linux.html"><LINK
27
REL="NEXT"
28
TITLE="Running an eCos Test Case"
29
HREF="running-an-ecos-test-case.html"></HEAD
30
><BODY
31
CLASS="SECT1"
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 User Guide</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="using-configtool-windows-linux.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
>Chapter 11. Configuring and Building <SPAN
66
CLASS="PRODUCTNAME"
67
>eCos</SPAN
68
> from Source</TD
69
><TD
70
WIDTH="10%"
71
ALIGN="right"
72
VALIGN="bottom"
73
><A
74
HREF="running-an-ecos-test-case.html"
75
ACCESSKEY="N"
76
>Next</A
77
></TD
78
></TR
79
></TABLE
80
><HR
81
ALIGN="LEFT"
82
WIDTH="100%"></DIV
83
><DIV
84
CLASS="SECT1"
85
><H1
86
CLASS="SECT1"
87
><A
88
NAME="USING-ECOSCONFIG-ON-LINUX">Ecosconfig on Windows and Linux Quick Start</H1
89
><P
90
>As an alternative to using the graphical
91
<SPAN
92
CLASS="APPLICATION"
93
>Configuration Tool</SPAN
94
>, it is still possible to
95
configure and build a kernel by editing a configuration file manually
96
and using the <B
97
CLASS="COMMAND"
98
>ecosconfig</B
99
> command. </P
100
><P
101
>Manual configuration and the <B
102
CLASS="COMMAND"
103
>ecosconfig</B
104
> command are
105
described in detail in <A
106
HREF="manual-configuration.html"
107
>Chapter 28</A
108
>.</P
109
><P
110
>To use the <B
111
CLASS="COMMAND"
112
>ecosconfig</B
113
> command you need to start a
114
shell. In Windows you need to start a
115
<SPAN
116
CLASS="PRODUCTNAME"
117
>CygWin</SPAN
118
> <B
119
CLASS="COMMAND"
120
>bash</B
121
> shell, not a
122
DOS command line.</P
123
><P
124
>The following instructions assume that the
125
<TT
126
CLASS="LITERAL"
127
>PATH</TT
128
> and <TT
129
CLASS="LITERAL"
130
>ECOS_REPOSITORY</TT
131
>
132
environment variables have been setup correctly as described in <A
133
HREF="user-guide-installation-linux.html"
134
>Chapter 7</A
135
>.  They also assume Linux
136
usage but equally well apply to Windows running Cygwin.</P
137
><P
138
>Before invoking <B
139
CLASS="COMMAND"
140
>ecosconfig</B
141
> you need to
142
choose a directory in which to work. For the purposes of this tutorial,
143
the default path will be <TT
144
CLASS="FILENAME"
145
><TT
146
CLASS="REPLACEABLE"
147
><I
148
>BASE_DIR</I
149
></TT
150
>/ecos-work</TT
151
>.
152
Create this directory and change to it by typing: </P
153
><TABLE
154
BORDER="5"
155
BGCOLOR="#E0E0F0"
156
WIDTH="70%"
157
><TR
158
><TD
159
><PRE
160
CLASS="PROGRAMLISTING"
161
>$ mkdir <TT
162
CLASS="REPLACEABLE"
163
><I
164
>BASE_DIR</I
165
></TT
166
>/ecos-work
167
$ cd <TT
168
CLASS="REPLACEABLE"
169
><I
170
>BASE_DIR</I
171
></TT
172
>/ecos-work</PRE
173
></TD
174
></TR
175
></TABLE
176
><P
177
>To see what options can be used with <B
178
CLASS="COMMAND"
179
>ecosconfig</B
180
>,
181
type: </P
182
><TABLE
183
BORDER="5"
184
BGCOLOR="#E0E0F0"
185
WIDTH="70%"
186
><TR
187
><TD
188
><PRE
189
CLASS="PROGRAMLISTING"
190
>$ ecosconfig --help</PRE
191
></TD
192
></TR
193
></TABLE
194
><P
195
>The available packages, targets and templates may be listed
196
as follows:</P
197
><TABLE
198
BORDER="5"
199
BGCOLOR="#E0E0F0"
200
WIDTH="70%"
201
><TR
202
><TD
203
><PRE
204
CLASS="PROGRAMLISTING"
205
>$ ecosconfig list</PRE
206
></TD
207
></TR
208
></TABLE
209
><P
210
>Here is sample output from <B
211
CLASS="COMMAND"
212
>ecosconfig</B
213
> showing
214
the usage message.</P
215
><DIV
216
CLASS="EXAMPLE"
217
><A
218
NAME="AEN683"><P
219
><B
220
>Example 11-1. Getting  help from ecosconfig</B
221
></P
222
><TABLE
223
BORDER="5"
224
BGCOLOR="#E0E0F0"
225
WIDTH="70%"
226
><TR
227
><TD
228
><PRE
229
CLASS="PROGRAMLISTING"
230
>$ ecosconfig --help
231
Usage: ecosconfig [ qualifier ... ] [ command ]
232
  commands are:
233
    list                                       : list repository contents
234
    new TARGET [ TEMPLATE [ VERSION ] ]        : create a configuration
235
    target TARGET                              : change the target hardware
236
    template TEMPLATE [ VERSION ]              : change the template
237
    add PACKAGE [ PACKAGE ... ]                : add package(s)
238
    remove PACKAGE [ PACKAGE ... ]             : remove package(s)
239
    version VERSION PACKAGE [ PACKAGE ... ]    : change version of package(s)
240
    export FILE                                : export minimal config info
241
    import FILE                                : import additional config info
242
    check                                      : check the configuration
243
    resolve                                    : resolve conflicts
244
    tree                                       : create a build tree
245
  qualifiers are:
246
    --config=FILE                              : the configuration file
247
    --prefix=DIRECTORY                         : the install prefix
248
    --srcdir=DIRECTORY                         : the source repository
249
    --no-resolve                               : disable conflict
250
resolution
251
    --version                                  : show version and copyright
252
$</PRE
253
></TD
254
></TR
255
></TABLE
256
></DIV
257
><DIV
258
CLASS="EXAMPLE"
259
><A
260
NAME="AEN686"><P
261
><B
262
>Example 11-2. ecosconfig output &#8212;
263
list of available packages, targets and templates</B
264
></P
265
><TABLE
266
BORDER="5"
267
BGCOLOR="#E0E0F0"
268
WIDTH="70%"
269
><TR
270
><TD
271
><PRE
272
CLASS="PROGRAMLISTING"
273
>$ ecosconfig list
274
Package CYGPKG_CYGMON (CygMon support via eCos):
275
aliases: cygmon
276
versions: &#60;version&#62;
277
Package CYGPKG_DEVICES_WALLCLOCK_DALLAS_DS1742 (Wallclock driver for Dallas 1742):
278
aliases: devices_wallclock_ds1742 device_wallclock_ds1742
279
versions: &#60;version&#62;
280
Package CYGPKG_DEVICES_WALLCLOCK_SH3 (Wallclock driver for SH3 RTC module):
281
aliases: devices_wallclock_sh3 device_wallclock_sh3
282
versions: &#60;version&#62;
283
Package CYGPKG_DEVICES_WATCHDOG_ARM_AEB (Watchdog driver for ARM/AEB board):
284
aliases: devices_watchdog_aeb device_watchdog_aeb
285
versions: &#60;version&#62;
286
Package CYGPKG_DEVICES_WATCHDOG_ARM_EBSA285 (Watchdog driver for ARM/EBSA285 board):
287
aliases: devices_watchdog_ebsa285 device_watchdog_ebsa285
288
versions: &#60;version&#62;
289
&#8230;</PRE
290
></TD
291
></TR
292
></TABLE
293
></DIV
294
><DIV
295
CLASS="SECT2"
296
><H2
297
CLASS="SECT2"
298
><A
299
NAME="AEN689">Selecting a  Target</H2
300
><P
301
>To configure for a listed target, type: </P
302
><TABLE
303
BORDER="5"
304
BGCOLOR="#E0E0F0"
305
WIDTH="70%"
306
><TR
307
><TD
308
><PRE
309
CLASS="PROGRAMLISTING"
310
>$ ecosconfig new &lt;target&#62;</PRE
311
></TD
312
></TR
313
></TABLE
314
><P
315
>For example, to configure for the ARM PID development board,
316
type: </P
317
><TABLE
318
BORDER="5"
319
BGCOLOR="#E0E0F0"
320
WIDTH="70%"
321
><TR
322
><TD
323
><PRE
324
CLASS="PROGRAMLISTING"
325
>$ ecosconfig new pid</PRE
326
></TD
327
></TR
328
></TABLE
329
><P
330
>You can then edit the generated file,
331
<TT
332
CLASS="FILENAME"
333
>ecos.ecc</TT
334
>, setting the options as required for the
335
target (endianess, CPU model, Startup type, etc.).  For detailed
336
information about how to edit the <TT
337
CLASS="FILENAME"
338
>ecos.ecc</TT
339
> file,
340
see the <I
341
CLASS="CITETITLE"
342
>CDL Writer's Guide</I
343
> and <A
344
HREF="editing-an-ecos-savefile.html"
345
>the Section called <I
346
>Editing an <SPAN
347
CLASS="PRODUCTNAME"
348
>eCos</SPAN
349
> Savefile</I
350
> in Chapter 28</A
351
>.</P
352
><P
353
>Create a build tree for the configured target by typing:</P
354
><TABLE
355
BORDER="5"
356
BGCOLOR="#E0E0F0"
357
WIDTH="70%"
358
><TR
359
><TD
360
><PRE
361
CLASS="PROGRAMLISTING"
362
>$ ecosconfig tree</PRE
363
></TD
364
></TR
365
></TABLE
366
><P
367
>If there are any problem with the configuration,
368
<B
369
CLASS="COMMAND"
370
>ecosconfig</B
371
> will tell you. The most likely cause of
372
this is mistakes when editing the <TT
373
CLASS="FILENAME"
374
>ecos.ecc</TT
375
> file.
376
You can check whether the configuration you have made is correct,
377
without building the tree with the following command:</P
378
><TABLE
379
BORDER="5"
380
BGCOLOR="#E0E0F0"
381
WIDTH="70%"
382
><TR
383
><TD
384
><PRE
385
CLASS="PROGRAMLISTING"
386
>$ ecosconfig check</PRE
387
></TD
388
></TR
389
></TABLE
390
><P
391
>If this reports any conflicts you can get
392
<B
393
CLASS="COMMAND"
394
>ecosconfig</B
395
> to try and resolve them itself by typing:</P
396
><TABLE
397
BORDER="5"
398
BGCOLOR="#E0E0F0"
399
WIDTH="70%"
400
><TR
401
><TD
402
><PRE
403
CLASS="PROGRAMLISTING"
404
>$ ecosconfig resolve</PRE
405
></TD
406
></TR
407
></TABLE
408
><P
409
>See <A
410
HREF="conflicts-and-constraints.html"
411
>the Section called <I
412
>Conflicts and constraints</I
413
> in Chapter 28</A
414
> for more details.</P
415
><P
416
>You can now run the command <B
417
CLASS="COMMAND"
418
>make</B
419
> or <B
420
CLASS="COMMAND"
421
>make
422
tests</B
423
>, after which you will be at the same point you
424
would be after running the <SPAN
425
CLASS="APPLICATION"
426
>Configuration Tool</SPAN
427
>
428
&#8212; you can start developing your own applications,
429
following the steps in <A
430
HREF="building-and-running-sample-appliations.html"
431
>Chapter 13</A
432
>. </P
433
><P
434
>The procedure shown above allows you to do very coarse-grained
435
configuration of the <SPAN
436
CLASS="PRODUCTNAME"
437
>eCos</SPAN
438
> kernel: you can select which packages
439
to include in your kernel, and give target and start-up options.
440
But you cannot select components within a package, or set the very
441
fine-grained options. </P
442
><P
443
>To select fine-grained configuration options you will need to
444
edit the configuration file <TT
445
CLASS="FILENAME"
446
>ecos.ecc</TT
447
> in the
448
current directory and regenerate the build tree.</P
449
><DIV
450
CLASS="CAUTION"
451
><P
452
></P
453
><TABLE
454
CLASS="CAUTION"
455
BORDER="1"
456
WIDTH="100%"
457
><TR
458
><TD
459
ALIGN="CENTER"
460
><B
461
>Caution</B
462
></TD
463
></TR
464
><TR
465
><TD
466
ALIGN="LEFT"
467
><P
468
>You should follow the manual configuration process described
469
above very carefully, and you should read the comments in each file
470
to see when one option depends on other options or packages being
471
enabled or disabled. If you do not, you might end up with an inconsistently
472
configured kernel which could fail to build or might execute
473
incorrectly.</P
474
></TD
475
></TR
476
></TABLE
477
></DIV
478
></DIV
479
></DIV
480
><DIV
481
CLASS="NAVFOOTER"
482
><HR
483
ALIGN="LEFT"
484
WIDTH="100%"><TABLE
485
SUMMARY="Footer navigation table"
486
WIDTH="100%"
487
BORDER="0"
488
CELLPADDING="0"
489
CELLSPACING="0"
490
><TR
491
><TD
492
WIDTH="33%"
493
ALIGN="left"
494
VALIGN="top"
495
><A
496
HREF="using-configtool-windows-linux.html"
497
ACCESSKEY="P"
498
>Prev</A
499
></TD
500
><TD
501
WIDTH="34%"
502
ALIGN="center"
503
VALIGN="top"
504
><A
505
HREF="ecos-user-guide.html"
506
ACCESSKEY="H"
507
>Home</A
508
></TD
509
><TD
510
WIDTH="33%"
511
ALIGN="right"
512
VALIGN="top"
513
><A
514
HREF="running-an-ecos-test-case.html"
515
ACCESSKEY="N"
516
>Next</A
517
></TD
518
></TR
519
><TR
520
><TD
521
WIDTH="33%"
522
ALIGN="left"
523
VALIGN="top"
524
>Configuration Tool on Windows and Linux Quick Start</TD
525
><TD
526
WIDTH="34%"
527
ALIGN="center"
528
VALIGN="top"
529
><A
530
HREF="configuring-and-building-ecos-from-source.html"
531
ACCESSKEY="U"
532
>Up</A
533
></TD
534
><TD
535
WIDTH="33%"
536
ALIGN="right"
537
VALIGN="top"
538
>Running an <SPAN
539
CLASS="PRODUCTNAME"
540
>eCos</SPAN
541
> Test Case</TD
542
></TR
543
></TABLE
544
></DIV
545
></BODY
546
></HTML
547
>

powered by: WebSVN 2.1.0

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