help-hurd
[Top][All Lists]
Advanced

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

Re: Cross-compile GNU/Hurd?


From: Thomas Schwinge
Subject: Re: Cross-compile GNU/Hurd?
Date: Wed, 4 Jul 2007 16:02:47 +0200
User-agent: Mutt/1.5.11

Hello!

On Thu, Jun 28, 2007 at 02:58:30PM -0700, Vitalie Ciubotaru wrote:
> I am very interested in exploring Hurd. I installed it from a tarball
> and played with it for a while. Might sound like a stupid idea, but I
> would really like to compile "my own" Hurd [that's how I started with
> Linux].
> Specifically, I want to cross-build a minimal Hurd system from Linux,
> then boot into it and build a functional box.

I hope you are aware that this is a lot more than a trivial task.  It is
-- of course -- possible.

> I found Thomas Schwinge's cross-compilation scripts ["cross-gnu" and
> "cross-gnu-env"] -- they are absolutely magnificent.

Thank you!

> Now I have a
> working cross-compile envirenment (cross-binutils, gcc, gnumach
> headers, mig, hurd headers and glibc).

Good.  Sorry that I so far hadn't gotten to answer your email you sent me
privately about that.

> It is functional, because I managed to cross-compile binutils and gcc,
> then bash, bzip, coreutils, diffutils, findutils, gawk, gettext, grep,
> gzip, make, patch, sed and tar. I even tried to run "my" bash and some
> coreutils executables from Hurd and they seem to work ok.
> However, there are a lot of things to be figured out before I can move
> any further.
> 1. Is it generally possible to obtain a working GNU/Hurd, entirely
> cross-compiled from "clean" source [no patches, no weird version
> numbers]?

No.  You need at least patches for glibc.  (At least if you want to use
recent versions of GCC, etc.)  If you want to use file systems larger
then something below 2 GiB you also need to patch the Hurd sources.  A
number of other packages also may need to be patched.


> 2. Is there a good manual about Hurd system internals [like "From
> Power Up to Bash Prompt" for Linux]?

Here is something I compiled some months ago:
<http://nic-nac-project.de/~schwinge/tmp/system-boot-up>, that's for GNU
Mach.  I wouldn't know of a place where the main Hurd system's start-up
would be documented, apart from the source code, of course.


> 3. Anything else I have to know, but can not formulate ...
> Well, yes, I know that it would be much easier to use Debian tools to
> cross-compile Hurd, but that's not for me for at least two reasons:
> 1. I'd need a Debian GNU/Linux system, while all I have is a self-
> compiled GNU/Linux :(
> 2. Cross-compiling it the Debian way actually means replicating Debian
> GNU/Hurd, using Debian tools (apt-get, dpkg, crosshurd etc.) and
> Debian sources (you said apt-get sources, right?). It's not bad at
> all, but I'd really want to study Hurd by recreating it.

This reminds me of something, so I may add my story here.

Some few (two, three or so) years ago, I used to run and use
self-compiled GNU/Linux systems, having started from Linux From Scratch,
advanced to some slashpackage-based layout
(<http://code.dogmap.org/spftools/>) and then had the idea to transform
that software packaging system to run on the Hurd.  I had in mind to
simply replace everything that was Linux-dependend with the Hurd
counterparts, which seemed possible.  I started working on that.  This
was my first contact with the Hurd, apart from having read some bits here
and there.  I didn't want to cross-compile all that, though, so I first
installed a Debian GNU/Hurd system.  The first Debian system I ever
installed.  (I didn't know any Debian-foo at that time, only that Debian
existed.  Now I do know so Debian-foo, thanks to the helpful Debian
people!)  On that system I started compiling my stuff.  Noticed some
strange things, system crashes and the like.  Posted to the bug-hurd
mailing list about that, had some discussions.  This was (I think) my
first intensive contact with GNU people.  However, over the months my
focus shifted from trying to getting all these package compilation done
to begin being interested in working on the Hurd parts themselves, plus
the build tool chain and all that.  Also I became more and more
interested in operating system design in general.  So far I didn't get
back to try porting the software packaging system to support Hurd-based
systems, which was how my Hurd-involvement started, after all.  And even
all my GNU/Linux machines are Debian-based these days.  I never regretted
having done that switch.  But I also don't regret having spent all those
hours (days, weeks, months, ...) on getting complete systems compiled and
running, without using a ``proper'' software distribution.


What do I intend to tell you?  No idea.  Do it your way, but be prepared
that it won't be easy.  You can already learn a lot going the route of
compiling each and every package yourself, but, perhaps, you can even
learn more (or more effectively) by using a running system (Debian
GNU/Hurd) and in there replace bits with your own stuff and concentrate
working on one single package (or a few individual ones).


Regards,
 Thomas

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]