Subject: Re: Building userland sources
To: NetBSD/i386 Port <>
From: Holger Weiss <>
List: port-i386
Date: 07/31/2005 15:48:18
* Scott Crumpler <> [2005-07-30 22:07]:
> I've updated my kernel sources from 2.0 to 2.0.2, and I'd like to also 
> rebuild the userland tools as well.  I used the script to 
> actually build all of the sources and that went fine, but now I want to 
> install them and I can't figure out which options.  When I used the -D 
> option and set the destination directory to /, it warned me that this 
> was only available if I also used the expert option. 
> Would I be safe in installing the updated userland binaries that way?

No, you shouldn't set the destination directory to /.  If building
fails, you might end up with a partly updated system.

Simply follow the examples in src/BUILDING:

| 1.   % ./ tools kernel=GENERIC
|      Build a new toolchain, and use the new toolchain to configure and
|      build a new GENERIC kernel.
| 2.   % ./ -U distribution
|      Using unprivileged mode, build a complete distribution to a DESTDIR
|      directory that selects (and will display).

Instead of those two, you could also use:

% ./ -U distribution kernel

Then, in order to install userland:

| 3.   # ./ -U install=/
|      As root, install to / the distribution that was built by example 2.
|      Even though this is run as root, -U is required so that the permis-
|      sions stored in DESTDIR/METALOG are correctly applied to the files
|      as they're copied to /.

Alternatively, you can build a release (as Andy suggested):

| 4.   % ./ -U -u release
|      Using unprivileged mode, build a complete release to DESTDIR and
|      RELEASEDIR directories that selects (and will display).
|      MKUPDATE=yes (-u) is set to prevent the ``make cleandir'', so that
|      if this is run after example 2, it doesn't need to redo that portion
|      of the release build.

This isn't i386-specific, of course.


PGP fingerprint:  F1F0 9071 8084 A426 DD59  9839 59D3 F3A1 B8B5 D3DE