1 <!-- 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. -->
12 >Rebuilding RedBoot</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
19 TITLE="eCos Reference Manual"
20 HREF="ecos-ref.html"><LINK
22 TITLE="RedBoot™ User's Guide"
23 HREF="redboot.html"><LINK
26 HREF="exec-command.html"><LINK
28 TITLE="Updating RedBoot"
29 HREF="updating-redboot.html"></HEAD
40 SUMMARY="Header navigation table"
49 >eCos Reference Manual</TH
57 HREF="exec-command.html"
71 HREF="updating-redboot.html"
84 NAME="REBUILDING-REDBOOT">Chapter 3. Rebuilding RedBoot</H1
90 NAME="AEN4673">Introduction</H1
92 > 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
98 >, as well as from the command line using
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
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:
114 > for a RAM mode RedBoot
115 configuration and <TT
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
127 >The RedBoot build process results in a number of files in the
136 result. Depending on the platform CDL, there will also be generated
137 versions of RedBoot in other file formats, such as
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
151 (Motorola S-record format, good when downloading a RAM mode image for
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
162 >The platform specific information in <A
163 HREF="installation-and-testing.html"
165 > should be consulted, as there may
166 be other special instructions required to build RedBoot for particular
173 NAME="AEN4697">Rebuilding RedBoot using <SPAN
178 >To rebuild RedBoot using the
182 > tool, create a temporary
183 directory for building RedBoot, name it according to the desired
184 configuration of RedBoot, here RAM:
196 >mkdir /tmp/redboot_RAM</B
202 >cd /tmp/redboot_RAM</B
210 >Create the build tree according to the chosen platform, here
211 using the Hitachi Solution Engine 7751 board as
220 >It is assumed that the environment variable
221 ECOS_REPOSITORY points to the eCos/RedBoot source tree.</P
236 >ecosconfig new se7751 redboot</B
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
251 Replace the platform name ("se7751") with the appropriate name for the
254 >Then import the appropriate platform RedBoot configuration file,
255 here for RAM configuration:
267 >ecosconfig import <TT
269 >${ECOS_REPOSITORY}/hal/sh/se7751/<TT
274 >/misc/redboot_RAM.ecm</TT
288 Replace architecture ("sh"), platform ("se7751") and version
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
299 >RedBoot can now be built:
319 >The resulting RedBoot files will be in the associated
320 install directory, in this example, <TT
326 HREF="installation-and-testing.html"
329 details are described in the form of shell variables. Using those,
330 the steps to build RedBoot are:
338 CLASS="PROGRAMLISTING"
339 >export REDBOOT_CFG=redboot_ROM
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
356 To build for another configuration, simply change the
362 > definition accordingly. Also
368 > variable matches the
369 version of the platform package.</P
376 NAME="AEN4728">Rebuilding RedBoot from the <SPAN
378 >Configuration Tool</SPAN
381 >To rebuild RedBoot from the <SPAN
385 >, open the template window (<SPAN
387 >Build->Templates</SPAN
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
394 >Import the desired RedBoot configuration file from the platform HAL
397 >File->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
410 >/misc/redboot_RAM.ecm</TT
413 >Save the configuration somewhere suitable with enough disk space
414 for building RedBoot (<SPAN
416 >File->Save...</SPAN
417 >). Choose the name according to
418 the RedBoot configuration, for example
424 >Then start the build (<SPAN
426 >Build->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
431 >redboot_RAM_install/bin</TT
434 >As noted above, each platform's details are described in <A
435 HREF="installation-and-testing.html"
437 >. Use the information provided in
438 the shell variables to find the configuration file - the path to it is
441 >${ECOS_REPOSITORY}/hal/${ARCH_DIR}/${PLATFORM_DIR}/${VERSION}/misc/${REDBOOT_CFG}.ecm</TT
449 eCos/RedBoot sources, <TT
455 version of the package (usually "current") and
461 > is the desired configuration,
471 SUMMARY="Footer navigation table"
482 HREF="exec-command.html"
500 HREF="updating-redboot.html"
524 >Updating RedBoot</TD