Skip to contentSkip to conversation

meta-poky/conf/templates/default/bblayers.conf.sample: do not assume integrated poky repo

PATCH New Alexander Kanavin 1 participant 3 messages Jun 3, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 meta-poky/conf/templates/default/bblayers.conf.sample: do not assume integrated poky repo

From: Alexander Kanavin <[email protected]>

The list of layers was written assuming the template is used with the 'integrated' poky checkout, where content of meta-yocto is 'overlaid' on content of openembedded-core, and the layers are all in the same top level poky repository directory.

This doesn't work when oe-core and meta-yocto are cloned separately, where relative path that starts from oe-core would have to go one level above oe-core and then go into meta-yocto, assuming the separate repo clones are in the same top level directory.

This requires a custom tweak to bblayers.conf when it makes its way from meta-yocto into poky that would strip the ../meta-yocto/ part in BBLAYERS. As there are already numerous other tweaks of similar nature, I think this is feasible.

This was prompted by
https://lists.openembedded.org/g/openembedded-architecture/topic/layer_layout_poky_vs/111010762

---
 meta-poky/conf/templates/default/bblayers.conf.sample | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-poky/conf/templates/default/bblayers.conf.sample +2 -2
index 8b1cbdfc5c4..d34b552cb71 100644
@@ -7,6 +7,6 @@ BBFILES ?= ""
 
 BBLAYERS ?= " \
   ##OEROOT##/meta \
-  ##OEROOT##/meta-poky \
-  ##OEROOT##/meta-yocto-bsp \
+  ##OEROOT##/../meta-yocto/meta-poky \
+  ##OEROOT##/../meta-yocto/meta-yocto-bsp \
   "
Signature · 1 line
2.39.5
#1 lore raw

PATCH 2/3 meta-poky/conf/templates: add a blank template

From: Alexander Kanavin <[email protected]>

The default oe-core/poky templates have a number of settings (such as distro and machine) and are thus unsuitable for building up configurations from fragments. This adds a template with an empty local.conf, so that it can be used as the starting point for fragment-driven configuration.

There will also be a blank template in oe-core; the difference is that this one includes poky layers and the oe-core one does not.

---
 .../conf/templates/blank/bblayers.conf.sample | 12 ++++++++++++
 meta-poky/conf/templates/blank/conf-notes.txt | 19 +++++++++++++++++++
 .../conf/templates/blank/conf-summary.txt     |  1 +
 .../conf/templates/blank/local.conf.sample    | 10 ++++++++++
 4 files changed, 42 insertions(+)
 create mode 100644 meta-poky/conf/templates/blank/bblayers.conf.sample
 create mode 100644 meta-poky/conf/templates/blank/conf-notes.txt
 create mode 100644 meta-poky/conf/templates/blank/conf-summary.txt
 create mode 100644 meta-poky/conf/templates/blank/local.conf.sample
meta-poky/conf/templates/blank/bblayers.conf.sample new file +12 -0
new file mode 100644
index 00000000000..d34b552cb71
@@ -0,0 +1,12 @@
+# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+POKY_BBLAYERS_CONF_VERSION = "2"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+
+BBLAYERS ?= " \
+  ##OEROOT##/meta \
+  ##OEROOT##/../meta-yocto/meta-poky \
+  ##OEROOT##/../meta-yocto/meta-yocto-bsp \
+  "
meta-poky/conf/templates/blank/conf-notes.txt new file +19 -0
new file mode 100644
index 00000000000..cfd1f1977bf
@@ -0,0 +1,19 @@
+
+### Shell environment set up for builds. ###
+
+You can now run 'bitbake <target>'
+
+Common targets are:
+    core-image-minimal
+    core-image-full-cmdline
+    core-image-sato
+    core-image-weston
+    meta-toolchain
+    meta-ide-support
+
+You can also run generated qemu images with a command like 'runqemu qemux86-64'.
+
+Other commonly useful commands are:
+ - 'devtool' and 'recipetool' handle common recipe tasks
+ - 'bitbake-layers' handles common layer tasks
+ - 'oe-pkgdata-util' handles common target package tasks
meta-poky/conf/templates/blank/conf-summary.txt new file +1 -0
new file mode 100644
index 00000000000..7528c297947
@@ -0,0 +1 @@
+This configuration is empty and is intended as a starting point for adding configuration fragments.
meta-poky/conf/templates/blank/local.conf.sample new file +10 -0
new file mode 100644
index 00000000000..41eea8506df
@@ -0,0 +1,10 @@
+#
+# This file is intended for local configuration tweaks. It is intentionally
+# set up empty, so that configuration can be constructed from fragments
+# using bitbake-config-build tool and by setting MACHINE and DISTRO here.
+#
+# If you would like to publish this file (for example as a bitbake
+# configuration template), it is recommended to create fragments
+# from changes made here; the only settings that can remain are
+# MACHINE and DISTRO.
+#
Signature · 1 line
2.39.5
#2 lore raw

