Subject: Re: NetBSD/alpha installboot
To: Ray Phillips <r.phillips@mailbox.uq.edu.au>
From: None <mcmahill@mtl.mit.edu>
List: port-i386
Date: 07/31/2001 06:21:45
On Tue, 31 Jul 2001, Ray Phillips wrote:

> >> I want to make an image on a NetBSD/i386 machine for a CD which will boot
> >> an Alpha, so I need to build the NetBSD/alpha version of installboot.  I've
> >> extracted these two files
> 
> Thanks for replying Manuel and Dan.
> 
> Yes, it turned out that I needed more of the source tree from syssrc.tgz --
> both usr/src/sys/arch/alpha/include and usr/src/sys/arch/alpha/stand.  It
> was also necessary to use /usr/bin/make instead of Gnu make version 3.79.1
> which is what I was doing yesterday :(  I'd installed it in
> /usr/local/bin/make and hadn't encountered problems using it previously.
> Running make from within usr/src/sys/arch/alpha/stand/installboot was
> enough to build just installboot.
> 
> This raises two points:
> 
> 1) Which version of make comes with NetBSD 1.5 and how does it differ from Gnu
>    make?

NetBSD uses a make which is a BSD make.  Some of the differenced from GNU
make include the processing of lines like:

.include <bsd.prog.mk>

which is what your error was from.  This line included the file
/usr/share/mk/bsd.prog.mk.  With GNU make the syntax would have been
slightly different.  Other differences are in some of the wildcard
expansions.  You will want to install GNU make as 'gmake' so you can be
sure of getting the right one.

> 
> 2) (Sorry about this one, it's going to reveal a big gap in my knowldege of C.)
>    I tried running running /usr/bin/make from within
>    usr/src/sys/arch/alpha/stand/installboot with just the
>    usr/src/sys/arch/alpha/stand part of the source tree which resulted in:
> 
> % make
> cc -O2  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
> -Wno-unin
> itialized -Werror
> -I/usr/home/ray/installers/NetBSD/1.5/i386/1/usr/src/sys/arc
> h/alpha/stand/installboot/../.. -c installboot.c
> installboot.c:65: include/disklabel.h: No such file or directory
> *** Error code 1
> 
> Stop.
> 
>   Line 65 of installboot.c is
> 
>     #include <include/disklabel.h>  /* defeat <machine/disklabel.h>, force
> alpha */
> 
>   which apparently tells the C compiler to ignore the three disklabel.h files
>   present under /usr/include, viz.
> 
>     /usr/include/dev/sun/disklabel.h
>     /usr/include/sys/disklabel.h
>     /usr/include/i386/disklabel.h
>
>   Does that #include statement tell the preprocessor to move upwards from
>   the current directory until you come to a directory containing a directory
>   named 'include' which contains the file 'disklabel.h'?  How would that
>   compare to the line
> 
>     #include <disklabel.h>

this is different.  This line would say 'look for the file called
disklabel.h in each directory in the include path so it would look for

/usr/include/disklabel.h
/usr/home/ray/installers/NetBSD/1.5/i386/1/usr/src/sys/arch/alpha/stand/installboot/../../disklabel.h

and would find neither.

the line

#include <include/disklabel.h>

will look for 


/usr/include/include/disklabel.h
and
/usr/home/ray/installers/NetBSD/1.5/i386/1/usr/src/sys/arch/alpha/stand/installboot/../../include/disklabel.h


-dan