$Id$ Here is a brief run-down of how to build an upgrade file. This will equally well on Linux as on NetBSD. Instructions for building an ISO or a CompactFlash image follow. IN A NUTSHELL 1 Extract sources. 2 Set environment. 3 Build the first time, % ./buildupgrade -s 4 Build the second time, % ./buildupgrade -s -u modules IN DETAIL Initial setup: 1 extract the CUWiN, NetBSD, and other 3rd-party sources that are on the website. 2 create a directory $HOME/scratch-cuw/ (this accumulates all of the build products, like .o's, executable binaries, etc). Build an upgrade file for the first time: An upgrade file is suitable for upgrading a node using the /sbin/upgrade utility, for example, % /sbin/upgrade dyoung@192.168.29.1:staboot-19-Mar-2005.tgz Here are the steps: 0 Set EXTSRC to the 3rd-party sources path. In csh, use setenv EXTSRC . In sh, use export EXTSRC=. 1 Change directory to boot-image/ under the CUWiN source directory, and type % ./buildupgrade -s This will build the whole NetBSD system, the CUWiN sources, and 3rd-party programs. Then it will put the whole system into a file called, for example, staboot-19-Mar-2005.tgz. The first tie, expect for the whole process to take hours. (It takes just a few minutes the second time, I promise!) Build an updated upgrade file: 0 Set EXTSRC, as above. 1 Change directory to boot-image/ under the CUWiN source directory. List the build stages by typing % ./buildupgrade -s -L tools kernelenv toolenv distrib mediaenv makewrapperenv flash-kernel metalog makewrapper mv-root-home modules cuwinize-metalog install patch extras users postinstallenv upgrade 2 Consult this guide to choose the right stage to start the build: If you added a user account or an authorized_keys file, restart at 'users'. If you updated your entire NetBSD sources, restart at 'tools'. *** If you modified the sources for a NetBSD *** app/daemon/utility, restart at 'distrib'. The 'distrib' *** stage is the slowest by far. *** If you made modified the kernel sources, *** or you changed the kernel configuration in *** boot-image/kernel-conf/cuw_45x1, restart at *** 'flash-kernel'. This stage is second-slowest of all. If you added a file to boot-image/extras/, restart at 'extras'. If you added/modified a file under boot-image/etc-patches/, restart at 'patch'. *** If you changed the CUWiN sources or 3rd-party sources, *** restart at 'modules'. This is the most common case, *** by far! 3 Start building at the stage you selected in step #2, by typing % ./buildupgrade -s To build more quickly, use -u to skip the 'make clean' step. That is, type % ./buildupgrade -s -u To run in "fast and loose" mode, use -u -o to skip both the 'make obj' and 'make clean' steps. That is, type % ./buildupgrade -s -u -o *** Make sure you understand 'make obj' before you use -o. *** The risks of skipping 'make obj' are outside the scope of *** this document. Building an ISO As above, but use buildiso instead of buildupgrade. buildiso will create a file with extension .iso. Building a CompactFlash image As above, but use buildflash instead of buildupgrade, and specify a flash geometry with -T. The standard geometries are in disktab.d/mbr. You can specify an alternate geometries file with -t. buildflash will create a file with extension .img. $Id$