diff options
-rw-r--r-- | documentation/kernel-dev/kernel-dev-common.xml | 72 |
1 files changed, 3 insertions, 69 deletions
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml index 1b19c08524..3645a5acdd 100644 --- a/documentation/kernel-dev/kernel-dev-common.xml +++ b/documentation/kernel-dev/kernel-dev-common.xml | |||
@@ -437,7 +437,7 @@ | |||
437 | still make use of the Yocto Project Linux kernel tooling by | 437 | still make use of the Yocto Project Linux kernel tooling by |
438 | working with your own sources. | 438 | working with your own sources. |
439 | When you use your own sources, you will not be able to | 439 | When you use your own sources, you will not be able to |
440 | leverage the existing | 440 | leverage the existing kernel |
441 | <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> and | 441 | <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> and |
442 | stabilization work of the linux-yocto sources. | 442 | stabilization work of the linux-yocto sources. |
443 | However, you will be able to manage your own Metadata in the same | 443 | However, you will be able to manage your own Metadata in the same |
@@ -448,7 +448,8 @@ | |||
448 | 448 | ||
449 | <para> | 449 | <para> |
450 | To help you use your own sources, the Yocto Project provides a | 450 | To help you use your own sources, the Yocto Project provides a |
451 | linux-yocto custom recipe that uses | 451 | linux-yocto custom recipe |
452 | <filename>linux-yocto-custom.bb</filename> that uses | ||
452 | <filename>kernel.org</filename> sources | 453 | <filename>kernel.org</filename> sources |
453 | and the Yocto Project Linux kernel tools for managing Metadata. | 454 | and the Yocto Project Linux kernel tools for managing Metadata. |
454 | You can find this recipe in the | 455 | You can find this recipe in the |
@@ -539,73 +540,6 @@ | |||
539 | </para></listitem> | 540 | </para></listitem> |
540 | </orderedlist> | 541 | </orderedlist> |
541 | </para> | 542 | </para> |
542 | |||
543 | <para> | ||
544 | Original Text: | ||
545 | <literallayout class='monospaced'> | ||
546 | If you find yourself unable to work with one of the Linux kernel versions | ||
547 | supported by existing linux-yocto recipes, you can still make use of the Yocto | ||
548 | Project Linux kernel tooling while working with your own sources. You will not | ||
549 | be able to leverage the existing meta-data and stabilization work of the | ||
550 | linux-yocto sources, but you will be able to manage your own meta-data in the | ||
551 | same format as the linux-yocto sources which will facilitate converging with | ||
552 | linux-yocto on a future mutually-supported kernel version. | ||
553 | |||
554 | The linux-yocto-custom recipe, located in the poky repository at: | ||
555 | |||
556 | meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb | ||
557 | |||
558 | is provided as an example recipe which uses kernel.org sources and the Yocto | ||
559 | Project Linux kernel tools for managing meta-data. To get started, copy this | ||
560 | recipe to your layer and provide it with a meaningful name, such as | ||
561 | linux-yocto-myproject_3.5.bb, where 3.5 is the base version of the Linux kernel | ||
562 | you will be working with. In the same directory, create a matching directory, | ||
563 | e.g. linux-yocto-myproject to store your patches and configuration files. | ||
564 | |||
565 | Edit the following variables in the recipe as appropriate for your project: | ||
566 | |||
567 | o SRC_URI | ||
568 | o LINUX_VERSION | ||
569 | o LINUX_VERSION_EXTENSION | ||
570 | o SRCREV | ||
571 | o PR | ||
572 | o PV | ||
573 | o COMPATIBLE_MACHINE | ||
574 | |||
575 | The SRC_URI should be a git repository, using one of the supported git fetcher | ||
576 | protocols (file, git, http, etc.). The skeleton recipe provides an example | ||
577 | SRC_URI as a syntax reference. | ||
578 | |||
579 | Set LINUX_VERSION to the Linux kernel version you are using, such as "3.6.3". | ||
580 | |||
581 | LINUX_VERSION_EXTENSION is used to define the Linux kernel CONFIG_LOCALVERSION | ||
582 | which will be compiled in to the resulting kernel and visible via the uname | ||
583 | command. | ||
584 | |||
585 | Set SRCREV to the commit ID you wish to build from. | ||
586 | |||
587 | Treat the PR as you would the PR of any other recipe. Increment it to indicate | ||
588 | to the build system that the recipe has changed. | ||
589 | |||
590 | The default PV assignment is typically adequate. It combines the LINUX_VERSION | ||
591 | with the SCM revision (from the SRCPV variable) and results in a string | ||
592 | something like: | ||
593 | |||
594 | "3.4.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2" | ||
595 | |||
596 | While lengthy, this extra verbosity helps ensure you are building from the exact | ||
597 | sources you intend. | ||
598 | |||
599 | Finally, the default COMPATIBLE_MACHINE assignment for linux-yocto-custom is set | ||
600 | to a regular expression matching only the empty string, "(^$)". This will | ||
601 | trigger an explicit build failure. You must change it to match a list of the | ||
602 | machines supported by your new recipe, such as "(qemux86|qemux86-64)" | ||
603 | |||
604 | With that in place, you can continue to customize this recipe as you would the | ||
605 | existing linux-yocto recipes. See Section 2.2 Modifying an Existing Recipe for | ||
606 | details. | ||
607 | </literallayout> | ||
608 | </para> | ||
609 | </section> | 543 | </section> |
610 | 544 | ||
611 | <section id='incorporating-out-of-tree-modules'> | 545 | <section id='incorporating-out-of-tree-modules'> |