diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/kbuild/modules.txt | 40 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 8 |
2 files changed, 48 insertions, 0 deletions
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt index 1c0db652b366..7e77f93634ea 100644 --- a/Documentation/kbuild/modules.txt +++ b/Documentation/kbuild/modules.txt | |||
@@ -18,6 +18,7 @@ In this document you will find information about: | |||
18 | === 5. Include files | 18 | === 5. Include files |
19 | --- 5.1 How to include files from the kernel include dir | 19 | --- 5.1 How to include files from the kernel include dir |
20 | --- 5.2 External modules using an include/ dir | 20 | --- 5.2 External modules using an include/ dir |
21 | --- 5.3 External modules using several directories | ||
21 | === 6. Module installation | 22 | === 6. Module installation |
22 | --- 6.1 INSTALL_MOD_PATH | 23 | --- 6.1 INSTALL_MOD_PATH |
23 | --- 6.2 INSTALL_MOD_DIR | 24 | --- 6.2 INSTALL_MOD_DIR |
@@ -344,6 +345,45 @@ directory and therefore needs to deal with this in their kbuild file. | |||
344 | Note that in the assignment there is no space between -I and the path. | 345 | Note that in the assignment there is no space between -I and the path. |
345 | This is a kbuild limitation: there must be no space present. | 346 | This is a kbuild limitation: there must be no space present. |
346 | 347 | ||
348 | --- 5.3 External modules using several directories | ||
349 | |||
350 | If an external module does not follow the usual kernel style but | ||
351 | decide to spread files over several directories then kbuild can | ||
352 | support this too. | ||
353 | |||
354 | Consider the following example: | ||
355 | |||
356 | | | ||
357 | +- src/complex_main.c | ||
358 | | +- hal/hardwareif.c | ||
359 | | +- hal/include/hardwareif.h | ||
360 | +- include/complex.h | ||
361 | |||
362 | To build a single module named complex.ko we then need the following | ||
363 | kbuild file: | ||
364 | |||
365 | Kbuild: | ||
366 | obj-m := complex.o | ||
367 | complex-y := src/complex_main.o | ||
368 | complex-y += src/hal/hardwareif.o | ||
369 | |||
370 | EXTRA_CFLAGS := -I$(src)/include | ||
371 | EXTRA_CFLAGS += -I$(src)src/hal/include | ||
372 | |||
373 | |||
374 | kbuild knows how to handle .o files located in another directory - | ||
375 | although this is NOT reccommended practice. The syntax is to specify | ||
376 | the directory relative to the directory where the Kbuild file is | ||
377 | located. | ||
378 | |||
379 | To find the .h files we have to explicitly tell kbuild where to look | ||
380 | for the .h files. When kbuild executes current directory is always | ||
381 | the root of the kernel tree (argument to -C) and therefore we have to | ||
382 | tell kbuild how to find the .h files using absolute paths. | ||
383 | $(src) will specify the absolute path to the directory where the | ||
384 | Kbuild file are located when being build as an external module. | ||
385 | Therefore -I$(src)/ is used to point out the directory of the Kbuild | ||
386 | file and any additional path are just appended. | ||
347 | 387 | ||
348 | === 6. Module installation | 388 | === 6. Module installation |
349 | 389 | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 61a56b100c62..a482fde09bbb 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -910,6 +910,14 @@ running once the system is up. | |||
910 | nfsroot= [NFS] nfs root filesystem for disk-less boxes. | 910 | nfsroot= [NFS] nfs root filesystem for disk-less boxes. |
911 | See Documentation/nfsroot.txt. | 911 | See Documentation/nfsroot.txt. |
912 | 912 | ||
913 | nfs.callback_tcpport= | ||
914 | [NFS] set the TCP port on which the NFSv4 callback | ||
915 | channel should listen. | ||
916 | |||
917 | nfs.idmap_cache_timeout= | ||
918 | [NFS] set the maximum lifetime for idmapper cache | ||
919 | entries. | ||
920 | |||
913 | nmi_watchdog= [KNL,BUGS=IA-32] Debugging features for SMP kernels | 921 | nmi_watchdog= [KNL,BUGS=IA-32] Debugging features for SMP kernels |
914 | 922 | ||
915 | no387 [BUGS=IA-32] Tells the kernel to use the 387 maths | 923 | no387 [BUGS=IA-32] Tells the kernel to use the 387 maths |