blob: c3a20465a097f339b954ba602d491e28f894eedb [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<appendix id='kernel-dev-faq'>
6<title>Kernel Development FAQ</title>
7
8<section id='kernel-dev-faq-section'>
9 <title>Common Questions and Solutions</title>
10
11 <para>
12 The following lists some solutions for common questions.
13
14
15 <qandaset>
16 <qandaentry>
17 <question>
18 <para>
19 How do I use my own Linux kernel <filename>.config</filename>
20 file?
21 </para>
22 </question>
23 <answer>
24 <para>
25 Refer to the "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
26 section for information.
27 </para>
28 </answer>
29 </qandaentry>
30
31 <qandaentry>
32 <question>
33 <para>
34 How do I create configuration fragments?
35 </para>
36 </question>
37 <answer>
38 <para>
Brad Bishopd7bf8c12018-02-25 22:55:05 -050039 Refer to the
40 "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050041 section for information.
42 </para>
43 </answer>
44 </qandaentry>
45
46 <qandaentry>
47 <question>
48 <para>
49 How do I use my own Linux kernel sources?
50 </para>
51 </question>
52 <answer>
53 <para>
54 Refer to the "<link linkend='working-with-your-own-sources'>Working With Your Own Sources</link>"
55 section for information.
56 </para>
57 </answer>
58 </qandaentry>
59
60 <qandaentry>
61 <question>
62 <para>
63 How do I install/not-install the kernel image on the rootfs?
64 </para>
65 </question>
66 <answer>
67 <para>
68 The kernel image (e.g. <filename>vmlinuz</filename>) is provided
69 by the <filename>kernel-image</filename> package.
70 Image recipes depend on <filename>kernel-base</filename>.
71 To specify whether or not the kernel
72 image is installed in the generated root filesystem, override
73 <filename>RDEPENDS_kernel-base</filename> to include or not
74 include "kernel-image".</para>
75 <para>See the
Brad Bishop6e60e8b2018-02-01 10:27:11 -050076 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050077 section in the Yocto Project Development Tasks Manual
78 for information on how to use an append file to
79 override metadata.
Patrick Williamsc124f4f2015-09-15 14:41:29 -050080 </para>
81 </answer>
82 </qandaentry>
83
84 <qandaentry>
85 <question>
86 <para>
87 How do I install a specific kernel module?
88 </para>
89 </question>
90 <answer>
91 <para>
92 Linux kernel modules are packaged individually.
93 To ensure a specific kernel module is included in an image,
94 include it in the appropriate machine
95 <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>
96 variable.</para>
97 <para>These other variables are useful for installing specific
98 modules:
99 <literallayout class='monospaced'>
100 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</filename></ulink>
101 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</filename></ulink>
102 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RDEPENDS'><filename>MACHINE_EXTRA_RDEPENDS</filename></ulink>
103 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RRECOMMENDS'><filename>MACHINE_EXTRA_RRECOMMENDS</filename></ulink>
104 </literallayout>
105 For example, set the following in the <filename>qemux86.conf</filename>
106 file to include the <filename>ab123</filename> kernel modules
107 with images built for the <filename>qemux86</filename> machine:
108 <literallayout class='monospaced'>
109 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-ab123"
110 </literallayout>
111 For more information, see the
112 "<link linkend='incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</link>"
113 section.
114 </para>
115 </answer>
116 </qandaentry>
117
118 <qandaentry>
119 <question>
120 <para>
121 How do I change the Linux kernel command line?
122 </para>
123 </question>
124 <answer>
125 <para>
126 The Linux kernel command line is typically specified in
127 the machine config using the <filename>APPEND</filename> variable.
128 For example, you can add some helpful debug information doing
129 the following:
130 <literallayout class='monospaced'>
131 APPEND += "printk.time=y initcall_debug debug"
132 </literallayout>
133 </para>
134 </answer>
135 </qandaentry>
136 </qandaset>
137 </para>
138</section>
139</appendix>
140<!--
141vim: expandtab tw=80 ts=4
142-->