Annotation of prex/doc/html/doc/build.html, Revision 1.1
1.1 ! nbrk 1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
! 2: <html>
! 3: <head>
! 4: <title>Prex Build Guide</title>
! 5: <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
! 6: <meta name="keywords" content="Prex, embedded, real-time, operating system, RTOS, open source, free">
! 7: <meta name="author" content="Kohsuke Ohtani">
! 8: <link rel="stylesheet" type="text/css" href="../default.css" media="screen">
! 9: <link rel="stylesheet" type="text/css" href="../print.css" media="print">
! 10: </head>
! 11: <body>
! 12: <div id="top">
! 13: </div>
! 14: <div id="middle">
! 15:
! 16: <table id="content" cellpadding="0" cellspacing="0">
! 17: <tbody>
! 18:
! 19: <tr>
! 20: <td id="header" colspan="2" valign="top">
! 21: <table width="100%" border="0" cellspacing="0" cellpadding="0">
! 22: <tr>
! 23: <td id="logo">
! 24: <a href="http://prex.sourceforge.net/">
! 25: <img alt="Prex logo" src="../img/logo.gif" border="0"
! 26: style="width: 250px; height: 54px;"></a>
! 27: </td>
! 28: <td id="brief" align="right" valign="bottom">
! 29: An Open Source, Royalty-free,<br>
! 30: Real-time Operating System
! 31: </td>
! 32: </tr>
! 33: </table>
! 34: </td>
! 35: </tr>
! 36:
! 37: <tr>
! 38: <td id="directory" style="vertical-align: top;">
! 39: <a href="http://prex.sourceforge.net/">Prex Home</a> >
! 40: <a href="index.html">Document Index</a> >
! 41: Prex Build Guide
! 42: </tr>
! 43: <tr><td class="pad" colspan="2" style="vertical-align: top;"></td></tr>
! 44:
! 45: <tr>
! 46: <td id="doc" style="vertical-align: top;">
! 47: <h1>Prex Build Guide</h1>
! 48:
! 49: <i>Version 1.4.0, 2007/12/26</i><br>
! 50:
! 51:
! 52: <h3>Table of Contents</h3>
! 53: <ul>
! 54: <li><a href="#get">Getting Source</a></li>
! 55: <li><a href="#compile">Compiling Prex</a></li>
! 56: <li><a href="#cygwin">Compiling on Windows</a></li>
! 57: <li><a href="#custom">Customizing OS Boot Image</a></li>
! 58: </ul>
! 59: <br>
! 60:
! 61:
! 62: <h2 id="get">Getting Source</h2>
! 63: <p>
! 64: You can download the source files at the
! 65: <a href="http://prex.sourceforge.net/downloads.html">download page</a>.<br>
! 66: Some binary files may be available there.
! 67: </p>
! 68:
! 69:
! 70: <h2 id="compile">Compiling Prex</h2>
! 71:
! 72: <h4>Step 1. Prepare Toolchain</h4>
! 73: The following packages are required to compile Prex.
! 74: <ul>
! 75: <li>GCC 2.95 or later (~4.2)</li>
! 76: <li>GNU Binutils</li>
! 77: <li>GNU Make</li>
! 78: </ul>
! 79: GCC and Binutils should be built appropriately for your target
! 80: architecture if you cross-compile Prex.
! 81:
! 82: <h4>Step 2. Unpack Sources</h4>
! 83: Unpack the sources and move to top level directory of the source tree.
! 84: <pre class="terminal">$ cd /usr/src
! 85: $ tar zxvf prex-X.X.X.tar.gz
! 86: $ cd prex-X.X.X
! 87: </pre>
! 88:
! 89: <h4>Step 3. Configure</h4>
! 90: Setup target architecture and platform.
! 91: The following sample shows the setting for i386-pc target.
! 92: <pre class="terminal">$ ./configure --target=i386-pc
! 93: </pre>
! 94:
! 95: <h4>Step 4. Make</h4>
! 96: Run make.<br>
! 97: <pre class="terminal">
! 98: $ make
! 99: </pre>
! 100:
! 101: <h4>(Tips)</h4>
! 102: If you want to run 'make' in the subdirectory, you have to set the
! 103: SRCDIR as follow.<br>
! 104: <pre class="terminal">
! 105: $ export SRCDIR=/usr/src/prex-X.X.X
! 106: </pre>
! 107:
! 108:
! 109: <h2 id="cygwin">Compiling on Windows</h2>
! 110: <p>
! 111: Cygwin is required to build Prex on Windows environment.
! 112: </p>
! 113: <p>
! 114: Please note that we can not use the default gcc version included in Cygwin.
! 115: This is because the pre-compiled gcc in Cygwin is built to generate a native Windows binary (PE format).
! 116: Since Prex supports only ELF file format, you have to prepare the toolchain
! 117: for i386-elf with the following steps.
! 118: (Target Platform is i386-pc here.)
! 119: </p>
! 120:
! 121: <h4>Step 1. Install Cygwin</h4>
! 122:
! 123: You can find the latest Cygwin setup program at
! 124: <a href="http:/www.cygwin.com">this site</a>.
! 125:
! 126: Download setup.exe and run it. During Cygwin installation, you have to select
! 127: at least the following packages in addition to the default selection.<br>
! 128: <ul>
! 129: <li>make</li>
! 130: <li>binutils</li>
! 131: <li>gcc-core</li>
! 132: <li>flex</li>
! 133: <li>perl</li>
! 134: </ul>
! 135: Note: These tools are not required to build Prex itself.
! 136: They are required to build "binutils and gcc".
! 137:
! 138: <h4>Step 2. Unpack Archives</h4>
! 139: You have to download and unpack the following files.
! 140:
! 141: <pre class="terminal">$ cd /usr/src
! 142: $ tar zxvf binitils-2.15.tar.gz
! 143: $ tar zxvf gcc-core-3.4.3.tar.gz
! 144: <!-- Temporary removed
! 145: $ tar zxvf newlib-1.13.0.tar.gz--></pre>
! 146:
! 147: <h4>Step 3. Build Binutils</h4>
! 148:
! 149: <p>
! 150: Configure and build binutils.
! 151: </p>
! 152: <pre class="terminal">$ mkdir binutils-2.15-i386-elf
! 153: $ cd binutils-2.15-i386-elf
! 154: $ ../binutils-2.15/configure --prefix=/usr/local/i386 --target=i386-elf --disable-nls
! 155: $ make
! 156: $ make install</pre>
! 157: <p>
! 158: You must set the path to this binutils before compiling gcc.
! 159: </p>
! 160: <pre class="terminal">$ export PATH=/usr/local/i386/bin:$PATH
! 161: $ cd /usr/src</pre>
! 162:
! 163:
! 164: <h4>Step 4. Build gcc</h4>
! 165:
! 166: <pre class="terminal">$ mkdir gcc-3.4.3-i386-elf
! 167: $ cd gcc-3.4.3-i386-elf
! 168: $ ../gcc-3.4.3/configure --prefix=/usr/local/i386 --target=i386-elf \
! 169: --with-gnu-as --with-gnu-ld --disable-nls --enable-languages=c --without-headers \
! 170: --without-libs --disable-libssp
! 171: $ make LANGUAGES="c"
! 172: $ make LANGUAGES="c" install
! 173: $ cd /usr/src</pre>
! 174:
! 175:
! 176:
! 177: <h4>Step 5. Configure Prex and make</h4>
! 178: <pre class="terminal">$ cd prex-X.X.X
! 179: $ ./configure --target=i386-pc
! 180: $ make
! 181: </pre>
! 182:
! 183: <h2 id="custom">Customizing OS Boot Image</h2>
! 184: <p>
! 185: If you compile the Prex source with "make" command, the OS boot image is created
! 186: as "prexos" in the root directory. The file "prexos" must exist in root directory
! 187: of the Prex disk. You can test your own Prex image by replacing the "prexos" in
! 188: the floppy image.
! 189: The file "prexos" includes the following files.
! 190: </p>
! 191: <ul>
! 192: <li>Boot loader</li>
! 193: <li>Kernel module</li>
! 194: <li>Driver module</li>
! 195: <li>Boot task(s)</li>
! 196: </ul>
! 197: <p>
! 198: The boot task is a special task which is loaded by kernel directly at boot
! 199: time. You can specify your own boot task(s) in "BOOTTASKS=" option in files.conf
! 200: placed in "/conf/etc" directory.
! 201: </p>
! 202:
! 203:
! 204: </td>
! 205: </tr>
! 206: <tr>
! 207: <td id="footer" colspan="2" style="vertical-align: top;">
! 208: <a href="http://sourceforge.net">
! 209: <img src="http://sourceforge.net/sflogo.php?group_id=132028&type=1"
! 210: alt="SourceForge.net Logo" border="0" height="31" width="88"></a><br>
! 211: Copyright© 2005-2007 Kohsuke Ohtani
! 212: </td>
! 213: </tr>
! 214:
! 215: </tbody>
! 216: </table>
! 217:
! 218: </div>
! 219: <div id="bottom"></div>
! 220:
! 221: </body>
! 222: </html>
CVSweb