Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 1fab28d

Browse files
authored
Merge pull request #147 from pohly/refkit-layers
refkit layers
2 parents bbffda6 + 72e88fc commit 1fab28d

195 files changed

Lines changed: 2347 additions & 1357 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@
3535
[submodule "meta-security"]
3636
path = meta-security
3737
url = https://git.yoctoproject.org/git/meta-security
38+
[submodule "meta-yocto"]
39+
path = meta-yocto
40+
url = https://git.yoctoproject.org/git/meta-yocto

README.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ the IoT Reference OS Kit for Intel(r) Architecture project.
77
Only Linux development hosts are currently supported, as documented
88
in the `Yocto Project Quick Start Guide`_
99

10+
Follow the instructions in this document when trying to get familiar with
11+
the IoT Reference OS Kit or when basing a new project on it. Alternatively,
12+
it is also possible to take a subset of the content and add it to other,
13+
existing projects or distributions. For information about the content, see
14+
:file:`doc/introduction.rst`.
15+
1016
.. _Yocto Project Quick Start Guide: http://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html#the-linux-distro
1117

1218
Installing Docker on Linux

doc/introduction.rst

Lines changed: 113 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,126 @@ configuration that demonstrates certain key IoT usage. Examples of planned
1111
profiles are industrial, gateway and computer vision, but others could be
1212
included.
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.
1825
By 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

2434
The Reference kit follows the `Yocto Project release cadence`_, keeps
2535
the content in the `Yocto Project git`_ and uses the `Yocto Project Bugzilla`_
2636
for 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.

docker/opensuse-42.2/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ RUN zypper --no-color --non-interactive ref -f && \
1010
zypper --no-color --non-interactive install --no-recommends python gcc \
1111
gcc-c++ git chrpath make wget python-xml diffstat makeinfo \
1212
python-curses patch socat libSDL-devel tar which unzip \
13+
net-tools iproute2 vim \
1314
python3 python3-curses glibc-locale syslinux
1415

1516
ENV JENKINS_HOME /var/lib/jenkins

meta-refkit/recipes-connectivity/caninitscripts/files/LICENSE renamed to meta-refkit-computervision/COPYING.MIT

File renamed without changes.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
This README file contains information on the contents of the
2+
refkit-computervision layer.
3+
4+
5+
Dependencies
6+
============
7+
8+
This layer depends on::
9+
10+
URI: git://git.openembedded.org/bitbake
11+
branch: master
12+
13+
URI: git://git.openembedded.org/openembedded-core
14+
layers: meta
15+
branch: master
16+
17+
URI: https://github.com/IntelRealSense/meta-intel-realsense.git
18+
layers: librealsense
19+
branch: master
20+
21+
URI: https://github.com/kraj/meta-clang.git
22+
layers: clang-layer
23+
branch: master
24+
25+
URI: http://git.openembedded.org/meta-openembedded
26+
layers: openembedded-layer
27+
branch: master
28+
29+
URI: https://github.com/intel/intel-iot-refkit
30+
layers: refkit-core
31+
branch: master
32+
33+
34+
Patches
35+
=======
36+
37+
See the "Submitting Patches" section in the top-level ``README.rst``.
38+
39+
40+
Adding the refkit-computervision layer to your build
41+
====================================================
42+
43+
See the "Layer Overview and Reuse" section in ``doc/introduction.rst``
44+
for details.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# We have a conf and classes directory, add to BBPATH
2+
BBPATH .= ":${LAYERDIR}"
3+
4+
# We have recipes-* directories, add to BBFILES
5+
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
6+
${LAYERDIR}/recipes-*/*/*.bbappend"
7+
8+
BBFILE_COLLECTIONS += "refkit-computervision"
9+
BBFILE_PATTERN_refkit-computervision = "^${LAYERDIR}/"
10+
BBFILE_PRIORITY_refkit-computervision = "6"
11+
12+
LAYERDEPENDS_refkit-computervision = "core librealsense clang-layer openembedded-layer refkit-core"

meta-refkit/recipes-computervision/librealsense/files/0001-examples-control-building-of-the-graphical-examples.patch renamed to meta-refkit-computervision/recipes-computervision/librealsense/files/0001-examples-control-building-of-the-graphical-examples.patch

File renamed without changes.

meta-refkit/recipes-computervision/librealsense/files/0001-scripts-removed-bashisms.patch renamed to meta-refkit-computervision/recipes-computervision/librealsense/files/0001-scripts-removed-bashisms.patch

File renamed without changes.

0 commit comments

Comments
 (0)