Thanks,
I am now up and running, both w. Brian's kernel and GeekOs!
Sebastian
Here is how to do it:
-On Mac, build cross-compiler & binutils (there are some detailed guidelines on the web that describe this for an 'avr toolchain'):
target=i386-pc-elf, prefix=/usr/local/elf
-During building gcc, you probably get an error around 'libssp'. In that case add the following option during the configure step --disable-libssp and build again.
-Another option is to use Darwinports and download the whole preconfigured source using their CVS (search for i386-elf-gcc on their site).
-Once you have the cross compiler built, and added its prefix to your PATH (add /usr/local/elf/bin to PATH), you are set to go. Note that as you don't have appropriate runtime libraries etc. you will not (yet) be able to compile 'standard' c-programs for this target, but as you are building your own kernel, this is o.k. (see discussion in this thread).
-Now you have a working linker (i386-pc-elf-ld) which actually has the option of using a linker script (the ld that ships w. Xcode on Mac is an adapted version....).
-To build GeekOs, you only need to go in the make file and change the tool prefix:
Code:
# ----------------------------------------------------------------------
# Tools -
# This section defines programs that are used to build GeekOS.
# ----------------------------------------------------------------------
# Uncomment if cross compiling
#TARGET_CC_PREFIX := i386-elf-
to
Code:
# ----------------------------------------------------------------------
# Tools -
# This section defines programs that are used to build GeekOS.
# ----------------------------------------------------------------------
# Uncomment if cross compiling
TARGET_CC_PREFIX := i386-pc-elf-
Now make will use your cross-compiler and linker.
-Then get Qemu installed on your Mac
-Set up a standard PC (don't select a large RAM, GeekOs can not deal with that, 8MB is fine, 128MB will crash the kernel)
-Run - and add the code as you go from project to project...
Hope that helps!