[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Trying hurd

Roland McGrath wrote:

 > Yes, but setting up a cross-compilation environment is not worth the
 > trouble, as Marcus told me earlier and yet I decided to discover it from
 > experience :) On the other hand, recompiling GNUMach under the Hurd is
 > pretty easy.

 That is true.  However, for the case of gnumach ONLY, it will probably work
 fine to build with plain native Linux/x86 (ELF) tools.

Actually it's quite easy and very useful if for some reason you cannon
boot gnumach and need to recompile it with different drivers. Since both
Hurd and Linux use the same binary format (ELF) and are both i386 (at
least in most cases) the you can use the native Linux gcc and binutils
with a few wrapper scripts. These are available from the gcc-i386-gnu
package from debian potato.  You also need the following packages from
the hurd archive:
gnumach-dev 	(headers)
libc0.2         (shared libraries)
libc0.2-dev     (more headers)
hurd-dev        (still more headers)

After you install gcc-i386-gnu you just have to go
/usr/lib/gcc-lib/i386-gnu/<your gcc version>/ and tinker with the
symlinks to make sure they are pointing to the right place. (BTW using
gcc-2.9+ might be problematic).  Then to compile gnumach unpack the
source, mount your hurd partition (lets say /gnu), go to the source
directory and do the following:
export PATH=/usr/i386-gnu/bin:$PATH
./configure --{your driver options} --prefix=/gnu i386-gnu
make install

This should work rather well for an i386-gnu linux system. It takes a
bit more work if you want to cross compile gnumach from other types of
systems but is still possible. The trouble in setting up a cross compile
environment is much more pronounced when trying to compile libc or hurd

I hopes this actually helps someone.

On another note, i've finally overcome some hardware problems that i had
and have been able to install hurd on my system (yoo hoo!), so for now
i'm leaving my cross compilation efforts aside and moving on to creating
a development environment under the hurd.  

Also any progress on PnP or custom (IO, IRQ, MEM) configuration for
devices? (i have an NE2000 PnP card with no jumpers which isn't being


Reply to: