diff options
| -rw-r--r-- | documentation/kernel-dev/kernel-dev-common.xml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml index c0acac8316..618d60cbaf 100644 --- a/documentation/kernel-dev/kernel-dev-common.xml +++ b/documentation/kernel-dev/kernel-dev-common.xml | |||
| @@ -238,6 +238,65 @@ | |||
| 238 | section in the Yocto Project Development Manual. | 238 | section in the Yocto Project Development Manual. |
| 239 | </para> | 239 | </para> |
| 240 | </section> | 240 | </section> |
| 241 | |||
| 242 | <section id='using-an-in-tree-defconfig-file'> | ||
| 243 | <title>Using an "In-Tree" <filename>defconfig</filename> File</title> | ||
| 244 | |||
| 245 | <para> | ||
| 246 | It might be desirable to have kernel configuration fragment | ||
| 247 | support through a <filename>defconfig</filename> file that | ||
| 248 | is pulled from the kernel source tree for the configured | ||
| 249 | machine. | ||
| 250 | By default, the OpenEmbedded build system looks for | ||
| 251 | <filename>defconfig</filename> files in the layer used for | ||
| 252 | Metadata, which is "out-of-tree", and then configures them | ||
| 253 | using the following: | ||
| 254 | <literallayout class='monospaced'> | ||
| 255 | SRC_URI += "file://defconfig" | ||
| 256 | </literallayout> | ||
| 257 | If you do not want to maintain copies of | ||
| 258 | <filename>defconfig</filename> files in your layer but would | ||
| 259 | rather allow users to use the default configuration from the | ||
| 260 | kernel tree and still be able to add configuration fragments | ||
| 261 | to the | ||
| 262 | <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> | ||
| 263 | through, for example, append files, you can direct the | ||
| 264 | OpenEmbedded build system to use a | ||
| 265 | <filename>defconfig</filename> file that is "in-tree". | ||
| 266 | </para> | ||
| 267 | |||
| 268 | <para> | ||
| 269 | To specify an "in-tree" <filename>defconfig</filename> file, | ||
| 270 | edit the recipe that builds your kernel so that it has the | ||
| 271 | following command form: | ||
| 272 | <literallayout class='monospaced'> | ||
| 273 | KBUILD_DEFCONFIG_<ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'>KMACHINE</ulink> ?= <replaceable>defconfig_file</replaceable> | ||
| 274 | </literallayout> | ||
| 275 | You need to append the variable with | ||
| 276 | <filename>KMACHINE</filename> and then supply the path to | ||
| 277 | your "in-tree" <filename>defconfig</filename> file. | ||
| 278 | </para> | ||
| 279 | |||
| 280 | <para> | ||
| 281 | Aside from modifying your kernel recipe and providing your own | ||
| 282 | <filename>defconfig</filename> file, you need to be sure no | ||
| 283 | files or statements set <filename>SRC_URI</filename> to use a | ||
| 284 | <filename>defconfig</filename> other than your "in-tree" | ||
| 285 | file (e.g. a kernel's <filename>linux-</filename><replaceable>machine</replaceable><filename>.inc</filename> | ||
| 286 | file). | ||
| 287 | In other words, if the build system detects a statement | ||
| 288 | that identifies an "out-of-tree" | ||
| 289 | <filename>defconfig</filename> file, that statement | ||
| 290 | will override your | ||
| 291 | <filename>KBUILD_DEFCONFIG</filename> variable. | ||
| 292 | </para> | ||
| 293 | |||
| 294 | <para> | ||
| 295 | See the | ||
| 296 | <ulink url='&YOCTO_DOCS_REF_URL;#var-KBUILD_DEFCONFIG'><filename>KBUILD_DEFCONFIG</filename></ulink> | ||
| 297 | variable description for more information. | ||
| 298 | </para> | ||
| 299 | </section> | ||
| 241 | </section> | 300 | </section> |
| 242 | 301 | ||
| 243 | <section id='using-an-iterative-development-process'> | 302 | <section id='using-an-iterative-development-process'> |
