Difference between revisions of "Build XINU on Windows"
(created HOWTO:Build XINU on Windows XP page following notes by Christopher Swiderski) |
m (added link to Cygwin homepage) |
||
Line 1: | Line 1: | ||
== Preparation == | == Preparation == | ||
− | First, make sure that you have all packages in the "''Devel''" category of [ | + | First, make sure that you have all packages in the "''Devel''" category of [http://www.cygwin.com/ Cygwin] installed on your Windows machine. This will provide a UNIX-like background for performing gcc compilation and allows the use of other UNIX commands (''ie''. <code> cat</code>, <code> hostname</code>, ''etc''). |
Next, you will need to create two directories: <code> /usr/src/build-binutils </code> and <code> /usr/src/build-gcc </code>. | Next, you will need to create two directories: <code> /usr/src/build-binutils </code> and <code> /usr/src/build-gcc </code>. |
Revision as of 22:22, 31 July 2008
Preparation
First, make sure that you have all packages in the "Devel" category of Cygwin installed on your Windows machine. This will provide a UNIX-like background for performing gcc compilation and allows the use of other UNIX commands (ie. cat
, hostname
, etc).
Next, you will need to create two directories: /usr/src/build-binutils
and /usr/src/build-gcc
.
Then, you will want to download the appropriate binary utilities.
We downloaded binutils version
2.17 and saved it in the directory /usr/src/build-binutils
.
Then, download the GNU C Compiler. We downloaded GCC version 4.1.1 and saved it in the directory /usr/src/build-gcc
.
Once these are both downloaded, navigate to their respective directories and untar the tar files.
Build Process
BINUTILS
First, navigate to the directory of the newly untarred files. For us the directory was /usr/src/build-binutils/binutils-2.17
. Once there, run the following commands:
./configure --target=mipsel --prefix=/usr/cross --disable-nls make all install
You will want to add these files to the path with the command:
export PATH=$PATH:/usr/cross/bin
NOTE: you can also add the command to your ~/.bashrc
file to automatically add that directory to PATH
everytime Cygwin is started.
GCC
Again, navigate to the directory of the newly untarred files. For us the directory was /usr/src/build-gcc/gcc-4.1.1
. Once there, run the following commands:
./configure --target=mipsel --prefix=/usr/cross --disable-nls -enable-languages=c --without-headers make all-gcc install-gccRunning on Windows
The previous setup should be sufficient for compiling and running XINU inside of a Cygwin bash shell. However, if you want to run it on regular Windows you will need to prepend the Cygwin paths to the Windows environment because in Windows XP hostname acts differently than hostname under UNIX. We solved this problem by addingC:\cygwin\bin
andC:\cygwin\usr\cross\bin
to the Windows XP environment PATH first, before any other directories. This way, hostname from the Cygwin installation will be the first occurrence of "hostname" when the XINU code tries to execute the command.
This work is supported in part by NSF grant DUE-CCLI-0737476.