Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | <!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 Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 39 | Refer to the |
| 40 | "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 76 | "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files in Your Layer</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 77 | section in the Yocto Project Development Tasks Manual |
| 78 | for information on how to use an append file to |
| 79 | override metadata. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 80 | </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 | <!-- |
| 141 | vim: expandtab tw=80 ts=4 |
| 142 | --> |