netbsd-help: Re: how should I make kernels to have it work under build.sh

Subject: Re: how should I make kernels to have it work under build.sh
To: George Michaelson <ggm@apnic.net>
From: Luke Mewburn <lukem@NetBSD.org>
List: netbsd-help
Date: 11/18/2005 12:33:21
--qoa3+4LHNtB0VmQh
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Fri, Nov 18, 2005 at 10:00:47AM +1000, George Michaelson wrote:
 | > | nice ./build.sh -u -x -M /data/Build/obj -T /data/Build/tools
 | > build \ | > /var/tmp/build.log 2>&1 & tail
 | > -f /var/tmp/build.log | $=20
 | > |=20
 | > | where /usr/src is a RO mount of the src hierarchy
 | > | (from /data/NetBSD/src, which is where I make kernels by hand)
 | >=20
 | > For that matter, I recommend using "distribution" instead of "build",
 | > and I also add "sets" and "sourcesets" as well...
 |=20
 | Can you explain why? build makes a destdir.${ARCH} for me, which I can
 | put in-place via (single user)=20
 |=20
 | (cd /data/Build/obj/usr/src/destdir.${ARCH}; \
 | tar cBpf - . | (cd /; tar --unlink -xBpvf -)
 |=20
 | what does sets/sourcesets give me?
"build" populates DESTDIR with the system binaries.
"distribution" does a "build" then populates DESTDIR/etc (et al).
"sets" creates the installation sets from a "distribution"
in a manner that supports MKUNPRIVED=3Dyes builds. Those sets
can then been installed in single user as root.
"sourcesets" creates the source sets so that I have a copy
of the sources I built the installation with (rather than
guestimating based on source date).
Your build & install mechanism doesn't allow you to build as
non-root (MKUNPRIVED=3Dyes).
Using "build.sh -uU distribution sets" creates the sets
without requiring root privileges.
I use
 build as nonroot:
	nonroot% ./build.sh [...] -u -U distribution sets \
		 kernel=3DMYKERN releasekernel=3DMYKERN
 upgrade as root,=20
	gunzip RELEASEDIR/i386/binary/kernel/netbsd-MYKERN.gz to /
	reboot to single user
	root# pax -zrpe -f /path/to/base.tgz
	root# pax -zrpe -f /path/to/comp.tgz
	root# pax -zrpe -f /path/to/games.tgz
	root# pax -zrpe -f /path/to/man.tgz
	root# pax -zrpe -f /path/to/misc.tgz
	root# pax -zrpe -f /path/to/text.tgz
	root# postinstall -s /path/to/etc.tgz fix
		(verify postinstall looks ok)
	root# reboot
I find this to be a much safer way of upgrading.
I often burn a copy of the kernel, sets and sourcesets
to a CD so I have a "snapshot" of what I installed.
--qoa3+4LHNtB0VmQh
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (NetBSD)
iD8DBQFDfS9hpBhtmn8zJHIRArnsAJwPw/wt9TKOH9INlNZFytVLbXDtJACfeLBy
k0rKlUOdfGQQVkort4w+Tvs=
=J8s+
-----END PGP SIGNATURE-----
--qoa3+4LHNtB0VmQh--

AltStyle によって変換されたページ (->オリジナル) /