PATCH 3/3 meta-poky: add fragments for poky/poky-altcfg/poky-tiny distros

In reply to Alexander Kanavin

From: Alexander Kanavin <[email protected]>

This is a building block for bitbake-setup official yocto configurations.

---
 meta-poky/conf/fragments/distros/poky-altcfg.conf |  9 +++++++++
 meta-poky/conf/fragments/distros/poky-tiny.conf   | 10 ++++++++++
 meta-poky/conf/fragments/distros/poky.conf        |  5 +++++
 3 files changed, 24 insertions(+)
 create mode 100644 meta-poky/conf/fragments/distros/poky-altcfg.conf
 create mode 100644 meta-poky/conf/fragments/distros/poky-tiny.conf
 create mode 100644 meta-poky/conf/fragments/distros/poky.conf
meta-poky/conf/fragments/distros/poky-altcfg.conf new file +9 -0
new file mode 100644
index 00000000000..f89decb8b75
@@ -0,0 +1,9 @@
+BB_CONF_FRAGMENT_SUMMARY = "Use Yocto project's reference and testing distribution 'poky', with alternative configuration."
+BB_CONF_FRAGMENT_DESCRIPTION = "Poky is a distribution defined by Yocto project for reference and testing purposes. It can be used as a starting point for product development work \
+but it is recommended to create a separate distribution for shipping products. \
+\
+This selects 'poky-altcfg', an alternative configuration that is mostly same as poky, but makes a number of changes: \
+such as systemd as init manager, and an older LTS kernel (when available). Check meta-poky/conf/distro/poky-altcfg.conf for details. \
+"
+
+DISTRO ?= "poky-altcfg"
meta-poky/conf/fragments/distros/poky-tiny.conf new file +10 -0
new file mode 100644
index 00000000000..fae7621fe77
@@ -0,0 +1,10 @@
+BB_CONF_FRAGMENT_SUMMARY = "Use Yocto project's reference and testing distribution 'poky', with tiny systems configuration."
+BB_CONF_FRAGMENT_DESCRIPTION = "Poky is a distribution defined by Yocto project for reference and testing purposes. It can be used as a starting point for product development work \
+but it is recommended to create a separate distribution for shipping products. \
+\
+This selects 'poky-tiny', an alternative configuration that is intended to define a tiny Linux system comprised the kernel and busybox. \
+Poky-tiny sets basic distribution policy to ensure a usable system while still \
+keeping the rootfs and kernel image as small as possible. \
+"
+
+DISTRO ?= "poky-tiny"
meta-poky/conf/fragments/distros/poky.conf new file +5 -0
new file mode 100644
index 00000000000..8b9d7226a2f
@@ -0,0 +1,5 @@
+BB_CONF_FRAGMENT_SUMMARY = "Use Yocto project's reference and testing distribution 'poky'."
+BB_CONF_FRAGMENT_DESCRIPTION = "Poky is a distribution defined by Yocto project for reference and testing purposes. It can be used as a starting point for product development work \
+but it is recommended to create a separate distribution for shipping products."
+
+DISTRO ?= "poky"
Signature · 1 line
2.39.5