views:

79

answers:

4

Hi i downloaded souce for unix version 6, i want to study it and test it. I am running Snow Leopard on a macbook pro. 1)Is there a way to compile it in mac. If i comile using make or gmake i am getting the following error.

*** Error: Couldn't find an i386-*-elf version of GCC/binutils.
*** Is the directory with i386-jos-elf-gcc in your PATH?
*** If your i386-*-elf toolchain is installed with a command
*** prefix other than 'i386-jos-elf-', set your GCCPREFIX
*** environment variable to that prefix and run 'make' again.
*** To turn off this error, run 'gmake GCCPREFIX= ...'.

2)I also want to run it in a virtual machine,I have VMWare installed on my machine. I don't know how to do that.

A: 

The build system you are using seems to require an ELF tool chain (used by Linux).

You could try to figure out if that can be changed, but since you have VMWare, try to compile it under a virtualized Linux (minimal Debian is quite light-weight).

Thilo
+1  A: 

You might look into macports.org. It has several packages that look useful, notably "i386-elf-binutils". It installs into /opt/local/*, so you may need to make sure /opt/local/bin/ is in your path. (Although I believe it takes care of that by default.)

EDIT: Or maybe not. After a little more research, I wonder if these instructions and downloads are what you're looking for.

EDIT again: Corrected the download link. Sorry about that!

Jander
I installed i386-elf-binutils using macports but still it is giving me error.*** Error: Couldn't find an i386-*-elf version of GCC/binutils.*** Is the directory with i386-jos-elf-gcc in your PATH?*** If your i386-*-elf toolchain is installed with a command*** prefix other than 'i386-jos-elf-', set your GCCPREFIX*** environment variable to that prefix and run 'make' again.*** To turn off this error, run 'gmake GCCPREFIX= ...'.
Julius Canute
A: 

Download tarballs for gcc and binutils, expand them, then:

$ cd binutils-2.15
$ ./configure --target=i386-jos-elf
$ make
$ make install
$ cd ../gcc-3.4.1
$ ./configure --target=i386-jos-elf
$ make
$ make install

You will of course need to update the paths. (I got these instructions from MIT's OpenCourseWare.)

You'll have to go through the process of creating a new virtual machine and formatting and installing the OS onto its disk. I've used VirtualBox with some success, but I have no experience with VMWare; you're on your own there.

Jeremy W. Sherman
A: 

As an alternative you may compile bournesh on Mac OS X.

http://freshmeat.net/projects/bournesh/

dro