xref: /OK3568_Linux_fs/yocto/poky/documentation/kernel-dev/faq.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun**********************
4*4882a593SmuzhiyunKernel Development FAQ
5*4882a593Smuzhiyun**********************
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunCommon Questions and Solutions
8*4882a593Smuzhiyun==============================
9*4882a593Smuzhiyun
10*4882a593SmuzhiyunHere are some solutions for common questions.
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunHow do I use my own Linux kernel ``.config`` file?
13*4882a593Smuzhiyun--------------------------------------------------
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunRefer to the
16*4882a593Smuzhiyun":ref:`kernel-dev/common:changing the configuration`"
17*4882a593Smuzhiyunsection for information.
18*4882a593Smuzhiyun
19*4882a593SmuzhiyunHow do I create configuration fragments?
20*4882a593Smuzhiyun----------------------------------------
21*4882a593Smuzhiyun
22*4882a593SmuzhiyunA: Refer to the
23*4882a593Smuzhiyun":ref:`kernel-dev/common:creating configuration fragments`"
24*4882a593Smuzhiyunsection for information.
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunHow do I use my own Linux kernel sources?
27*4882a593Smuzhiyun-----------------------------------------
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunRefer to the
30*4882a593Smuzhiyun":ref:`kernel-dev/common:working with your own sources`"
31*4882a593Smuzhiyunsection for information.
32*4882a593Smuzhiyun
33*4882a593SmuzhiyunHow do I install/not-install the kernel image on the root filesystem?
34*4882a593Smuzhiyun---------------------------------------------------------------------
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunThe kernel image (e.g. ``vmlinuz``) is provided by the
37*4882a593Smuzhiyun``kernel-image`` package. Image recipes depend on ``kernel-base``. To
38*4882a593Smuzhiyunspecify whether or not the kernel image is installed in the generated
39*4882a593Smuzhiyunroot filesystem, override ``RRECOMMENDS:${KERNEL_PACKAGE_NAME}-base`` to include or not
40*4882a593Smuzhiyuninclude "kernel-image". See the
41*4882a593Smuzhiyun":ref:`dev-manual/common-tasks:appending other layers metadata with your layer`"
42*4882a593Smuzhiyunsection in the
43*4882a593SmuzhiyunYocto Project Development Tasks Manual for information on how to use an
44*4882a593Smuzhiyunappend file to override metadata.
45*4882a593Smuzhiyun
46*4882a593SmuzhiyunHow do I install a specific kernel module?
47*4882a593Smuzhiyun------------------------------------------
48*4882a593Smuzhiyun
49*4882a593SmuzhiyunLinux kernel modules are packaged individually. To ensure a
50*4882a593Smuzhiyunspecific kernel module is included in an image, include it in the
51*4882a593Smuzhiyunappropriate machine :term:`RRECOMMENDS` variable.
52*4882a593SmuzhiyunThese other variables are useful for installing specific modules:
53*4882a593Smuzhiyun- :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS`
54*4882a593Smuzhiyun- :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS`
55*4882a593Smuzhiyun- :term:`MACHINE_EXTRA_RDEPENDS`
56*4882a593Smuzhiyun- :term:`MACHINE_EXTRA_RRECOMMENDS`
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunFor example, set the following in the ``qemux86.conf`` file to include
59*4882a593Smuzhiyunthe ``ab123`` kernel modules with images built for the ``qemux86``
60*4882a593Smuzhiyunmachine::
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun   MACHINE_EXTRA_RRECOMMENDS += "kernel-module-ab123"
63*4882a593Smuzhiyun
64*4882a593SmuzhiyunFor more information, see the
65*4882a593Smuzhiyun":ref:`kernel-dev/common:incorporating out-of-tree modules`" section.
66*4882a593Smuzhiyun
67*4882a593SmuzhiyunHow do I change the Linux kernel command line?
68*4882a593Smuzhiyun----------------------------------------------
69*4882a593Smuzhiyun
70*4882a593SmuzhiyunThe Linux kernel command line is
71*4882a593Smuzhiyuntypically specified in the machine config using the :term:`APPEND` variable.
72*4882a593SmuzhiyunFor example, you can add some helpful debug information doing the
73*4882a593Smuzhiyunfollowing::
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun   APPEND += "printk.time=y initcall_debug debug"
76*4882a593Smuzhiyun
77