[CUWiN-Dev] Setting Up UML Image

David Young dyoung at pobox.com
Sat Mar 19 18:24:06 CST 2005


On Sat, Mar 19, 2005 at 09:32:09AM -0600, Quantum Scientific wrote:
> I suggest it would be helpful to others if instructions for this were 
> published (don't ask me), so volunteers wouldn't waste days struggling with 

It would be nice if there were instructions published.  We need some help
to write, edit, and verify the instructions.  Here is a brief run-down
of how to build an upgrade file.  Bryan tells me that last time he tried,
this works equally well on Linux as on NetBSD.

IN A NUTSHELL

        1 Extract sources.

        2 Set environment.

        3 Build the first time,

          % ./buildupgrade -s <netbsd source directory>

        4 Build the second time,

          % ./buildupgrade -s <netbsd source directory> -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 at 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 <path>.  In sh, use export EXTSRC=<path>.

        1 Change directory to boot-image/ under the CUWiN source
          directory, and type

          % ./buildupgrade -s <path to NetBSD sources>

          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 <path to NetBSD sources> -L
          tools
          toolenv
          makewrapperenv
          distrib
          metalog
          patch
          makewrapper
          mv-root-home
          flash-kernel
          extras
          users
          modules
          cuwinize-metalog
          install
          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 <path to NetBSD sources> <stage>

          To build more quickly, use -u to skip the 'make clean' step.
          That is, type

          % ./buildupgrade -s <path to NetBSD sources> -u <stage>

          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 <path to NetBSD sources> -u -o <stage>

          *** Make sure you understand 'make obj' before you use -o.
          *** The risks of skipping 'make obj' are outside the scope of
          *** this document.

Dave

-- 
David Young             OJC Technologies
dyoung at ojctech.com      Urbana, IL * (217) 278-3933


More information about the CU-Wireless-Dev mailing list