Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Oct 2010 13:01:03 +0200
From:      Robert Millan <rmh@debian.org>
To:        imp@bsdimp.com
Cc:        freebsd-mips@freebsd.org
Subject:   building kernel of FreeBSD on GNU systems
Message-ID:  <AANLkTin_btL8gWgeBxg-v-VX7VGEDe7McYFEO6c9S4AW@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi!

Browing the FreeBSD/mips wiki I noticed a TODO item
about building the kernel of FreeBSD on "Linux".

Notice that the Debian GNU/kFreeBSD project has already
made a lot of work on building kFreeBSD with GNU userland.
It is still not GNU/Linux, but very close, so much of this can be
reused.

Here's a rough summary:

  - Much of the code assumes __FreeBSD__ is defined, we
    use a sed rule to hack around that. See:
    http://svn.debian.org/viewsvn/glibc-bsd/trunk/kfreebsd-8/debian/rules
    perhaps this can be turned into a mergeable patch?  E.g. by renaming
    the macro to something defined in kernel headers.  Note: defining
    __FreeBSD__ on non-FreeBSD systems breaks stuff (like stddef.h),
    that's why we don't do it.

  - A few patches in kernel source itself, see:
    http://svn.debian.org/viewsvn/glibc-bsd/trunk/kfreebsd-8/debian/patches/
    I think you need at least 013_ip_packed.diff, 003_glibc_dev_aicasm.diff
    008_config.diff and 004_xargs.diff

  - Our port of FreeBSD build utilities (make and others):
    http://svn.debian.org/viewsvn/glibc-bsd/trunk/freebsd-buildutils/debian/patches/

  - Which depends on libbsd, available at freedesktop:
    http://libbsd.freedesktop.org/wiki/

  - libsbuf. On Debian GNU/kFreeBSD we only ported it to GNU, but there's
    a version that works on GNU/Linux at
http://sourceforge.net/projects/libsbuf/.
    I haven't tested it.

I hope this is useful to you.  Also, if you can merge some of those changes
in official FreeBSD source, this would make life easier to Debian GNU/kFreeBSD
developers.

Feel free to forward this message to whomever it may concern.

-- 
Robert Millan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTin_btL8gWgeBxg-v-VX7VGEDe7McYFEO6c9S4AW>