tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: How to use the autoconf(9) interface alongside the module(9) one? (was: "How to compile a modified example kernel module")



On Wed, 23 Mar 2016, Judas Iscariot wrote:

For reference here is what module(7) says about building all modules :

  The common build tool of NetBSD, ``build.sh'', automatically compiles and
  installs all modules during a full system build and install.  However,
  sometimes it is useful to update only modules.  The following example
  demonstrates one way to do this.  It is assumed that the source code is
  under /usr/src, while the object and toolchain directories are under
  /usr/obj and /usr/tools, respectively.

        cd /usr/src/sys/modules

        export OBJDIR=/usr/obj
        export TOOLDIR=/usr/tools

        make clean
        make
        make install

Is there a way of only building one module? (a module like azalia, not modules like ones in src/sys/modules/examples/)


1. To build all modules, you can still use build.sh (assumes that $SRC
   is set appropriately to your source directory)

	cd $SRC
	./build/sh modules

2. To build a specific module, you should first use build.sh to create
   the make-wrapper and other tools:

	cd $SRC
	./build.sh tools

   Then cd to the particular directory and use the make-wrapper

	cd $SRC/sys/modules/azalia
	$SRC/tools/x86_64/amd64/bin/nbmake-amd64



If you're still getting "compile errors", you'll get a lot more help if provide _detailed_ error messages. Just saying "I got an error" won't help us to help you.


+------------------+--------------------------+------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:      |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+------------------------+


Home | Main Index | Thread Index | Old Index