- 论坛徽章:
- 0
|
4.3.5.2. Building against precompiled kernel headers
If the /lib/modules/uname -r/build symlink does not exist, and you are building against a running stock kernel (one that was shipped pre-compiled with your distribution), you may also set the KDIR variable to point to the matching kernel headers (as opposed to kernel sources) directory. Note that besides the actual kernel headers — commonly found in /usr/src/linux-version/include — the DRBD build process also looks for the kernel Makefile and configuration file (.config), which pre-built kernel headers packages commonly include.
To build against precompiled kernel headers, issue, for example:
$ cd drbd
$ make clean
$ make KDIR=/lib/modules/2.6.38/build
4.3.5.3. Building against a kernel source tree
If you are building DRBD against a kernel other than your currently running one, and you do not have precompiled kernel sources for your target kernel available, you need to build DRBD against a complete target kernel source tree. To do so, set the KDIR variable to point to the kernel sources directory:
$ cd drbd
$ make clean
$ make KDIR=/path/to/kernel/source |
|