diff options
| -rw-r--r-- | documentation/kernel-dev/kernel-dev-common.xml | 55 |
1 files changed, 52 insertions, 3 deletions
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml index 7c9f412fd5..8e6db4c255 100644 --- a/documentation/kernel-dev/kernel-dev-common.xml +++ b/documentation/kernel-dev/kernel-dev-common.xml | |||
| @@ -33,7 +33,7 @@ | |||
| 33 | <itemizedlist> | 33 | <itemizedlist> |
| 34 | <listitem><para>"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>" for | 34 | <listitem><para>"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>" for |
| 35 | general information on layers and how to create them.</para></listitem> | 35 | general information on layers and how to create them.</para></listitem> |
| 36 | <listitem><para>"<ulink url='&YOCTO_DOCS_DEV_URL;#get-your-layer-set-up-for-the-build'>Get Your Layer Set Up for the Build</ulink>" for | 36 | <listitem><para>"<ulink url='&YOCTO_DOCS_DEV_URL;#get-your-layer-setup-for-the-build'>Get Your Layer Setup for the Build</ulink>" for |
| 37 | specific instructions on setting up a layer for kernel | 37 | specific instructions on setting up a layer for kernel |
| 38 | development.</para></listitem> | 38 | development.</para></listitem> |
| 39 | </itemizedlist> | 39 | </itemizedlist> |
| @@ -44,7 +44,56 @@ | |||
| 44 | <title>Modifying an Existing Recipe</title> | 44 | <title>Modifying an Existing Recipe</title> |
| 45 | 45 | ||
| 46 | <para> | 46 | <para> |
| 47 | In many cases, you can customize an existing linux-yocto recipe to meet the | 47 | In many cases, you can customize an existing linux-yocto recipe to |
| 48 | meet the needs of your project. | ||
| 49 | Each release of the Yocto Project provides a few Linux | ||
| 50 | kernel recipes from which you can choose. | ||
| 51 | These are located in the | ||
| 52 | <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> | ||
| 53 | in <filename>meta/recipes-kernel/linux</filename>. | ||
| 54 | </para> | ||
| 55 | |||
| 56 | <para> | ||
| 57 | To begin with, create a minimal, custom layer from which you | ||
| 58 | can work. | ||
| 59 | See the | ||
| 60 | "<ulink url='&YOCTO_DOCS_DEV_URL;#get-your-layer-setup-for-the-build'>Get Your Layer Setup for the Build</ulink>" section | ||
| 61 | of the Yocto Project Development Manual for information. | ||
| 62 | </para> | ||
| 63 | |||
| 64 | <para> | ||
| 65 | Next comes the <filename>.bbappend</filename> file. | ||
| 66 | You create this file in your custom layer. | ||
| 67 | You also name it accordingly based on the linux-yocto recipe | ||
| 68 | you are using. | ||
| 69 | For example, if you are modifying the | ||
| 70 | <filename>meta/recipes-kernel/linux/linux-yocto_3.4.bb</filename> | ||
| 71 | recipe, the append file will typical be located as follows | ||
| 72 | within your custom layer: | ||
| 73 | <literallayout class='monospaced'> | ||
| 74 | <your-layer>/recipes-kernel/linux/linux-yocto_3.4.bbappend | ||
| 75 | </literallayout> | ||
| 76 | The append file should initially contain the following text: | ||
| 77 | <literallayout class='monospaced'> | ||
| 78 | FILESEXTRAPATHS := "${THISDIR}/${PN}" | ||
| 79 | </literallayout> | ||
| 80 | The path <filename>${THISDIR}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename> expands | ||
| 81 | to "linux-yocto" in the current directory for this example. | ||
| 82 | If you add any new files that modify the kernel recipe, you need | ||
| 83 | to place them in your layer in the following area: | ||
| 84 | <literallayout class='monospaced'> | ||
| 85 | <your-layer>/recipes-kernel/linux/linux-yocto/ | ||
| 86 | </literallayout> | ||
| 87 | <note>If you are working on a new machine Board Support Package | ||
| 88 | (BSP), be sure to refer to the | ||
| 89 | <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>. | ||
| 90 | </note> | ||
| 91 | </para> | ||
| 92 | |||
| 93 | <para> | ||
| 94 | Original text: | ||
| 95 | <literallayout class='monospaced'> | ||
| 96 | In many cases, you can customize an existing linux-yocto recipe to meet the | ||
| 48 | needs of your project. Each release of the Yocto Project provides a few Linux | 97 | needs of your project. Each release of the Yocto Project provides a few Linux |
| 49 | kernel recipes to choose from. To get started, prepare a layer and a bbappend | 98 | kernel recipes to choose from. To get started, prepare a layer and a bbappend |
| 50 | file corresponding to the recipe you wish to modify. | 99 | file corresponding to the recipe you wish to modify. |
| @@ -67,7 +116,7 @@ modify the recipe should then be added to the following path within the layer: | |||
| 67 | 116 | ||
| 68 | NOTE: If you are working on a new machine BSP, be sure to refer to the Yocto | 117 | NOTE: If you are working on a new machine BSP, be sure to refer to the Yocto |
| 69 | Project Board Support Package Developer's Guide. | 118 | Project Board Support Package Developer's Guide. |
| 70 | 119 | </literallayout> | |
| 71 | </para> | 120 | </para> |
| 72 | 121 | ||
| 73 | <section id='applying-patches'> | 122 | <section id='applying-patches'> |
