kernel-dev-faq.xml 6.0 KB

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