@@ -11,16 +11,126 @@ configuration that demonstrates certain key IoT usage. Examples of planned
1111profiles are industrial, gateway and computer vision, but others could be
1212included.
1313
14- .. _`meta-intel BSP` : https://www.yoctoproject.org/product/meta-intel-bsp-layer
14+ Each profile is defined in its own, self-contained layer. Each layer
15+ defines which other layers it depends on, both in the README.rst (for
16+ humans) and in the layer.conf (for tools like the layer index and Toaster).
17+
18+ The Reference Kit repository is built such that it integrates selected
19+ Yocto Project layers together and ensures that the content works
20+ seamlessly together. All external layers get imported as git
21+ submodules, using a revision that is known to work. Run :command: `git
22+ ls-tree HEAD | grep " commit " ` in the ``intel-iot-refkit `` repository to
23+ get the exact revision of each subcomponent that is used.
1524
16- The Reference Kit is built such that it integrates selected Yocto Project
17- layers together and ensures that the content works seamlessly together.
1825By default the Reference Kit runs on Intel's `meta-intel BSP `_ platforms.
1926
27+ .. _`meta-intel BSP` : https://www.yoctoproject.org/product/meta-intel-bsp-layer
28+
29+
2030.. _`Yocto Project release cadence` : https://wiki.yoctoproject.org/wiki/Planning#Roadmaps_and_Schedules
2131.. _`Yocto Project Bugzilla` : https://bugzilla.yoctoproject.org/
2232.. _`Yocto Project git` : http://git.yoctoproject.org/
2333
2434The Reference kit follows the `Yocto Project release cadence `_, keeps
2535the content in the `Yocto Project git `_ and uses the `Yocto Project Bugzilla `_
2636for feature and bug tracking.
37+
38+ Layer Overview and Reuse
39+ ########################
40+
41+ Layers
42+ ------
43+
44+ IoT Reference OS Kit supports using its layers also in other projects
45+ without using the Reference Kit distribution. Each layer is "Yocto
46+ Compatible 2.0", which guarantees that merely adding it to a build
47+ configuration does not change the build unless explicitly requested
48+ (for example, in local.conf, distro configurations, or image recipes).
49+
50+ Some of the content may depend on specific distribution configuration
51+ options. For specific usage instructions, see :file: `profiles.rst `.
52+
53+ Another caveat is that obviously not all combinations can be
54+ tested exhaustively. What gets tested is that each individual
55+ layer can be added to the ``Poky `` Yocto Project reference
56+ distribution and that they do not break a world build.
57+
58+ Full testing of features only happens on the refkit distribution
59+ itself, so that is the recommended starting point for someone who
60+ wants to try out something.
61+
62+ The ``intel-iot-refkit `` repository contains the following layers:
63+
64+ ``meta-refkit ``
65+ The distribution layer. Depends on all other layers.
66+
67+ ``meta-refkit-extra ``
68+ Demos that run on top of the Reference Kit distribution and
69+ thus depends on ``meta-refkit ``.
70+
71+ ``meta-refkit-core ``
72+ Common utility classes and miscellaneous recipes which are not
73+ profile-specific. The only hard dependency of this layer is
74+ ``openembedded-core ``. :file: `meta-refkit-core/conf/layer.conf `
75+ automatically detects available layers and enables content
76+ based on that. When providing recipes via some other layer,
77+ override the ``HAVE_... `` variables from that :file: `layer.conf `.
78+ For example, the ``dm-verity `` support depends on ``cryptsetup ``,
79+ which could be provided either by adding ``meta-security `` or
80+ copying the recipe into a distro-specific layer. In the latter
81+ case, ``HAVE_CRYPTSETUP `` has to be set.
82+
83+ ``meta-refkit-computervision/gateway/... ``
84+ Profile layers. See also :file: `profiles.rst `.
85+
86+ Note that ``meta-<something> `` is the directory containing the layer
87+ called ``<something> ``, although in practice ``meta-<something> `` and
88+ "the ``<something> `` layer" are often used interchangeably.
89+
90+
91+ Common Features
92+ ---------------
93+
94+ The reusable part of the distro configuration (package configuration,
95+ default distro features, etc.) is made available to other distros via
96+ :file: `meta-refkit-core/conf/distro/include/refkit-config.inc `.
97+
98+ To reuse the distro configuration in addition to the layer content:
99+
100+ * Add ``require "conf/distro/include/refkit-config.inc" ``, *and *
101+ * use enable same distro features as the refkit distro (in particular, systemd)
102+ with ``require "conf/distro/include/enable-refkit-config.inc ``,
103+ * *or * choose individual distro features to match your needs.
104+
105+ These changes can go into file:`local.conf ` or a custom distro
106+ configuration file.
107+
108+ See file:`refkit-config.inc ` for a description of the currently
109+ supported special distro features.
110+
111+
112+ Supported Recipes
113+ -----------------
114+
115+ The Reference Kit distribution uses ``supported-recipes.bbclass `` to
116+ control which recipes are part of the distribution. It uses explicit,
117+ complete lists of recipes that are part of a project and thus is
118+ easier to review and maintain. Accidentally pulling in additional
119+ content triggers a warning or error (depending on the configuration)
120+ which explains the dependency that pulled in the content.
121+
122+ For example, although several layers from ``meta-openembedded `` are
123+ required for a build, only a well-chosen and tested subset of it is
124+ really needed. The rest will not be part of a ``bitbake world `` build
125+ either.
126+
127+ This mechanism is completely optional. The individual layers do not
128+ track the recipes that they need, only the ``refkit `` distro layer and
129+ its ``refkit-extra `` add-on layer have such a list in
130+ :file: `meta-refkit/conf/distro/include/refkit-supported-recipes.txt `
131+ and
132+ :file: `meta-refkit-extra/conf/distro/include/refkit-extra-supported-recipes.txt `.
133+
134+ Projects which want to use the same mechanism can do so via their
135+ distro or local configuration, similar to how :file: `refkit.conf ` in
136+ ``meta-refkit `` does it.
0 commit comments