kernel-dev-faq.xml 5.0 KB

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