Wednesday, July 11, 2012

NetBSD quick update guide

Since I always tend to forget and the documentation on the website is a bit incomplete, I sum up the procedure I use to update from source the kernel and userland:

Update /usr with cvs, create /usr/obj and /usr/tools (or clean its content).

As per documentation, build the tools. Inside /usr/src:
$ ./build.sh -O /usr/obj -T /usr/tools -U -u tools
Now build the kernel:
$ cd /usr/src
$ ./build.sh -O ../obj -T ../tools kernel=
Install it:
# mv /netbsd /netbsd.old
# mv /usr/obj/sys/arch/i386/compile//netbsd /
And now, important, build and install the modules:

# ./build.sh -O /usr/obj -T /usr/tools -U -u modules installmodules=/

Reboot and check that the kernel works. Then build and install userland:
$ ./build.sh -O ../obj -T ../tools -U -x distribution
# ./build.sh -O ../obj -T ../tools -U -u -x install=/ 
 Cross your fingers and happy BSD!

No comments: