meta-poky: remove the default template
PATCH v2 1/1 meta-poky: remove the default template
It is largely duplicating oe-core's template (with addition of some poky-specific items and minor differences, see below), and has issues such as assuming a particular layer layout, and pre-selecting a particular DISTRO and MACHINE.
Rather than continuing to maintain both templates, let's transition to the oe-core template as a starting point (when not using bitbake-setup).
To get poky one from oe-core template would need to initialize as usual with oe-init-build-env, then add the two layers in meta-yocto repo, and set a DISTRO (both can be done from command line without having to do manual edits).
These are the differences between templates, with my explanation about why I think they do not need to be reconciled or carried over to oe-core:
diff -uNr meta-poky/conf/templates/default/bblayers.conf.sample ../openembedded-core/meta/conf/templates/default/bblayers.conf.sample
--- meta-poky/conf/templates/default/bblayers.conf.sample 2026-02-17 12:17:55.599510358 +0100
+++ ../openembedded-core/meta/conf/templates/default/bblayers.conf.sample 2026-02-06 14:34:36.078136263 +0100
@@ -1,12 +1,10 @@
-# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
+# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
-POKY_BBLAYERS_CONF_VERSION = "2"
+LCONF_VERSION = "7"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
##OEROOT##/meta \
- ##OEROOT##/../meta-yocto/meta-poky \
- ##OEROOT##/../meta-yocto/meta-yocto-bsp \
"POKY_BBLAYERS_CONF_VERSION is used in meta-poky/classes/poky-sanity.bbclass to check against REQUIRED_POKY_BBLAYERS_CONF_VERSION version and auto-rewrite conf/bblayers.conf (particularly to rename meta-yocto -> meta-poky, which happened in 2016).
If oe-core template is used (or bblayers.conf is generated by bitbake-setup), then poky-sanity code doesn't do anything useful (or is even executed as it is guarded by presence of POKY_BBLAYERS_CONF_VERSION).
diff -uNr meta-poky/conf/templates/default/conf-summary.txt ../openembedded-core/meta/conf/templates/default/conf-summary.txt --- meta-poky/conf/templates/default/conf-summary.txt 2026-02-17 12:17:55.599510358 +0100 +++ ../openembedded-core/meta/conf/templates/default/conf-summary.txt 2026-02-06 14:34:36.078136263 +0100 @@ -1 +1 @@ -This is the default build configuration for the Poky reference distribution. +This is the default build configuration for the openembedded-core layer. diff -uNr meta-poky/conf/templates/default/local.conf.sample ../openembedded-core/meta/conf/templates/default/local.conf.sample --- meta-poky/conf/templates/default/local.conf.sample 2026-02-17 12:17:55.599510358 +0100 +++ ../openembedded-core/meta/conf/templates/default/local.conf.sample 2026-02-13 11:35:38.470911235 +0100 @@ -25,14 +25,6 @@ #MACHINE ?= "qemux86" #MACHINE ?= "qemux86-64" # -# There are also the following hardware board target machines included for -# demonstration purposes: -# -#MACHINE ?= "beaglebone-yocto" -#MACHINE ?= "genericarm64" -#MACHINE ?= "genericx86" -#MACHINE ?= "genericx86-64" -# # This sets the default machine to be qemux86-64 if no other machine is selected: MACHINE ??= "qemux86-64"
These are poky-specific machines; oe-core template cannot refer to them. Modern machine selection should happen with built-in fragments.
@@ -81,20 +73,6 @@
#
#TMPDIR = "${TOPDIR}/tmp"
-#
-# Default policy config
-#
-# The distribution setting controls which policy settings are used as defaults. -# The default value is fine for general Yocto project use, at least initially. -# Ultimately when creating custom policy, people will likely end up subclassing -# these defaults.
-#
-DISTRO ?= "poky"
-# As an example of a subclass there is a "bleeding" edge policy configuration -# where many versions are set to the absolute latest code from the upstream -# source control systems. This is just mentioned here as an example, its not -# useful to most new users.
-# DISTRO ?= "poky-bleeding"
Modern distro selection is done with built-in fragments. Local.conf should not be confusing users with explicit reference to a DISTRO setting, especially if oe-core does not carry distro definitions that can be selected.
#
# Package Management configuration
@@ -107,8 +85,8 @@
# - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager) # - 'package_rpm' for rpm style packages
# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
-# OE-Core defaults to ipkg, whilst Poky defaults to rpm:
-# PACKAGE_CLASSES ?= "package_rpm"
+# We default to ipk (via meta/conf/distro/defaultsetup.conf included in meta/conf/bitbake.conf):
+#PACKAGE_CLASSES ?= "package_ipk"
rpm packaging is a poky-specific tweak; it does not need to be mentioned in oe-core.
#
# SDK target architecture
@@ -158,6 +136,7 @@
# - 'buildstats' collect build statistics
USER_CLASSES ?= "buildstats"
+
#
# Runtime testing of images
#
@@ -225,22 +204,6 @@
#file://.* https://someserver.tld/share/sstate/PATH;downloadfilename=PATH \
#file://.* file:///some/local/dir/sstate/PATH"
-#
-# Yocto Project SState Mirror
-#
-# The Yocto Project has prebuilt artefacts available for its releases, you can enable -# use of these by uncommenting some of the following lines. This will mean the build uses -# the network to check for artefacts at the start of builds, which does slow it down -# initially but it will then speed up the builds by not having to build things if they are -# present in the cache. It assumes you can download something faster than you can build it -# which will depend on your network.
-# Note: For this to work you also need hash-equivalence passthrough to the matching server -# There is a choice between our sstate server directly and a faster content delivery network -# (CDN) kindly provided by JSDelivr, uncomment one of the SSTATE_MIRRORS lines, not both. -# Using the CDN rather than the yoctoproject.org address is suggested/preferred. -#
-#BB_HASHSERVE_UPSTREAM = 'wss://hashserv.yoctoproject.org/ws' -#SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
These settings and this description are already provided in meta/conf/fragments/yocto/sstate-mirror-cdn.conf; the fragment also drops the outdated note about having a choice between two SSTATE_MIRRORS lines (as there is no such choice anymore).
# # Qemu configuration diff -uNr meta-poky/conf/templates/default/local.conf.sample.extended ../openembedded-core/meta/conf/templates/default/local.conf.sample.extended --- meta-poky/conf/templates/default/local.conf.sample.extended 2026-02-17 12:17:55.599510358 +0100 +++ ../openembedded-core/meta/conf/templates/default/local.conf.sample.extended 2026-02-06 14:34:36.078136263 +0100 @@ -31,10 +31,11 @@ #do_fetch[number_threads] = "4" # -# If you want to get an image based on directfb without x11 alter -# DISTRO_FEATURES: -DISTRO_FEATURES:append = " directfb" -DISTRO_FEATURES:remove = "x11" + +#DISTRO_FEATURES = "alsa bluetooth ext2 irda ipv4 ipv6 pcmcia usbgadget usbhost wifi nfs zeroconf pci" + +# If you want to get an image based on directfb without x11, Please copy this variable to build/conf/local.conf +#DISTRO_FEATURES = "alsa bluetooth ext2 irda ipv4 ipv6 pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g directfb"
How to set DISTRO_FEATURES is a matter of several strong opinions, with no consensus yet. Neither of the above is wrong. directfb is a long-obsolete technology and component.
# ENABLE_BINARY_LOCALE_GENERATION controls the generation of binary locale # packages at build time using qemu-native. Disabling it (by setting it to 0) @@ -178,13 +179,13 @@ # implications so they are disabled by default. To enable them, # un-comment the below as appropriate. #LICENSE_FLAGS_ACCEPTED = "commercial_gst-fluendo-mp3 \ -# commercial_gst-openmax \ -# commercial_gst-plugins-ugly \ -# commercial_lame \ -# commercial_libmad \ -# commercial_libomxil \ -# commercial_mpeg2dec \ -# commercial_qmmp" +# commercial_gst-openmax \ +# commercial_gst-plugins-ugly \ +# commercial_lame \ +# commercial_libmad \ +# commercial_libomxil \ +# commercial_mpeg2dec \ +# commercial_qmmp"
Whitespace difference only.
# @@ -263,7 +264,7 @@ # # By including the security_flags include file you enable flags # to the compiler and linker that cause them to generate more secure -# code. +# code, this is enabled by default in the poky-lsb distro. # This does affect compile speed slightly. # # Use the following line to enable the security compiler and linker flags to your build
poky-lasb has been removed long ago, and oe-core can't mention it anyway.
---
v2: add specific notes to the difference between templates, hopefully addressing concerns about whether anything needs reconcilation.
--- .templateconf | 2 - .../templates/default/bblayers.conf.sample | 12 - .../conf/templates/default/conf-notes.txt | 19 - .../conf/templates/default/conf-summary.txt | 1 - .../conf/templates/default/local.conf.sample | 285 ------------- .../default/local.conf.sample.extended | 388 ------------------ .../conf/templates/default/site.conf.sample | 33 -- 7 files changed, 740 deletions(-) delete mode 100644 .templateconf delete mode 100644 meta-poky/conf/templates/default/bblayers.conf.sample delete mode 100644 meta-poky/conf/templates/default/conf-notes.txt delete mode 100644 meta-poky/conf/templates/default/conf-summary.txt delete mode 100644 meta-poky/conf/templates/default/local.conf.sample delete mode 100644 meta-poky/conf/templates/default/local.conf.sample.extended delete mode 100644 meta-poky/conf/templates/default/site.conf.sample
.templateconf deleted +0 -2
@@ -1,2 +0,0 @@ -# Template settings -TEMPLATECONF=${TEMPLATECONF:-meta-poky/conf/templates/default}
meta-poky/conf/templates/default/bblayers.conf.sample deleted +0 -12
@@ -1,12 +0,0 @@ -# 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/default/conf-notes.txt deleted +0 -19
@@ -1,19 +0,0 @@ - -### 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/default/conf-summary.txt deleted +0 -1
@@ -1 +0,0 @@ -This is the default build configuration for the Poky reference distribution.
meta-poky/conf/templates/default/local.conf.sample deleted +0 -285
285 lines not on this page · raw message
meta-poky/conf/templates/default/local.conf.sample.extended deleted +0 -388
388 lines not on this page · raw message
meta-poky/conf/templates/default/site.conf.sample deleted +0 -33
@@ -1,33 +0,0 @@ -# -# local.conf covers user settings, site.conf covers site specific information -# such as proxy server addresses and optionally any shared download location -# -# SITE_CONF_VERSION is increased each time build/conf/site.conf -# changes incompatibly -SCONF_VERSION = "1" - -# Uncomment to cause CVS to use the proxy host specified -#CVS_PROXY_HOST = "proxy.example.com" -#CVS_PROXY_PORT = "81" - -# For svn, you need to create ~/.subversion/servers containing: -#[global] -#http-proxy-host = proxy.example.com -#http-proxy-port = 81 -# - -# To use git with a proxy, you must use an external git proxy command, such as -# the one provided by scripts/oe-git-proxy. To use this script, copy it to -# your PATH and uncomment the following: -#GIT_PROXY_COMMAND ?= "oe-git-proxy" -#ALL_PROXY ?= "socks://socks.example.com:1080" -#or -#ALL_PROXY ?= "https://proxy.example.com:8080" -# If you wish to use certain hosts without the proxy, specify them in NO_PROXY. -# See the script for details on syntax. The script oe-git-proxy uses some tools -# that may not be included on HOSTTOOLS, thus add them manually through -# HOSTTOOLS += "getent" - -# Uncomment this to use a shared download directory -#DL_DIR = "/some/shared/download/directory/" -
Signature · 1 line
2.47.3
This TEMPLATECONF path is now wrong in the docs for manual-setup:
$TEMPLATECONF=$PWD/layers/meta-yocto/meta-poky/conf/templates/default source ./layers/openembedded-core/oe-init-build-env
Hi,
Quoted 5 lines · Ernst Persson via lists.yoctoproject.org
This TEMPLATECONF path is now wrong in the docs for manual-setup:
$TEMPLATECONF=$PWD/layers/meta-yocto/meta-poky/conf/templates/default source ./layers/openembedded-core/oe-init-build-env
Good catch thanks. Can you send a patch to [email protected] fix it?
Antonin
Hmm I'm not sure what it should be. Simply
source ./layers/openembedded-core/oe-init-build-env
then?
Den tors 9 apr. 2026 kl 16:37 skrev Antonin Godard < [email protected]>:
Quoted 17 lines
Hi,
Quoted 1 line · Ernst Persson via lists.yoctoproject.org
Quoted 4 lines
This TEMPLATECONF path is now wrong in the docs for manual-setup:
$TEMPLATECONF=$PWD/layers/meta-yocto/meta-poky/conf/templates/default
source ./layers/openembedded-core/oe-init-build-env
Good catch thanks. Can you send a patch to [email protected] fix it?
Antonin
Quoted 3 lines · Ernst Persson
Hmm I'm not sure what it should be. Simply
source ./layers/openembedded-core/oe-init-build-env
No, the openembedded-core also has templates in openembedded-core/meta/conf/templates/default, we just want to replace it with this one.
Thanks,
Antonin
I'd also note that poky template is mentioned in multiple places and they all need to be fixed:
alex@alex-lx-laptop:~/development/yocto-docs$ grep -ilr meta-poky/conf/templates * documentation/migration-guides/release-notes-5.3.rst documentation/dev-manual/licenses.rst documentation/dev-manual/poky-manual-setup.rst documentation/dev-manual/custom-template-configuration-directory.rst documentation/overview-manual/concepts.rst documentation/ref-manual/faq.rst documentation/ref-manual/structure.rst documentation/ref-manual/variables.rst
And this should be in migration guide too.
Alex
Quoted 21 lines · Antonin Godard via lists.yoctoproject.org
Quoted 3 lines · Ernst Persson
Hmm I'm not sure what it should be. Simply
source ./layers/openembedded-core/oe-init-build-env
No, the openembedded-core also has templates in openembedded-core/meta/conf/templates/default, we just want to replace it with this one.
Thanks,
Antonin-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13891): https://lists.yoctoproject.org/g/poky/message/13891
Mute This Topic: https://lists.yoctoproject.org/mt/118117366/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hi,
Quoted 14 lines · Alexander Kanavin
I'd also note that poky template is mentioned in multiple places and they all need to be fixed:
alex@alex-lx-laptop:~/development/yocto-docs$ grep -ilr meta-poky/conf/templates * documentation/migration-guides/release-notes-5.3.rst documentation/dev-manual/licenses.rst documentation/dev-manual/poky-manual-setup.rst documentation/dev-manual/custom-template-configuration-directory.rst documentation/overview-manual/concepts.rst documentation/ref-manual/faq.rst documentation/ref-manual/structure.rst documentation/ref-manual/variables.rst
Quoted 1 line
And this should be in migration guide too.
Yes I took care of that this morning, and I'll send patches shortly. Thanks.
Ernst, no need to send a patch for the poky-manual-setup document, it will be part of mine that replaces all occurrences.
Antonin