Subject: Re: Building NetBSD
To: Mark Weinem <mark.weinem@alumni.uni-due.de>
From: Adam Hamsik <haaaad@gmail.com>
List: netbsd-users
Date: 10/30/2007 09:13:45
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Oct,Tuesday 30 2007, at 5:10 AM, Mark Weinem wrote:
> Hello,
>
> Unfortunately, the documented instructions to build NetBSD are not
> coherent:
>
> The procedure from "Updating a stable NetBSD release"
>
> $ cd /usr/src
> $ ./build.sh -O ../obj -T ../tools kernel=<KERNEL>
> $ ./build.sh -U distribution
> $ su ...
> # mv /netbsd /netbsd.old
> # mv /usr/src/sys/arch/<ARCH>/compile/<KERNEL>/netbsd /
> # shutdown -r now ...
> $ cd /usr/src
> $ su
> # ./build.sh -O ../obj -T ../tools -U install=/
>
> (http://netbsd.org/docs/updating.html#summary)
>
> * re-building the toolchain is not mentioned in the summary
>
toolchain is built automatically no need to run build.sh tools
> * building the kernel before the userland
I don't see any difference here usually I build distribution and
after that kernel. If anything goes wrong I will not update my server.
> * running etcupdate(8) is missing
>
I update my netbsd servers this way. + postinstall and etcupdate.
>
> The procedure from "Tracking NetBSD-current":
>
> $ cd /usr/src
> $ ./build.sh -O ../obj -T ../tools -U -u tools
> $ ./build.sh -O ../obj -T ../tools -U -u distribution
> $ ./build.sh -O ../obj -T ../tools -U -u kernel=GENERIC
> $ cd ../obj/sys/arch/<ARCH>/compile/GENERIC
> $ su ...
> # mv /netbsd /netbsd.old
> # cp netbsd /netbsd
> # shutdown -r now
> $ cd /usr/src
> $ su
> # ./build.sh -O ../obj -T ../tools -U install=/
> # /usr/src/usr.sbin/postinstall/postinstall -s /usr/src -d // fix
> # /usr/sbin/etcupdate -s /usr/src
>
> (http://netbsd.org/docs/current/#updating)
>
> * building the userland before the kernel!
>
> * any reason to run "/usr/src/usr.sbin/postinstall/postinstall"
> instead of
> "/usr/sbin/postinstall"?
>
> * running postinstall(8) manually - is this still necessary, as
> etcupdate(8) runs postinstall too?
>
>
> The documents src/BUILDING and src/UPDATING don't provide complete
> procedures. src/UPDATING states:
>
> Build a new kernel first:
> This makes sure that any new system calls or features
> expected by the new userland will be present. This
> helps to avoid critical errors when upgrading.
>
> What is meant here, running "./build.sh ... kernel" before "./
> build.sh ... distribution" or installing the new kernel before
> installing the new userland?
>
> So what's the "correct" procedure (or the recommended practice)?
> And should this be documented in src/BUILDING and src/UPDATING?
>
Regards
Adam.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iD8DBQFHJue5lIxPgX3Go0MRAjJOAJoDF9WBKBAeeMIbe68ib0cnt6FFVgCdGVnV
AL9eGrr1VV0fdPqEYa6rYR8=
=MpZt
-----END PGP SIGNATURE-----