• Home
  • Raw
  • Download

Lines Matching +full:uapi +full:- +full:header

5 This document describes how to build an out-of-tree kernel module.
13 both in-tree and out-of-tree is provided. The method for building
15 out-of-tree.
18 in building out-of-tree (or "external") modules. The author of an
29 that contains the configuration and header files used in the build.
44 --------------
48 $ make -C <path_to_kernel_dir> M=$PWD
55 $ make -C /lib/modules/`uname -r`/build M=$PWD
60 $ make -C /lib/modules/`uname -r`/build M=$PWD modules_install
63 -------
69 make -C $KDIR M=$PWD
71 -C $KDIR
84 -------
89 make -C $KDIR M=$PWD [target]
120 -----------------------
128 make -C $KDIR M=$PWD bar.lst
129 make -C $KDIR M=$PWD baz.o
130 make -C $KDIR M=$PWD foo.ko
131 make -C $KDIR M=$PWD ./
143 obj-m := <module_name>.o
151 <module_name>-y := <src1>.o <src2>.o ...
164 ---------------
175 --> filename: Makefile
178 obj-m := 8123.o
179 8123-y := 8123_if.o 8123_pci.o
183 KDIR ?= /lib/modules/`uname -r`/build
186 $(MAKE) -C $(KDIR) M=$$PWD
199 ---------------------------------
207 --> filename: Kbuild
208 obj-m := 8123.o
209 8123-y := 8123_if.o 8123_pci.o
211 --> filename: Makefile
212 KDIR ?= /lib/modules/`uname -r`/build
215 $(MAKE) -C $(KDIR) M=$$PWD
223 -------------------------
229 obj-m := foo.o bar.o
230 foo-y := <foo_srcs>
231 bar-y := <bar_srcs>
239 Within the kernel, header files are kept in standard locations
242 * If the header file only describes the internal interface of a
245 * If the header file describes an interface used by other parts
256 ---------------
258 To include a header file located under include/linux/, simply
267 -------------------
269 External modules tend to place header files in a separate
272 directory, use either ccflags-y or CFLAGS_<filename>.o.
278 --> filename: Kbuild
279 obj-m := 8123.o
281 ccflags-y := -I $(src)/include
282 8123-y := 8123_if.o 8123_pci.o
285 ----------------------
303 --> filename: Kbuild
304 obj-m := complex.o
305 complex-y := src/complex_main.o
306 complex-y += src/hal/hardwareif.o
308 ccflags-y := -I$(src)/include
309 ccflags-y += -I$(src)/src/hal/include
316 For the header files, kbuild must be explicitly told where to
318 root of the kernel tree (the argument to "-C") and therefore an
323 UAPI Headers Installation
324 -------------------------
327 fashion to the in-tree counterpart drivers. kbuild supports
328 running headers_install target in an out-of-tree. The location
329 where kbuild searches for headers is $(M)/include/uapi and
330 $(M)/arch/$(SRCARCH)/include/uapi.
348 ----------------
359 calling "make." This has effect when installing both in-tree
360 and out-of-tree modules.
363 ---------------
371 $ make INSTALL_MOD_DIR=gandalf -C $KDIR \
390 -------------------------------------------
401 0xe1cc2a05 usb_stor_suspend drivers/usb/storage/usb-storage EXPORT_SYMBOL_GPL USB_STORAGE
415 ---------------------------
431 section as a series of concatenated, null-terminated strings. CRCs for
435 ----------------------------
445 ------------------------------------
452 NOTE: The method with a top-level kbuild file is recommended
455 Use a top-level kbuild file
458 common top-level kbuild file so both modules are
465 The top-level kbuild file would then look like::
468 obj-m := foo/ bar/
472 $ make -C $KDIR M=$PWD
478 If it is impractical to add a top-level kbuild file,
489 --------------------------
497 obj-$(CONFIG_EXT2_FS) += ext2.o
499 ext2-y := balloc.o bitmap.o dir.o
500 ext2-$(CONFIG_EXT2_FS_XATTR) += xattr.o