Subject: Re: Cross-compiling ramdisk
To: Markus Mayer <mmayer@redback.com>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-toolchain
Date: 03/10/2006 00:26:15
On Thu, 9 Mar 2006, Markus Mayer wrote:
> I was wondering if NetBSD supports cross-compiling a mini-root/ramdisk based 
> kernel.

I recommend trying NetBSD 3.0 or -current sources.


> echo "int _crunched_sh_stub(int argc, char **argv, char **envp){return 
> main(argc,argv,envp);}" >sh_stub.c
> /tools/swdev/bin/powerpc-netbsdelf-gcc-1.5.3 -O -g -Werror   -nostdinc 
> -idirafter /home/mmayer/pkt/generic-powerpc/usr/include -c sh_stub.c
> /tools/swdev/bin/powerpc-netbsdelf-gcc-1.5.3 -O -g -Werror   -nostdinc 
> -idirafter /home/mmayer/pkt/generic-powerpc/usr/include -c 
> /home/mmayer/pkt/sw/netbsd153/usr/src/distrib/macppc/floppies/ramdisk/../../../../bin/sh/echo.c
> /home/mmayer/pkt/sw/netbsd153/usr/src/distrib/macppc/floppies/ramdisk/../../../../bin/sh/echo.c:47: 
> bltin.h: No such file or directory

There's a bltin.h in src/bin/sh/bltin, no idea what the right way to 
include that is. maybe some cheapish -I${.CURDIR}/bltin in the 
sh/Makefile?


> The question I have right now is, is this supposed to work or am I trying 
> something that either nobody has ever tried or that is even known to be 
> unsupported / not-working?

I recommend using NetBSD 2.0 or up (latest NetBSD release is 3.0; 
crosscompiling is supported from 2.0).


  - Hubert