Subject: Re: Porting NetBSD to a different ARM platform
To: John Clark <jclark@teamasa.com>
From: Ben Harris <bjh21@netbsd.org>
List: port-arm32
Date: 05/01/2001 23:32:20
On Tue, 1 May 2001, John Clark wrote:
> Ben Harris wrote:
>
> > In article <4.3.2.7.2.20010430174803.00b91988@mail.larwe.com> you write:
> > >I'm currently developing with arm-elf-gcc under Cygwin (so yes I have CVS).
> > >Would it be easier to work under x86 Linux (I don't want to try to install
> > >NetBSD on my main dev machine unless I absolutely have to)?
> >
> > For building the kernel, I suspect either will work, but Linux is likely to
> > be slightly easier, since it's rather more Unix-like. You basically need
> > the NetBSD make(1) and config(8), both of which should build on any POSIX
> > system, and the GNU toolchain. For building kernels, the unmodified GNU
> > tools targetted on arm-unknown-elf should work correctly (that being the
> > toolchain NetBSD/arm26 used for a long time).
>
> About a month ago I tried this on a redhat linux distribution and got
> a number of 'missing this, missing that' errors, and did some amount
> of fix ups to fill in those blanks. Unfortunately time at the moment
> does not permit me to continue, but it is not exactly unbundle
> the standard base set of sources and 'make world', even with bsdmake...
That was why I only mentioned building the kernel. Building userland on a
non-BSD system is tricky. Currently, it's not even possible to compile a
NetBSD-current userland on NetBSD 1.5 without replacing several tools with
newer versions.
> For example a list of missing items:
>
> ls -l /usr/dev*/arm/cross/bin
> total 176
> -rwxrwxr-x 1 root root 136249 Apr 1 04:36 bmake
> -rwxr-xr-x 1 root root 5626 Apr 1 06:45 install
> -rwxr-xr-x 1 root root 5626 Apr 1 06:45 install-sh
> -rwxrwxr-x 1 root root 19027 Apr 1 06:41 mtree
> lrwxrwxrwx 1 root root 14 Apr 1 08:00 yacc -> /usr/bin/bison
Any useful GNU/Linux system should have GNU install (part of Shellutils,
ISTR) and GNU Bison symlinked to yacc. mtree isn't necessary for building
the kernel (or make or config).
> The include directory is a compile till crash collection of include
> files which are required.
Not for the kernel. It gets the necessary files directly from sys/sys and
arch/include.
> If of course there is some niffty way to do this, I'd be interested....
Not for the userland. Luckily, it shouldn't need any changes for a new
port on a supported CPU, so you should be able to get away with using a
binary snapshot.
Actually, I have a feeling Zoularis works on Linux now, but I've not
looked into it in any detail.
--
Ben Harris <bjh21@netbsd.org>
Portmaster, NetBSD/arm26 <URL:http://www.netbsd.org/Ports/arm26/>