diff options
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/kernel-dev/kernel-dev-advanced.xml | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/documentation/kernel-dev/kernel-dev-advanced.xml b/documentation/kernel-dev/kernel-dev-advanced.xml index 768b66450b..8a036a7d2d 100644 --- a/documentation/kernel-dev/kernel-dev-advanced.xml +++ b/documentation/kernel-dev/kernel-dev-advanced.xml | |||
@@ -664,6 +664,104 @@ meta/cfg/kernel-cache/ if you are creating meta-data in-tree (see 3.2.2). | |||
664 | </literallayout> | 664 | </literallayout> |
665 | </para> | 665 | </para> |
666 | 666 | ||
667 | <section id='configuration'> | ||
668 | <title>Configuration</title> | ||
669 | |||
670 | <para> | ||
671 | The simplest unit of metadata is the configuration-only feature. | ||
672 | It consists of one or more Linux kernel configuration parameters | ||
673 | in a configuration fragment file (<filename>.cfg</filename>) | ||
674 | and an <filename>scc</filename> file describing the fragment. | ||
675 | </para> | ||
676 | |||
677 | <para> | ||
678 | The SMP fragment included in the linux-yocto-3.4 Git repository | ||
679 | consists of the following two files: | ||
680 | <literallayout class='monospaced'> | ||
681 | cfg/smp.scc: | ||
682 | define KFEATURE_DESCRIPTION "Enable SMP" | ||
683 | kconf hardware smp.cfg | ||
684 | |||
685 | cfg/smp.cfg: | ||
686 | CONFIG_SMP=y | ||
687 | CONFIG_SCHED_SMT=y | ||
688 | </literallayout> | ||
689 | You can find information on configuration fragment files in the | ||
690 | "<ulink url='&YOCTO_DOCS_REF_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>" | ||
691 | section of the Yocto Project Development Manual and in | ||
692 | the "<link linkend='generating-configuration-files'>Generating Configuration Files</link>" | ||
693 | section earlier in this manual. | ||
694 | </para> | ||
695 | |||
696 | <para> | ||
697 | <filename>KFEATURE_DESCRIPTION</filename> provides a short | ||
698 | description of the fragment, the primary use is for higher level | ||
699 | tooling, such as the Yocto Project BSP Tools (TODO:Citation). | ||
700 | </para> | ||
701 | |||
702 | <para> | ||
703 | The <filename>kconf</filename> command is used to include the | ||
704 | actual configuration fragment in an <filename>scc</filename> | ||
705 | file, and the "hardware" keyword identifies the fragment as | ||
706 | being hardware enabling, as opposed to general policy, | ||
707 | which would use the keyword "non-hardware". | ||
708 | The distinction is made for the benefit of the configuration | ||
709 | validation tools, which will warn you if a hardware fragment | ||
710 | overrides a policy set by a non-hardware fragment. | ||
711 | </para> | ||
712 | |||
713 | <para> | ||
714 | As described in the | ||
715 | "<link linkend='generating-configuration-files'>Generating Configuration Files</link>" | ||
716 | section, the following BitBake command can be used to audit your | ||
717 | configuration: | ||
718 | <literallayout class='monospaced'> | ||
719 | $ bitbake linux-yocto -c kernel_configcheck -f | ||
720 | </literallayout> | ||
721 | The description file can include multiple <filename>kconf</filename> | ||
722 | statements, one per fragment. | ||
723 | </para> | ||
724 | |||
725 | <para> | ||
726 | Original text: | ||
727 | <literallayout class='monospaced'> | ||
728 | The simplest unit of meta-data is the configuration-only feature. It consists of | ||
729 | one or more Linux kernel configuration parameters in a .cfg file (as described | ||
730 | in section XYZ) and an scc file describing the fragment. The SMP fragment | ||
731 | included in the linux-yocto-3.4 git repository consists of the following two | ||
732 | files: | ||
733 | |||
734 | cfg/smp.scc: | ||
735 | define KFEATURE_DESCRIPTION "Enable SMP" | ||
736 | kconf hardware smp.cfg | ||
737 | |||
738 | cfg/smp.cfg: | ||
739 | CONFIG_SMP=y | ||
740 | CONFIG_SCHED_SMT=y | ||
741 | |||
742 | See 2.3.1 for details on creating configuration fragments. | ||
743 | |||
744 | KFEATURE_DESCRIPTION provides a short description of the fragment, the | ||
745 | primary use is for higher level tooling, such as the Yocto Project BSP Tools | ||
746 | (TODO:Citation). | ||
747 | |||
748 | The "kconf" command is used to include the actual configuration fragment in an | ||
749 | scc file, and the "hardware" keyword identifies the fragment as being hardware | ||
750 | enabling, as opposed to general policy (which would use the keyword | ||
751 | "non-hardware"). The distinction is made for the benefit of the configuration | ||
752 | validation tools which will warn you if a hardware fragment overrides a policy | ||
753 | set by a non-hardware fragment. | ||
754 | |||
755 | As described in 2.3.1, the following bitbake command can be used to audit your | ||
756 | configuration: | ||
757 | |||
758 | $ bitbake linux-yocto -c kernel_configcheck -f | ||
759 | |||
760 | The description file can include multiple kconf statements, one per fragment. | ||
761 | </literallayout> | ||
762 | </para> | ||
763 | </section> | ||
764 | |||
667 | 765 | ||
668 | 766 | ||
669 | 767 | ||