Subject: Cross Compile NetBSD Dreamcast
To: None <port-dreamcast@netbsd.org>
From: Tyrel Beede <tb90@mail.csuchico.edu>
List: port-dreamcast
Date: 02/08/2001 22:02:11
I recentlly was able to get a NetBSD kernel cross compiled from an i386
machine to the dreamcast and I noticed a few things along the way which
I would like to address:
1. Downloading and installing the cross-compile utilities was quite
easy, thanks everybody who worked on the NetBSD cross-compile document.
2. I used the build-script(build-sh3.el) which was in the
sys/arch/sh3/conf direcrtory, simply copying it and changing the
MACHINE and MACHINE_ARCH to
MACHINE=dreamcast
MACHINE_ARCH=sh3el
3. I copied the Makefile.sh3 from the sys/arch/sh3/conf directory to
the sys/arch/dreamcast/conf directory and renamed it to
Makefile.dreamcast as the command <config GENERIC> would not run without
the presence of this makefile, I don't know if this was the right step
to take but it did allow me to compile the kernel.
4. After the <config GENERIC> command I attempted to do a <build-script
depend> however this failed because of a loose end. For some reason a
rogue -D was causing problems. Looking to the Makefile I saw that this
-D was corresponding to the code bit -D${TARGET_MACHINE} which seemed
odd because it TARGET_MACHINE was not defined. So I simply added the
line TARGET_MACHINE=dreamcast to the top of the makefile to get it to
work. Everything compiled fine after this.
I'm not sure why exactly the TARGET_MACHINE was not defined but if
anybody with more knowledge would like to contribute/speculate on an
answer it would be nice. Also in the near future I think it would be
nice to have a little document on the dreamcast ports website which
might give a few specifics about getting cross-compile up and working as
the standard cross-compile document was intened to be a little bit more
general. I would be more than happy to write something up about my own
experiances if that would work, as from what I have seen on the mailing
list archives many people are interested in the project. Also, I have
yet to boot this kernel due to a lack of time.
P.S. I am also having some trouble installing the includes and the
librarys as outlined by the cross-building docuemnt. Preforming a
<build-script includes> within the /usr/src directory fails at rpc
because RPCGEN has yet to be defined. Also when I attempt to
<build-script dependall install> within the /usr/src/lib/csu direcorty
it fails and within the /usr/src/lib/ directory it fails as well.
Thanks in advance for any information.
Tyrel