Page 3 of 3

Re:Where to start ?

Posted: Mon Jan 02, 2006 1:11 pm
by Candy
Might I advise building a cross-compiler?

(would that advice be called candybot or solarbot? ;))

Re:Where to start ?

Posted: Mon Jan 02, 2006 1:14 pm
by Phugoid
You really need to create a cross-compiler for kernel development, as you are producing code which does not run in an environment hosted by an OS (as your current compiler assumes).

Try following this:
http://www.osdev.org/osfaq2/index.php/GCC%20Cross-Compiler

I don't think you have download specifically that version of GCC or binutils - try a more recent one. You can also choose another target instead of ELF, what is important is that during configuration you supply all the options that tell GCC to forget standard headers and libraries.

Re:Where to start ?

Posted: Mon Jan 02, 2006 2:11 pm
by jason7007
Hi,
I am using gcc-core ver. 3.4.4-1. And also downloaded the make, flex, bison from ftp://cygwin.dp.ua.

Then ran the batch file build.bat in Cygwin but still the same
problems.

Thank you anyway.

Re:Where to start ?

Posted: Mon Jan 02, 2006 2:31 pm
by Phugoid
Did you download and build from source code? It seems that you have simply downloaded another copy of the tools you already have. What you need to do is download the source code for the tools, and create slightly different versions from it (as explained in the FAQ).

You will need to do this for binutils and gcc:
http://ftp.gnu.org/gnu/binutils/
http://ftp.gnu.org/gnu/gcc/gcc-4.0.2/

Re:Where to start ?

Posted: Mon Jan 02, 2006 2:36 pm
by jason7007
Hi,
This getting very complicated, I am a newbie and not a Unix/Linux guy.

For now I just admit I am defeated using Cygwin and gonna go back to use DJGPP for DOS.

Thank you so much.

Re:Where to start ?

Posted: Mon Jan 02, 2006 3:29 pm
by Phugoid
I think most people here are not Unix/Linux guys and I certainly am not. To build the cross-compiler you need, you are only required to download and extract the binutils and gcc sources, and then enter the commands given in "Step 1 - Bootstrap" in the FAQ at a bash shell, which is the default for Cygwin. You may need to make slight modifications for different path names, at most.

To invoke the new tools when you are done, you issue commands like /usr/cross/bin/i386-elf-gcc, depending of course on the actual path to your binaries, the target you chose (i386-elf in this case) and the tool (gcc, ld, objdump, etc). You can also set up an environment variable, but that is not necessary at this point.

Re:Where to start ?

Posted: Mon Jan 02, 2006 4:52 pm
by kataklinger
Or you can start using MS tools :)