*BSD News Article 85656


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!newsfeed.direct.ca!nntp.portal.ca!cynic.portal.ca!not-for-mail
From: cjs@cynic.portal.ca (Curt Sampson)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Re: Look for info about porting NetBSD
Date: 25 Dec 1996 16:08:13 -0800
Organization: Internet Portal Services, Inc.
Lines: 56
Message-ID: <59sfld$fe2@cynic.portal.ca>
References: <59po3v$oqn@lynx.unm.edu>
NNTP-Posting-Host: cynic.portal.ca
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.netbsd.misc:5030

In article <59po3v$oqn@lynx.unm.edu>,
Ales Vaclav Hvezda <ahvezda@illusion.eece.unm.edu> wrote:

>	I'm in the process of evaluating whether or not I want to port
>NetBSD to a new 68k ('40 actually) board...

You'll probably find it worthwhile joining port-m68k and discussing
this there. (See <http://www.netbsd.org> for more information on
the mailing lists.)

>Does anybody have any suggestions on any other
>information that might be of use: such as cross compilation enviroments
>from either an existing/running NetBSD system or a non-NetBSD system.

I believe you can native-compile from any NetBSD/m68k system
excepting HP (which uses a different page size). The userland is
the same (aside from a few MD programs for doing things like ejecting
floppy disks) across all NetBSD/m68k platforms. So if you've got
a Sun 3 or an Amiga or any of a number of other systems around,
you're set.

Cross-compiling from gcc 2.7.2 (and probably 2.7.2.1, though I've
not tested it) and binutils-2.7 works just fine, but with two
caveats. First, you can't compile dynamically linked programs.
(This is obviously not a problem when you're just doing kernel
work, and that should be about all you have to do for your platform,
since you can probably use pre-built binaries for the userland
stuff.) Second, you need to apply some patches to binutils-2.7.
These patches are available from my web page at <http://www2.portal.ca/~cjs>.

You could also pull the toolchain out of the NetBSD source tree
and use that, if you feel up to it. I've not tried it.

In the long term, I'm hoping we can bring NetBSD's a.out dynamic
link stuff into gnu binutils, so that we can just use the standard
binutils in NetBSD (we already use the standard gcc for most ports.)

>	I'm also curious as to what tools are used to build a NetBSD kernel. 

Generally the Gnu tools, although I would suppose someone could
use others when bootstrapping.

>This code uses Motorola's assem. syntax and I was under the assumption that
>gas was used in the build.  I thought I understood that gas prefers
>AT&T syntax.  So how does NetBSD build the .s files?

Sorry, I can't help you with this one, as I don't do much assembler
work. However, you might have a look at the sun3 locore.s; that
one definitely uses gas to assemble, and I've compiled sun3 kernels
with the slightly patched gcc/binutils I describe above.

cjs
-- 
Curt Sampson    cjs@portal.ca		Info at http://www.portal.ca/
Internet Portal Services, Inc.	
Vancouver, BC   (604) 257-9400		De gustibus, aut bene aut nihil.