Subject: Re: Getting Started
To: None <port-dreamcast@netbsd.org>
From: Tyrel Beede <tb90@mail.csuchico.edu>
List: port-dreamcast
Date: 02/11/2001 23:54:38
Tyrel Beede wrote:

> Well, as it turns out I'm in the same boat as you and I just got over a
> few annoying problems along the way.
>
> 1.   The best source of docuementation is going to be the netbsd cross
> compile document located at www.netbsd.org/Documentation/cross - make
> sure you get the 'D' and not 'd'
>
> 2.   The most current source code is available via cvs through the
> anoncvs.netbsd.org server.  See the www.netbsd.org/Documentation/current
> for information about setting up cvs and starting to track
> netbsd-current as this branch is the super state of flux.
>
> 3.   If you are going to build a netbsd-current you will need to have
> the latest version of the tools such as the config program( which gave
> me problems ) what I did is simply d/l a snapshot( a compiled netbsd
> dist in the release(7) format) and I installed this onto my host system
> which will be preforming all the cross-builds.  This means that I've go
> the updated config program but you don't have to do it this way, I just
> did it so I would know for sure that I had all the latest tools and
> such.
>
> 4.   Getting cross compile toolchain support:
>
>         a.  using the netbsd package system will give you access to a
> cross-compile enviroment.  However first of all you need to d/l and
> install the pkgsrc.tar file( from:
> ftp.netbsd.org/pub/NetBSD/packages/pkgsrc.tar.gz )  It should be
> installed under the /usr directory.  Next within the
> /usr/pkgsrc/cross/shel-netbsdcoff direcorty you can type make ; make
> install to have the package and dependancies d/l and installed into the
> /usr/pkg/cross/bin directory which you will need to add to your path
> file.  This will give you the ability to get a cross-compile enviroement
> up and running, however, this will produce binaries in coff format( i'm
> not sure if it is ECOFF or just coff or what)
>
>        b.  you can build your own tool change if you want to get elf
> binary support but this is a bit harder and it is what I'm currently
> working on, I'm going to post another short question regarding the
> potential benifits of this and how/why to get it working, Andrew as it
> up and working, however, he ran into a few issues which you might want
> to keep in mind, the relevant messages are in the list archives.  See
> gcc.gnu.org for more details about building cross compilers yourself.
> Also as we speak I'm waiting for a compile to finish to see if NetBSD
> will do most of the work for me to get an elf binary toolchain up and
> running, what I did was change a few variables in the
> /usr/pkg/cross/shel-netbsdcoff/Makefile.  Everywhere it said coff
> I changed to elf and I'm hoping that might work but I might also be just
> plain off the right page.
>
> Now you should have most of the right ideas in place and if you follow
> the netbsd cross-build doc you should be able to bang it out.  Also as
> just a little note the build-script that they talk about in the
> cross-build doc can be found in the /usr/src/sys/arch/sh3 direcoty.  You
> want the one which says 'el' at the end of it becasue the dreamcast is a
> little endian machine.
>
> Tyrel