|
|||
Prex Home > Document Index > Prex Build Guide | |||
Prex Build GuideVersion 1.4.0, 2007/12/26Table of ContentsGetting Source
You can download the source files at the
download page. Compiling PrexStep 1. Prepare ToolchainThe following packages are required to compile Prex.
Step 2. Unpack SourcesUnpack the sources and move to top level directory of the source tree.$ cd /usr/src $ tar zxvf prex-X.X.X.tar.gz $ cd prex-X.X.X Step 3. ConfigureSetup target architecture and platform. The following sample shows the setting for i386-pc target.$ ./configure --target=i386-pc Step 4. MakeRun make.$ make (Tips)If you want to run 'make' in the subdirectory, you have to set the SRCDIR as follow.$ export SRCDIR=/usr/src/prex-X.X.X Compiling on WindowsCygwin is required to build Prex on Windows environment. Please note that we can not use the default gcc version included in Cygwin. This is because the pre-compiled gcc in Cygwin is built to generate a native Windows binary (PE format). Since Prex supports only ELF file format, you have to prepare the toolchain for i386-elf with the following steps. (Target Platform is i386-pc here.) Step 1. Install CygwinYou can find the latest Cygwin setup program at this site. Download setup.exe and run it. During Cygwin installation, you have to select at least the following packages in addition to the default selection.
Step 2. Unpack ArchivesYou have to download and unpack the following files.$ cd /usr/src $ tar zxvf binitils-2.15.tar.gz $ tar zxvf gcc-core-3.4.3.tar.gz Step 3. Build BinutilsConfigure and build binutils. $ mkdir binutils-2.15-i386-elf $ cd binutils-2.15-i386-elf $ ../binutils-2.15/configure --prefix=/usr/local/i386 --target=i386-elf --disable-nls $ make $ make install You must set the path to this binutils before compiling gcc. $ export PATH=/usr/local/i386/bin:$PATH $ cd /usr/src Step 4. Build gcc$ mkdir gcc-3.4.3-i386-elf $ cd gcc-3.4.3-i386-elf $ ../gcc-3.4.3/configure --prefix=/usr/local/i386 --target=i386-elf \ --with-gnu-as --with-gnu-ld --disable-nls --enable-languages=c --without-headers \ --without-libs --disable-libssp $ make LANGUAGES="c" $ make LANGUAGES="c" install $ cd /usr/src Step 5. Configure Prex and make$ cd prex-X.X.X $ ./configure --target=i386-pc $ make Customizing OS Boot ImageIf you compile the Prex source with "make" command, the OS boot image is created as "prexos" in the root directory. The file "prexos" must exist in root directory of the Prex disk. You can test your own Prex image by replacing the "prexos" in the floppy image. The file "prexos" includes the following files.
The boot task is a special task which is loaded by kernel directly at boot time. You can specify your own boot task(s) in "BOOTTASKS=" option in files.conf placed in "/conf/etc" directory. |
|||
Copyright© 2005-2007 Kohsuke Ohtani |