Andrew Geissler | f034379 | 2020-11-18 10:42:21 -0600 | [diff] [blame] | 1 | .. SPDX-License-Identifier: CC-BY-SA-2.0-UK |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 2 | |
| 3 | ********************** |
| 4 | Kernel Development FAQ |
| 5 | ********************** |
| 6 | |
| 7 | .. _kernel-dev-faq-section: |
| 8 | |
| 9 | Common Questions and Solutions |
| 10 | ============================== |
| 11 | |
| 12 | The following lists some solutions for common questions. |
| 13 | |
| 14 | How do I use my own Linux kernel ``.config`` file? |
| 15 | -------------------------------------------------- |
| 16 | |
| 17 | Refer to the |
| 18 | ":ref:`kernel-dev/kernel-dev-common:changing the configuration`" |
| 19 | section for information. |
| 20 | |
| 21 | How do I create configuration fragments? |
| 22 | ---------------------------------------- |
| 23 | |
| 24 | A: Refer to the |
| 25 | ":ref:`kernel-dev/kernel-dev-common:creating configuration fragments`" |
| 26 | section for information. |
| 27 | |
| 28 | How do I use my own Linux kernel sources? |
| 29 | ----------------------------------------- |
| 30 | |
| 31 | Refer to the |
| 32 | ":ref:`kernel-dev/kernel-dev-common:working with your own sources`" |
| 33 | section for information. |
| 34 | |
| 35 | How do I install/not-install the kernel image on the rootfs? |
| 36 | ------------------------------------------------------------ |
| 37 | |
| 38 | The kernel image (e.g. ``vmlinuz``) is provided by the |
| 39 | ``kernel-image`` package. Image recipes depend on ``kernel-base``. To |
| 40 | specify whether or not the kernel image is installed in the generated |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 41 | root filesystem, override ``RDEPENDS_${KERNEL_PACKAGE_NAME}-base`` to include or not |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 42 | include "kernel-image". See the |
| 43 | ":ref:`dev-manual/dev-manual-common-tasks:using .bbappend files in your layer`" |
| 44 | section in the |
| 45 | Yocto Project Development Tasks Manual for information on how to use an |
| 46 | append file to override metadata. |
| 47 | |
| 48 | How do I install a specific kernel module? |
| 49 | ------------------------------------------ |
| 50 | |
| 51 | Linux kernel modules are packaged individually. To ensure a |
| 52 | specific kernel module is included in an image, include it in the |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 53 | appropriate machine :term:`RRECOMMENDS` variable. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 54 | These other variables are useful for installing specific modules: |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 55 | - :term:`MACHINE_ESSENTIAL_EXTRA_RDEPENDS` |
| 56 | - :term:`MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS` |
| 57 | - :term:`MACHINE_EXTRA_RDEPENDS` |
| 58 | - :term:`MACHINE_EXTRA_RRECOMMENDS` |
| 59 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 60 | For example, set the following in the ``qemux86.conf`` file to include |
| 61 | the ``ab123`` kernel modules with images built for the ``qemux86`` |
| 62 | machine: |
| 63 | :: |
| 64 | |
| 65 | MACHINE_EXTRA_RRECOMMENDS += "kernel-module-ab123" |
| 66 | |
Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 67 | For more information, see the |
| 68 | ":ref:`kernel-dev/kernel-dev-common:incorporating out-of-tree modules`" section. |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 69 | |
| 70 | How do I change the Linux kernel command line? |
| 71 | ---------------------------------------------- |
| 72 | |
| 73 | The Linux kernel command line is |
| 74 | typically specified in the machine config using the ``APPEND`` variable. |
| 75 | For example, you can add some helpful debug information doing the |
| 76 | following: |
| 77 | :: |
| 78 | |
| 79 | APPEND += "printk.time=y initcall_debug debug" |
| 80 | |