From owner-freebsd-mips@FreeBSD.ORG Tue Oct 12 11:24:47 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 968D4106564A for ; Tue, 12 Oct 2010 11:24:47 +0000 (UTC) (envelope-from rmh.aybabtu@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5F7118FC14 for ; Tue, 12 Oct 2010 11:24:47 +0000 (UTC) Received: by iwn8 with SMTP id 8so6070767iwn.13 for ; Tue, 12 Oct 2010 04:24:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=gJK3DtfM2PKtgzSp99fMraHv3ZkAzSpY/tKOhQ98hSI=; b=CwxcsEHT7TAruQd4ceSnnvKRAYW7HmGI1KMTthvjrOcaucvR/rWpPTmBUKGaz9lMb/ A84C9jBmYyCN0zUe+242dywqnyTrvXTxFwGm8/+yFEDKpuyDsDY5hMi4bxeEeKk6SHQ9 pQMA9EUdYvBZh6poA124LKlOK4UWzNxeVAejo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; b=k0MDTtIbhx4tpPk/Q68uJ6UziWbIzSXP4Wor8TRAGWGtZRhWv5ZPAHo3vY8R0FAVM6 U9S8wsmf24P7JhUHQ2K2DeB8KRXytUo0XCa2DEOx4GDNQglubmQ6RRGdEmt6mJcvDId2 H5/Qeyi+9tE3xdw+pZ4zLS09xaK5ASOlMhx3Q= MIME-Version: 1.0 Received: by 10.231.171.18 with SMTP id f18mr5618141ibz.9.1286881263380; Tue, 12 Oct 2010 04:01:03 -0700 (PDT) Sender: rmh.aybabtu@gmail.com Received: by 10.231.179.142 with HTTP; Tue, 12 Oct 2010 04:01:03 -0700 (PDT) Date: Tue, 12 Oct 2010 13:01:03 +0200 X-Google-Sender-Auth: mG7ib2YCJlx6xc5h_DP6BOirG2I Message-ID: From: Robert Millan To: imp@bsdimp.com Content-Type: text/plain; charset=UTF-8 Cc: freebsd-mips@freebsd.org Subject: building kernel of FreeBSD on GNU systems X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2010 11:24:47 -0000 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