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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [rebuilding-redboot.html] - Blame information for rev 588

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
>Rebuilding RedBoot</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="RedBoot&#8482; User's Guide"
23
HREF="redboot.html"><LINK
24
REL="PREVIOUS"
25
TITLE="exec"
26
HREF="exec-command.html"><LINK
27
REL="NEXT"
28
TITLE="Updating RedBoot"
29
HREF="updating-redboot.html"></HEAD
30
><BODY
31
CLASS="CHAPTER"
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="exec-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="updating-redboot.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><DIV
81
CLASS="CHAPTER"
82
><H1
83
><A
84
NAME="REBUILDING-REDBOOT">Chapter 3. Rebuilding RedBoot</H1
85
><DIV
86
CLASS="SECT1"
87
><H1
88
CLASS="SECT1"
89
><A
90
NAME="AEN4673">Introduction</H1
91
><P
92
>&#13;RedBoot is built as an application on top of eCos. The makefile rules
93
for building RedBoot are part of the eCos CDL package, so it's
94
possible to build eCos from the <SPAN
95
CLASS="APPLICATION"
96
>Configuration
97
Tool</SPAN
98
>, as well as from the command line using
99
<SPAN
100
CLASS="APPLICATION"
101
>ecosconfig</SPAN
102
>.</P
103
><P
104
>Building RedBoot requires only a few steps: selecting the
105
platform and the RedBoot template, importing a platform specific
106
configuration file, and finally starting the build.</P
107
><P
108
>The platform specific configuration file makes sure the settings
109
are correct for building RedBoot on the given platform. Each platform
110
should provide at least two of these configuration files:
111
<TT
112
CLASS="FILENAME"
113
>redboot_RAM.ecm</TT
114
> for a RAM mode RedBoot
115
configuration and <TT
116
CLASS="FILENAME"
117
>redboot_ROM.ecm</TT
118
> or
119
<TT
120
CLASS="FILENAME"
121
>redboot_ROMRAM.ecm</TT
122
> for a ROM or ROMRAM mode
123
RedBoot configuration. There may be additional
124
configuration files according to the requirements of the particular
125
platform.</P
126
><P
127
>The RedBoot build process results in a number of files in the
128
install <TT
129
CLASS="FILENAME"
130
>bin</TT
131
> directory. The ELF
132
file <TT
133
CLASS="FILENAME"
134
>redboot.elf</TT
135
> is the pricipal
136
result. Depending on the platform CDL, there will also be generated
137
versions of RedBoot in other file formats, such as
138
<TT
139
CLASS="FILENAME"
140
>redboot.bin</TT
141
> (binary format, good when doing an
142
update of a primary RedBoot image, see <A
143
HREF="updating-redboot.html#UPDATE-PRIMARY-IMAGE"
144
>the Section called <I
145
>Update the primary RedBoot flash image</I
146
> in Chapter 4</A
147
>), <TT
148
CLASS="FILENAME"
149
>redboot.srec</TT
150
>
151
(Motorola S-record format, good when downloading a RAM mode image for
152
execution), and <TT
153
CLASS="FILENAME"
154
>redboot.img</TT
155
> (stripped ELF format,
156
good when downloading a RAM mode image for execution, smaller than the
157
.srec file). Some platforms may provide additional file formats and
158
also relocate some of these files to a
159
particular address making them more suitable for downloading using a
160
different boot monitor or flash programming tools.</P
161
><P
162
>The platform specific information in <A
163
HREF="installation-and-testing.html"
164
>Chapter 5</A
165
> should be consulted, as there may
166
be other special instructions required to build RedBoot for particular
167
platforms.</P
168
><DIV
169
CLASS="SECT2"
170
><H2
171
CLASS="SECT2"
172
><A
173
NAME="AEN4697">Rebuilding RedBoot using <SPAN
174
CLASS="APPLICATION"
175
>ecosconfig</SPAN
176
></H2
177
><P
178
>To rebuild RedBoot using the
179
<SPAN
180
CLASS="APPLICATION"
181
>ecosconfig</SPAN
182
> tool, create a temporary
183
directory for building RedBoot, name it according to the desired
184
configuration of RedBoot, here RAM:
185
<TABLE
186
BORDER="5"
187
BGCOLOR="#E0E0F0"
188
WIDTH="70%"
189
><TR
190
><TD
191
><PRE
192
CLASS="SCREEN"
193
>$ <TT
194
CLASS="USERINPUT"
195
><B
196
>mkdir /tmp/redboot_RAM</B
197
></TT
198
>
199
$ <TT
200
CLASS="USERINPUT"
201
><B
202
>cd /tmp/redboot_RAM</B
203
></TT
204
></PRE
205
></TD
206
></TR
207
></TABLE
208
></P
209
><P
210
>Create the build tree according to the chosen platform, here
211
using the Hitachi Solution Engine 7751 board as
212
an example:
213
<DIV
214
CLASS="NOTE"
215
><BLOCKQUOTE
216
CLASS="NOTE"
217
><P
218
><B
219
>Note: </B
220
>It is assumed that the environment variable
221
ECOS_REPOSITORY points to the eCos/RedBoot source tree.</P
222
></BLOCKQUOTE
223
></DIV
224
>
225
<TABLE
226
BORDER="5"
227
BGCOLOR="#E0E0F0"
228
WIDTH="70%"
229
><TR
230
><TD
231
><PRE
232
CLASS="SCREEN"
233
>$ <TT
234
CLASS="USERINPUT"
235
><B
236
>ecosconfig new se7751 redboot</B
237
></TT
238
>
239
U CYGPKG_HAL_SH_7750, new inferred value 0
240
U CYGPKG_HAL_SH_7751, new inferred value 1
241
U CYGHWR_HAL_SH_IRQ_USE_IRQLVL, new inferred value 1
242
U CYGSEM_HAL_USE_ROM_MONITOR, new inferred value 0
243
U CYGDBG_HAL_COMMON_CONTEXT_SAVE_MINIMUM, new inferred value 0
244
U CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS, new inferred value 1
245
U CYGFUN_LIBC_STRING_BSD_FUNCS, new inferred value 0
246
U CYGPKG_NS_DNS_BUILD, new inferred value 0</PRE
247
></TD
248
></TR
249
></TABLE
250
>
251
Replace the platform name ("se7751") with the appropriate name for the
252
chosen platform.</P
253
><P
254
>Then import the appropriate platform RedBoot configuration file,
255
here for RAM configuration:
256
<TABLE
257
BORDER="5"
258
BGCOLOR="#E0E0F0"
259
WIDTH="70%"
260
><TR
261
><TD
262
><PRE
263
CLASS="SCREEN"
264
>$ <TT
265
CLASS="USERINPUT"
266
><B
267
>ecosconfig import <TT
268
CLASS="FILENAME"
269
>${ECOS_REPOSITORY}/hal/sh/se7751/<TT
270
CLASS="REPLACEABLE"
271
><I
272
>VERSION</I
273
></TT
274
>/misc/redboot_RAM.ecm</TT
275
></B
276
></TT
277
>
278
$ <TT
279
CLASS="USERINPUT"
280
><B
281
>ecosconfig tree</B
282
></TT
283
></PRE
284
></TD
285
></TR
286
></TABLE
287
>
288
Replace architecture ("sh"), platform ("se7751") and version
289
("<TT
290
CLASS="REPLACEABLE"
291
><I
292
>VERSION</I
293
></TT
294
>") with those appropriate for the
295
chosen platform and the version number of its HAL package. Also
296
replace the configuration name ("redboot_RAM.ecm") with that of the
297
appropriate configuration file.</P
298
><P
299
>RedBoot can now be built:
300
<TABLE
301
BORDER="5"
302
BGCOLOR="#E0E0F0"
303
WIDTH="70%"
304
><TR
305
><TD
306
><PRE
307
CLASS="SCREEN"
308
>$ <TT
309
CLASS="USERINPUT"
310
><B
311
>make</B
312
></TT
313
></PRE
314
></TD
315
></TR
316
></TABLE
317
></P
318
><P
319
>The resulting RedBoot files will be in the associated
320
install directory, in this example, <TT
321
CLASS="FILENAME"
322
>./install/bin</TT
323
>.</P
324
><P
325
>In <A
326
HREF="installation-and-testing.html"
327
>Chapter 5</A
328
> each platform's
329
details are described in the form of shell variables. Using those,
330
the steps to build RedBoot are:
331
<TABLE
332
BORDER="5"
333
BGCOLOR="#E0E0F0"
334
WIDTH="70%"
335
><TR
336
><TD
337
><PRE
338
CLASS="PROGRAMLISTING"
339
>export REDBOOT_CFG=redboot_ROM
340
export VERSION=<TT
341
CLASS="REPLACEABLE"
342
><I
343
>VERSION</I
344
></TT
345
>
346
mkdir /tmp/${REDBOOT_CFG}
347
cd /tmp/${REDBOOT_CFG}
348
ecosconfig new ${TARGET} redboot
349
ecosconfig import ${ECOS_REPOSITORY}/hal/${ARCH_DIR}/${PLATFORM_DIR}/${VERSION}/misc/${REDBOOT_CFG}.ecm
350
ecosconfig tree
351
make</PRE
352
></TD
353
></TR
354
></TABLE
355
>
356
To build for another configuration, simply change the
357
<TT
358
CLASS="REPLACEABLE"
359
><I
360
>REDBOOT_CFG</I
361
></TT
362
> definition accordingly. Also
363
make sure the <TT
364
CLASS="REPLACEABLE"
365
><I
366
>VERSION</I
367
></TT
368
> variable matches the
369
version of the platform package.</P
370
></DIV
371
><DIV
372
CLASS="SECT2"
373
><H2
374
CLASS="SECT2"
375
><A
376
NAME="AEN4728">Rebuilding RedBoot from the <SPAN
377
CLASS="APPLICATION"
378
>Configuration Tool</SPAN
379
></H2
380
><P
381
>To rebuild RedBoot from the <SPAN
382
CLASS="APPLICATION"
383
>Configuration
384
Tool</SPAN
385
>, open the template window (<SPAN
386
CLASS="GUIMENUITEM"
387
>Build-&#62;Templates</SPAN
388
>) and
389
select the appropriate Hardware target and in Packages select
390
"redboot". Then press OK. Depending on the platform, a number of
391
conflicts may need to be resolved before the build can be started;
392
select "Continue".</P
393
><P
394
>Import the desired RedBoot configuration file from the platform HAL
395
(<SPAN
396
CLASS="GUIMENUITEM"
397
>File-&#62;Import...</SPAN
398
>).  Depending on the platform, a number of
399
conflicts may need to be resolved before the build can be started;
400
select "Continue". For example, if the platform selected is Hitachi
401
SE7751 board and the RAM configuration RedBoot should be built, import
402
the file
403
<TT
404
CLASS="FILENAME"
405
>hal/sh/se7751/<TT
406
CLASS="REPLACEABLE"
407
><I
408
>VERSION</I
409
></TT
410
>/misc/redboot_RAM.ecm</TT
411
>.</P
412
><P
413
>Save the configuration somewhere suitable with enough disk space
414
for building RedBoot (<SPAN
415
CLASS="GUIMENUITEM"
416
>File-&#62;Save...</SPAN
417
>). Choose the name according to
418
the RedBoot configuration, for example
419
<TT
420
CLASS="FILENAME"
421
>redboot_RAM.ecc</TT
422
>.</P
423
><P
424
>Then start the build (<SPAN
425
CLASS="GUIMENUITEM"
426
>Build-&#62;Library</SPAN
427
>) and wait for it to
428
complete. The resulting RedBoot files will be in the associated
429
install directory, for the example this would be <TT
430
CLASS="FILENAME"
431
>redboot_RAM_install/bin</TT
432
>.</P
433
><P
434
>As noted above, each platform's details are described in <A
435
HREF="installation-and-testing.html"
436
>Chapter 5</A
437
>. Use the information provided in
438
the shell variables to find the configuration file - the path to it is
439
<TT
440
CLASS="FILENAME"
441
>${ECOS_REPOSITORY}/hal/${ARCH_DIR}/${PLATFORM_DIR}/${VERSION}/misc/${REDBOOT_CFG}.ecm</TT
442
>,
443
where <TT
444
CLASS="REPLACEABLE"
445
><I
446
>ECOS_REPOSITORY</I
447
></TT
448
> points to the
449
eCos/RedBoot sources, <TT
450
CLASS="REPLACEABLE"
451
><I
452
>VERSION</I
453
></TT
454
> is the
455
version of the package (usually "current") and
456
<TT
457
CLASS="REPLACEABLE"
458
><I
459
>REDBOOT_CFG</I
460
></TT
461
> is the desired configuration,
462
e.g. redboot_RAM.</P
463
></DIV
464
></DIV
465
></DIV
466
><DIV
467
CLASS="NAVFOOTER"
468
><HR
469
ALIGN="LEFT"
470
WIDTH="100%"><TABLE
471
SUMMARY="Footer navigation table"
472
WIDTH="100%"
473
BORDER="0"
474
CELLPADDING="0"
475
CELLSPACING="0"
476
><TR
477
><TD
478
WIDTH="33%"
479
ALIGN="left"
480
VALIGN="top"
481
><A
482
HREF="exec-command.html"
483
ACCESSKEY="P"
484
>Prev</A
485
></TD
486
><TD
487
WIDTH="34%"
488
ALIGN="center"
489
VALIGN="top"
490
><A
491
HREF="ecos-ref.html"
492
ACCESSKEY="H"
493
>Home</A
494
></TD
495
><TD
496
WIDTH="33%"
497
ALIGN="right"
498
VALIGN="top"
499
><A
500
HREF="updating-redboot.html"
501
ACCESSKEY="N"
502
>Next</A
503
></TD
504
></TR
505
><TR
506
><TD
507
WIDTH="33%"
508
ALIGN="left"
509
VALIGN="top"
510
>exec</TD
511
><TD
512
WIDTH="34%"
513
ALIGN="center"
514
VALIGN="top"
515
><A
516
HREF="redboot.html"
517
ACCESSKEY="U"
518
>Up</A
519
></TD
520
><TD
521
WIDTH="33%"
522
ALIGN="right"
523
VALIGN="top"
524
>Updating RedBoot</TD
525
></TR
526
></TABLE
527
></DIV
528
></BODY
529
></HTML
530
>

powered by: WebSVN 2.1.0

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