diff options
| -rw-r--r-- | documentation/dev-manual/dev-manual-common-tasks.xml | 75 | ||||
| -rw-r--r-- | documentation/ref-manual/ref-variables.xml | 2 |
2 files changed, 52 insertions, 25 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index e7655ade9f..ff19fb716a 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml | |||
| @@ -102,37 +102,64 @@ | |||
| 102 | layer folder, you need to create a <filename>conf/layer.conf</filename> file. | 102 | layer folder, you need to create a <filename>conf/layer.conf</filename> file. |
| 103 | It is easiest to take an existing layer configuration file and copy that to your | 103 | It is easiest to take an existing layer configuration file and copy that to your |
| 104 | layer's <filename>conf</filename> directory and then modify the file as needed.</para> | 104 | layer's <filename>conf</filename> directory and then modify the file as needed.</para> |
| 105 | <para>The <filename>meta-yocto/conf/layer.conf</filename> file demonstrates the | 105 | <para>The <filename>meta-yocto-bsp/conf/layer.conf</filename> file demonstrates the |
| 106 | required syntax: | 106 | required syntax: |
| 107 | <literallayout class='monospaced'> | 107 | <literallayout class='monospaced'> |
| 108 | # We have a conf and classes directory, add to BBPATH | 108 | # We have a conf and classes directory, add to BBPATH |
| 109 | BBPATH := "${LAYERDIR}:${BBPATH}" | 109 | BBPATH := "${BBPATH}:${LAYERDIR}" |
| 110 | 110 | ||
| 111 | # We have recipes-* directories, add to BBFILES | 111 | # We have a packages directory, add to BBFILES |
| 112 | BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \ | 112 | BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \ |
| 113 | ${LAYERDIR}/recipes-*/*/*.bbappend" | 113 | ${LAYERDIR}/recipes-*/*/*.bbappend" |
| 114 | 114 | ||
| 115 | BBFILE_COLLECTIONS += "yocto" | 115 | BBFILE_COLLECTIONS += "yoctobsp" |
| 116 | BBFILE_PATTERN_yocto := "^${LAYERDIR}/" | 116 | BBFILE_PATTERN_yoctobsp := "^${LAYERDIR}/" |
| 117 | BBFILE_PRIORITY_yocto = "5" | 117 | BBFILE_PRIORITY_yoctobsp = "5" |
| 118 | </literallayout></para> | 118 | </literallayout></para> |
| 119 | <para>In the previous example, the recipes for the layers are added to | 119 | <para>Here is an explanation of the example: |
| 120 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILES'>BBFILES</ulink></filename>. | 120 | <itemizedlist> |
| 121 | The | 121 | <listitem><para>The configuration and |
| 122 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_COLLECTIONS'>BBFILE_COLLECTIONS</ulink></filename> | 122 | classes directory is appended to |
| 123 | variable is then appended with the layer name. | 123 | <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>. |
| 124 | The | 124 | <note> |
| 125 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PATTERN'>BBFILE_PATTERN</ulink></filename> | 125 | All non-distro layers, which include all BSP |
| 126 | variable is set to a regular expression and is used to match files | 126 | layers, are expected to append the layer |
| 127 | from <filename>BBFILES</filename> into a particular layer. | 127 | directory to the |
| 128 | In this case, immediate expansion of | 128 | <filename>BBPATH</filename>. |
| 129 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename> | 129 | On the other hand, distro layers, such as |
| 130 | sets <filename>BBFILE_PATTERN</filename> to the layer's path. | 130 | <filename>meta-yocto</filename>, can choose |
| 131 | The | 131 | to enforce their own precedence over |
| 132 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'>BBFILE_PRIORITY</ulink></filename> | 132 | <filename>BBPATH</filename>. |
| 133 | variable then assigns a priority to the layer. | 133 | For an example of that syntax, see the |
| 134 | Applying priorities is useful in situations where the same package might appear in multiple | 134 | <filename>layer.conf</filename> file for |
| 135 | layers and allows you to choose what layer should take precedence.</para> | 135 | the <filename>meta-yocto</filename> layer. |
| 136 | </note></para></listitem> | ||
| 137 | <listitem><para>The recipes for the layers are | ||
| 138 | appended to | ||
| 139 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILES'>BBFILES</ulink></filename>. | ||
| 140 | </para></listitem> | ||
| 141 | <listitem><para>The | ||
| 142 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_COLLECTIONS'>BBFILE_COLLECTIONS</ulink></filename> | ||
| 143 | variable is then appended with the layer name. | ||
| 144 | </para></listitem> | ||
| 145 | <listitem><para>The | ||
| 146 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PATTERN'>BBFILE_PATTERN</ulink></filename> | ||
| 147 | variable is set to a regular expression and is | ||
| 148 | used to match files from | ||
| 149 | <filename>BBFILES</filename> into a particular | ||
| 150 | layer. | ||
| 151 | In this case, immediate expansion of | ||
| 152 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename> | ||
| 153 | sets <filename>BBFILE_PATTERN</filename> to the | ||
| 154 | layer's path.</para></listitem> | ||
| 155 | <listitem><para>The | ||
| 156 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'>BBFILE_PRIORITY</ulink></filename> | ||
| 157 | variable then assigns a priority to the layer. | ||
| 158 | Applying priorities is useful in situations | ||
| 159 | where the same package might appear in multiple | ||
| 160 | layers and allows you to choose what layer | ||
| 161 | should take precedence.</para></listitem> | ||
| 162 | </itemizedlist></para> | ||
| 136 | <para>Note the use of the | 163 | <para>Note the use of the |
| 137 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename> | 164 | <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename> |
| 138 | variable with the immediate expansion operator. | 165 | variable with the immediate expansion operator. |
| @@ -1769,7 +1796,7 @@ | |||
| 1769 | the <filename>layer.conf</filename> file as follows: | 1796 | the <filename>layer.conf</filename> file as follows: |
| 1770 | <literallayout class='monospaced'> | 1797 | <literallayout class='monospaced'> |
| 1771 | # We have a conf and classes directory, add to BBPATH | 1798 | # We have a conf and classes directory, add to BBPATH |
| 1772 | BBPATH := "${LAYERDIR}:${BBPATH}" | 1799 | BBPATH := "${BBPATH}:${LAYERDIR}" |
| 1773 | 1800 | ||
| 1774 | # We have a packages directory, add to BBFILES | 1801 | # We have a packages directory, add to BBFILES |
| 1775 | BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \ | 1802 | BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \ |
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml index ff9a227db1..dabf05989e 100644 --- a/documentation/ref-manual/ref-variables.xml +++ b/documentation/ref-manual/ref-variables.xml | |||
| @@ -1138,7 +1138,7 @@ Core layer for images cannot be removed | |||
| 1138 | point to your custom <filename>fs-perms.txt</filename>. | 1138 | point to your custom <filename>fs-perms.txt</filename>. |
| 1139 | You can specify more than a single file permissions setting table. | 1139 | You can specify more than a single file permissions setting table. |
| 1140 | The paths you specify to these files must be defined within the | 1140 | The paths you specify to these files must be defined within the |
| 1141 | <filename>BBPATH</filename> variable. | 1141 | <link linkend='var-BBPATH'><filename>BBPATH</filename></link> variable. |
| 1142 | </para> | 1142 | </para> |
| 1143 | <para> | 1143 | <para> |
| 1144 | For guidance on how to create your own file permissions settings table file, | 1144 | For guidance on how to create your own file permissions settings table file, |
