Building a Ppbus Kernel

Using code directly from CVS | Using the tarball in a file release | Using the diff in a file release | Using ISA PnP and atppc | Common Steps in Building

The code is being developed against NetBSD-current: you should know how to track NetBSD's kernel development at least in terms of having the kernel sources (more details are available on

It will probably be a good idea to apply diffs/tarball or checkout code into an empty directory in case the code is not in sync with the latest NetBSD-current source and you need to apply patches by hand. You can try to minimize this trouble by getting NetBSD-current sources that would match the date of the file release.

Using code directly from CVS

You can checkout or export code from the CVS repository into an empty directory or even directly into the kernel source tree (this will probably overwrite files that may need to be patched). Once you have the files, you can remove the TODO's (files that contain development activity lists and do not have anything to do with compilation), apply any patches, and copy them (if necessary) to the kernel source directory.

If you want to do this directly into the kernel source tree, an export is probably a better idea than a checkout (otherwise CVS files may not agree and you may have problems).

Using the tarball in a file release

  1. Change to the directory containing the NetBSD-current src directory. For example, in a stock NetBSD-current system, this would be /usr, because this directory contains src (/usr/src exists and contains sys, share and the other top-level source directories).
  2. Extract the files in the tarball. Files are stored relative to the top-level directories, for example src/sys/dev/ppbus or src/sbin/lptctl. GNU tar and pax can also uncompress the tarball in this stage.

Using the diff in a file release

  1. Uncompress the diff:

    cd /path/to/file
    gunzip ppbus.diff.gz

  2. Apply the diff to the top-level of the source tree (the directory containing src/):

    cd /source_dir
    cat /path/to/file/ppbus.diff | patch -p4

Using ISA PnP and atppc

Before you can build a kernel with 'atppc* at isapnp?' in the configuration file (to configure atppc using the ISA PnP code), you must regenerate the database of known devices (described in isapnp(9)):

  1. Patch the kernel source as detailed above
  2. Change the directory to the isapnp directory in the kernel source tree: 'cd src/sys/dev/isapnp'
  3. Rebuild the database: 'make -f Makefile.isapnpdevs'

You must repeat these steps whenever the file 'src/sys/dev/isapnp/isapnpdevs', the master source for the ISA PnP database, changes.

Common Steps in Building

For steps common to both diff and tarball, you will need to know how to build and configure a kernel in NetBSD - see NetBSD Kernel Documentation for details).

  1. Configure a kernel with ppbus and its child devices.

    A kernel configuration file called 'PPBUS_DEV' is including in diffs and tarballs: this file contains the lines needed to add atppc, ppbus, and other related devices. Please note that 'PPBUS_DEV' is an i386 kernel configuration file: the relevant lines for the devices are not.

  2. Build the kernel.
  3. Boot the kernel and test it.

    Once you are sure you can boot safely, you can test the code. Print some documents and use the other device drivers.

  4. Provide feedback!

Documentation | Home

2004/01/15 05:09:14 Logo