Subject: Re: MD/RAMDISK building revisited
To: None <port-macppc@netbsd.org>
From: Tim Kelly <hockey@dialectronics.com>
List: port-macppc
Date: 01/06/2005 08:58:20
On Thu, 6 Jan 2005 22:10:28 +0900
Izumi Tsutsui <tsutsui@ceres.dti.ne.jp> wrote:

> If you are making a custom ramdisk kernel, you can prepare
> a custom Makefile which use your own Makefile.makedev
> rather than src/distrib/common/Makefile.makedev.

Actually, I'm just trying to get the stock distribution ramdisk and MD
kernel to compile, with no changes to the file system. The only changes
are a modified fdisk and kernel.

> > I haven't done build.sh distribution, just tools.
> 
> To build ramdiskbin binary, some installed libraries and header
> files are required. I guess you are using installed binaries on
> your compile host, but it might cause source code mismatch between
> installed libraries and sources used to build ramdisk binary.

I've sync'd -current from 12/31 in both source and installed userland. I
will installing userland got a tad interesting when I ran out of disk
space on / in the middle of installing. None of the /bin binaries would
execute...I ended up reinstalling base.tgz from 2.0RC4 and then
reinstalling (after clearing some space).

> I think that's the reason why Makefile.makedev doesn't use
> ${DESTDIR}/dev/MAKEDEV to create device files.
> It's recommended to prepare full binary sets in DESTDIR, not /.
> (You had been warned if DESTDIR=/ on build.sh build :-)

Ok, I'll look at this more closely. I take it that it won't grab the
binaries from /usr/obj by default?

> > It appeared to me that
> > this would build all ports, when I just want to do macppc.
> 
> build.sh never builds sets for multiple ports at once.
> See src/BUILDING for details:
> ---
>      build         Build the entire NetBSD system.  This orders
>      portions of
>                    the source tree such that prerequisites will be
>                    built in the proper order.

I read "Build the _entire_ NetBSD system" to build all 51 ports...

>      distribution  Do a ``make build'', and then install a full
>      distribution
>                    into DESTDIR, including files in DESTDIR/dev,
>                    DESTDIR/etc, DESTDIR/root and DESTDIR/var.
>  :
>      release       Do a ``make distribution'', build kernels,
>      distribution
>                    media, and install sets (this as per ``make
>                    sets''), and then package the system into a
>                    standard release layout as described by release(7).
>                     This requires that RELEASEDIR be
>                    set (see above).

and by recursion each subsequent step does the same. If this is an
incorrect interpretation, perhaps the language could be changed to
reflect building only the specific port? Congruently, how would one
build all of the ports?

thanks,
tim