summaryrefslogtreecommitdiffstats
path: root/documentation/kernel-dev/kernel-dev-common.xml
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2012-12-19 12:54:02 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-16 15:59:07 +0000
commitbb715c8eb834ab691715de9cee79d9d6a5adcf92 (patch)
treea86b197fcf5a8384e29c79dd339be25cd7cafb29 /documentation/kernel-dev/kernel-dev-common.xml
parent1b23230b655a0ecd976a5a326da16ac1058c2f30 (diff)
downloadpoky-bb715c8eb834ab691715de9cee79d9d6a5adcf92.tar.gz
kernel-dev: Re-write of "Working With Your Own Sources" section.
(From yocto-docs rev: 21b923bcb13cf918ddfad3b1cb449829c43aa3ab) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/kernel-dev/kernel-dev-common.xml')
-rw-r--r--documentation/kernel-dev/kernel-dev-common.xml109
1 files changed, 108 insertions, 1 deletions
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml
index 0de39d5686..506a45ee11 100644
--- a/documentation/kernel-dev/kernel-dev-common.xml
+++ b/documentation/kernel-dev/kernel-dev-common.xml
@@ -608,7 +608,113 @@ to the Yocto Project Development Manual, section 5.7.3 Creating the Patch.
608 <title>Working With Your Own Sources</title> 608 <title>Working With Your Own Sources</title>
609 609
610 <para> 610 <para>
611 If you find yourself unable to work with one of the Linux kernel versions 611 If you find yourself unable to work with one of the Linux kernel
612 versions supported by existing linux-yocto recipes, you can
613 still make use of the Yocto Project Linux kernel tooling by
614 working with your own sources.
615 You will not be able to leverage the existing
616 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> and
617 stabilization work of the linux-yocto sources, but you will be
618 able to manage your own Metadata in the same format as the
619 linux-yocto sources.
620 Format compatibility facilitates converging with
621 linux-yocto on a future, mutually-supported kernel version.
622 </para>
623
624 <para>
625 The linux-yocto custom recipe is located in the
626 <filename>poky</filename> Git repository of the
627 Yocto Project <ulink url='&YOCTO_GIT_URL;'>Source Repository</ulink>
628 at:
629 <literallayout class="monospaced">
630 poky/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb
631 </literallayout>
632 </para>
633
634 <para>
635 The example recipe uses <filename>kernel.org</filename> sources
636 and the Yocto Project Linux kernel tools for managing Metadata.
637 </para>
638
639 <para>
640 Here are some basic steps you can use to work with your own sources:
641 <orderedlist>
642 <listitem><para>Copy the <filename>linux-yocto-custom.bb</filename>
643 recipe to your layer and give it a meaningful name.
644 The name should include the version of the Linux kernel you
645 are using (e.g. <filename>linux-yocto-myproject_3.5.bb</filename>,
646 where "3.5" is the base version of the Linux kernel
647 with which you would be working.</para></listitem>
648 <listitem><para>In the same directory inside your layer,
649 create a matching directory
650 to store your patches and configuration files (e.g.
651 <filename>linux-yocto-myproject</filename>).
652 </para></listitem>
653 <listitem><para>Edit the following variables in your recipe
654 as appropriate for your project:
655 <itemizedlist>
656 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>:
657 The <filename>SRC_URI</filename> should be a Git
658 repository that uses one of the supported Git fetcher
659 protocols (i.e. <filename>file</filename>,
660 <filename>git</filename>, <filename>http</filename>,
661 and so forth).
662 The skeleton recipe provides an example
663 <filename>SRC_URI</filename> as a syntax reference.
664 </para></listitem>
665 <listitem><para><filename>LINUX_VERSION</filename>:
666 The Linux kernel version you are using (e.g.
667 "3.6.3").</para></listitem>
668 <listitem><para><filename>LINUX_VERSION_EXTENSION</filename>:
669 The Linux kernel <filename>CONFIG_LOCALVERSION</filename>
670 that is compiled into the resulting kernel and visible
671 through the <filename>uname</filename> command.
672 </para></listitem>
673 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>:
674 The commit ID from which you want to build.
675 </para></listitem>
676 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
677 Treat this variable the same as you would in any other
678 recipe.
679 Increment the variable to indicate to the OpenEmbedded
680 build system that the recipe has changed.
681 </para></listitem>
682 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
683 The default <filename>PV</filename> assignment is
684 typically adequate.
685 It combines the <filename>LINUX_VERSION</filename>
686 with the SCM revision (from the SRCPV variable)
687 and results in a string using the following form:
688 <literallayout class='monospaced'>
689 3.4.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2
690 </literallayout>
691 While lengthy, the extra verbosity in <filename>PV</filename>
692 helps ensure you are using the exact
693 sources from which you intend to build.
694 </para></listitem>
695 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>:
696 A list of the machines supported by your new recipe.
697 This variable in the example recipe is set
698 by default to a regular expression that matches
699 only the empty string, "(^$)".
700 This default setting triggers an explicit build failure.
701 You must change it to match a list of the machines
702 that your new recipe supports (e.g. "qemux86|qemux86-64").
703 </para></listitem>
704 </itemizedlist></para></listitem>
705 <listitem><para>Provide further customizations to your recipe
706 as needed just as you would customize an existing
707 linux-yocto recipe.
708 See the "<link linkend='modifying-an-existing-recipe'>Modifying
709 an Existing Recipe</link>" section for information.
710 </para></listitem>
711 </orderedlist>
712 </para>
713
714 <para>
715 Original Text:
716 <literallayout class='monospaced'>
717If you find yourself unable to work with one of the Linux kernel versions
612supported by existing linux-yocto recipes, you can still make use of the Yocto 718supported by existing linux-yocto recipes, you can still make use of the Yocto
613Project Linux kernel tooling while working with your own sources. You will not 719Project Linux kernel tooling while working with your own sources. You will not
614be able to leverage the existing meta-data and stabilization work of the 720be able to leverage the existing meta-data and stabilization work of the
@@ -669,6 +775,7 @@ machines supported by your new recipe, such as "(qemux86|qemux86-64)"
669With that in place, you can continue to customize this recipe as you would the 775With that in place, you can continue to customize this recipe as you would the
670existing linux-yocto recipes. See Section 2.2 Modifying an Existing Recipe for 776existing linux-yocto recipes. See Section 2.2 Modifying an Existing Recipe for
671details. 777details.
778 </literallayout>
672 </para> 779 </para>
673 </section> 780 </section>
674 781