The image tests already provide good and rather minimal examples. As we
currently lack fully working examples, we move the existing test code
into an examples dir and symlink these into the image-tests dir. Further,
we reference (include) them in the documentation.
Creating dedicated examples has been considered, but as these are likely
hard to maintain this idea was dropped.
docs/userguide/getting-started.rst | 11 +++++--
docs/userguide/project-configuration.rst | 24 ++++++++++++++
examples/isar.yml | 41 +++++++++++++++++++++++
examples/openembedded.yml | 39 ++++++++++++++++++++++
image-tests/kas-isar/kas.yml | 42 +-----------------------
image-tests/kas/kas.yml | 40 +---------------------
6 files changed, 114 insertions(+), 83 deletions(-)
create mode 100644 examples/isar.yml
create mode 100644 examples/openembedded.yml
mode change 100644 => 120000 image-tests/kas-isar/kas.yml
mode change 100644 => 120000 image-tests/kas/kas.yml
diff --git a/docs/userguide/getting-started.rst b/docs/userguide/getting-started.rst
index 10b7fc54d..847959422 100644
--- a/docs/userguide/getting-started.rst
+++ b/docs/userguide/getting-started.rst
@@ -45,9 +45,14 @@ manually, e.g.::
$ kas shell /path/to/kas-project.yml -c 'bitbake dosfsutils-native'
-kas will place downloads and build artifacts under the current directory when
-being invoked. You can specify a different location via the environment
-variable `KAS_WORK_DIR`.
+For details about the kas input file(s), see
+:ref:`project-configuration-label`. Example configurations can be found in
+:ref:`example-configurations-label`.
+
+.. note::
+ kas will place downloads and build artifacts under the current directory when
+ being invoked. You can specify a different location via the environment
+ variable ``KAS_WORK_DIR``.
Use Cases
diff --git a/docs/userguide/project-configuration.rst b/docs/userguide/project-configuration.rst
index 878f9a17a..285d5c1d3 100644
--- a/docs/userguide/project-configuration.rst
+++ b/docs/userguide/project-configuration.rst
@@ -1,3 +1,5 @@
+.. _project-configuration-label:
+
Project Configuration
=====================
@@ -474,3 +476,25 @@ Configuration reference
outside of the container (on the host). This value is only evaluated by the
``kas-container`` script. It must not be set manually and might only be
defined in the top-level ``.config.yaml`` file.
+
+.. _example-configurations-label:
+
+Example project configurations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The following snippets show minimal but working project configurations for
+both OpenEmbedded and ISAR based distributions.
+
+OpenEmbedded
+------------
+
+.. literalinclude:: ../../examples/openembedded.yml
+ :language: YAML
+ :lines: 25-
+
+ISAR
+----
+
+.. literalinclude:: ../../examples/isar.yml
+ :language: YAML
+ :lines: 25-
diff --git a/examples/isar.yml b/examples/isar.yml
new file mode 100644
index 000000000..ae79ea765
--- /dev/null
+++ b/examples/isar.yml
@@ -0,0 +1,41 @@
+#
+# kas - setup tool for bitbake based projects
+#
+# Copyright (c) Siemens AG, 2022-2024
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+header:
+ version: 14
+
+build_system: isar
+
+machine: qemuamd64
+distro: debian-bullseye
+
+target: mc:qemuamd64-bullseye:cowsay
+
+repos:
+ isar:
+ url:
https://github.com/ilbers/isar.git
+ commit: 9dc362cd7115074c0f60843e687ed89db5c9339a
+ layers:
+ meta:
+ meta-isar:
diff --git a/examples/openembedded.yml b/examples/openembedded.yml
new file mode 100644
index 000000000..8e905a9a3
--- /dev/null
+++ b/examples/openembedded.yml
@@ -0,0 +1,39 @@
+#
+# kas - setup tool for bitbake based projects
+#
+# Copyright (c) Siemens AG, 2022-2024
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be
+# included in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+
+header:
+ version: 14
+
+machine: qemux86-64
+distro: poky
+
+target: zlib-native
+
+repos:
+ poky:
+ url:
https://git.yoctoproject.org/poky.git
+ commit: fb91a49387cfb0c8d48303bb3354325ba2a05587
+ layers:
+ meta:
+ meta-poky:
diff --git a/image-tests/kas-isar/kas.yml b/image-tests/kas-isar/kas.yml
deleted file mode 100644
index ae79ea765..000000000
--- a/image-tests/kas-isar/kas.yml
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# kas - setup tool for bitbake based projects
-#
-# Copyright (c) Siemens AG, 2022-2024
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-
-header:
- version: 14
-
-build_system: isar
-
-machine: qemuamd64
-distro: debian-bullseye
-
-target: mc:qemuamd64-bullseye:cowsay
-
-repos:
- isar:
- url:
https://github.com/ilbers/isar.git
- commit: 9dc362cd7115074c0f60843e687ed89db5c9339a
- layers:
- meta:
- meta-isar:
diff --git a/image-tests/kas-isar/kas.yml b/image-tests/kas-isar/kas.yml
new file mode 120000
index 000000000..912d517fa
--- /dev/null
+++ b/image-tests/kas-isar/kas.yml
@@ -0,0 +1 @@
+../../examples/isar.yml
\ No newline at end of file
diff --git a/image-tests/kas/kas.yml b/image-tests/kas/kas.yml
deleted file mode 100644
index 8e905a9a3..000000000
--- a/image-tests/kas/kas.yml
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# kas - setup tool for bitbake based projects
-#
-# Copyright (c) Siemens AG, 2022-2024
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-#
-
-header:
- version: 14
-
-machine: qemux86-64
-distro: poky
-
-target: zlib-native
-
-repos:
- poky:
- url:
https://git.yoctoproject.org/poky.git
- commit: fb91a49387cfb0c8d48303bb3354325ba2a05587
- layers:
- meta:
- meta-poky:
diff --git a/image-tests/kas/kas.yml b/image-tests/kas/kas.yml
new file mode 120000
index 000000000..8cdad7e30
--- /dev/null
+++ b/image-tests/kas/kas.yml
@@ -0,0 +1 @@
+../../examples/openembedded.yml
\ No newline at end of file
--
2.39.2