kernel-dev-faq.xml 6.1 KB

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