blob: 4dffa90dbd033861bc1b26b3e2b138dec4d93c3f [file] [log] [blame]
Andrew Geisslerf0343792020-11-18 10:42:21 -06001.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
Andrew Geisslerc9f78652020-09-18 14:11:35 -05002
3**********************
4Kernel Development FAQ
5**********************
6
Andrew Geisslerc9f78652020-09-18 14:11:35 -05007Common Questions and Solutions
8==============================
9
William A. Kennington IIIac69b482021-06-02 12:28:27 -070010Here are some solutions for common questions.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050011
12How do I use my own Linux kernel ``.config`` file?
13--------------------------------------------------
14
15Refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -060016":ref:`kernel-dev/common:changing the configuration`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050017section for information.
18
19How do I create configuration fragments?
20----------------------------------------
21
22A: Refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -060023":ref:`kernel-dev/common:creating configuration fragments`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050024section for information.
25
26How do I use my own Linux kernel sources?
27-----------------------------------------
28
29Refer to the
Andrew Geissler09209ee2020-12-13 08:44:15 -060030":ref:`kernel-dev/common:working with your own sources`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050031section for information.
32
Andrew Geissler595f6302022-01-24 19:11:47 +000033How do I install/not-install the kernel image on the root filesystem?
34---------------------------------------------------------------------
Andrew Geisslerc9f78652020-09-18 14:11:35 -050035
36The kernel image (e.g. ``vmlinuz``) is provided by the
37``kernel-image`` package. Image recipes depend on ``kernel-base``. To
38specify whether or not the kernel image is installed in the generated
Andrew Geissler517393d2023-01-13 08:55:19 -060039root filesystem, override ``RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base`` to include or not
Andrew Geisslerc9f78652020-09-18 14:11:35 -050040include "kernel-image". See the
Andrew Geissler517393d2023-01-13 08:55:19 -060041":ref:`dev-manual/layers:appending other layers metadata with your layer`"
Andrew Geisslerc9f78652020-09-18 14:11:35 -050042section in the
43Yocto Project Development Tasks Manual for information on how to use an
44append file to override metadata.
45
46How do I install a specific kernel module?
47------------------------------------------
48
49Linux kernel modules are packaged individually. To ensure a
50specific kernel module is included in an image, include it in the
Andrew Geissler4c19ea12020-10-27 13:52:24 -050051appropriate machine :term:`RRECOMMENDS` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050052These other variables are useful for installing specific modules:
Andrew Geissler4c19ea12020-10-27 13:52:24 -050053- :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
54- :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
55- :term:`MACHINE_EXTRA_RDEPENDS`
56- :term:`MACHINE_EXTRA_RRECOMMENDS`
57
Andrew Geisslerc9f78652020-09-18 14:11:35 -050058For example, set the following in the ``qemux86.conf`` file to include
59the ``ab123`` kernel modules with images built for the ``qemux86``
Andrew Geisslerc926e172021-05-07 16:11:35 -050060machine::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050061
62 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-ab123"
63
Andrew Geissler4c19ea12020-10-27 13:52:24 -050064For more information, see the
Andrew Geissler09209ee2020-12-13 08:44:15 -060065":ref:`kernel-dev/common:incorporating out-of-tree modules`" section.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050066
67How do I change the Linux kernel command line?
68----------------------------------------------
69
70The Linux kernel command line is
Andrew Geissler09036742021-06-25 14:25:14 -050071typically specified in the machine config using the :term:`APPEND` variable.
Andrew Geisslerc9f78652020-09-18 14:11:35 -050072For example, you can add some helpful debug information doing the
Andrew Geisslerc926e172021-05-07 16:11:35 -050073following::
Andrew Geisslerc9f78652020-09-18 14:11:35 -050074
75 APPEND += "printk.time=y initcall_debug debug"
76