Skip to contentSkip to conversation

meta/conf/templates: add a blank template

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 meta/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 poky; the difference is that this one includes only oe-core and the poky one adds poky layers.

---
 .../conf/templates/blank/bblayers.conf.sample | 10 ++++++++++
 meta/conf/templates/blank/conf-notes.txt      | 19 +++++++++++++++++++
 meta/conf/templates/blank/conf-summary.txt    |  1 +
 meta/conf/templates/blank/local.conf.sample   | 10 ++++++++++
 4 files changed, 40 insertions(+)
 create mode 100644 meta/conf/templates/blank/bblayers.conf.sample
 create mode 100644 meta/conf/templates/blank/conf-notes.txt
 create mode 100644 meta/conf/templates/blank/conf-summary.txt
 create mode 100644 meta/conf/templates/blank/local.conf.sample
meta/conf/templates/blank/bblayers.conf.sample new file +10 -0
new file mode 100644
index 00000000000..c985f4f2420
@@ -0,0 +1,10 @@
+# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+LCONF_VERSION = "7"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+
+BBLAYERS ?= " \
+  ##OEROOT##/meta \
+  "
meta/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/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/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
#1 lore raw

PATCH 2/4 conf/fragments: add fragments for qemux86-64 and qemuarm64

From: Alexander Kanavin <[email protected]>

These will be used by official bitbake-setup configurations, and so let's start with them :) Plenty more fragments can be added over time.

---
 meta/conf/fragments/machines/qemuarm64.conf  | 5 +++++
 meta/conf/fragments/machines/qemux86-64.conf | 5 +++++
 2 files changed, 10 insertions(+)
 create mode 100644 meta/conf/fragments/machines/qemuarm64.conf
 create mode 100644 meta/conf/fragments/machines/qemux86-64.conf
meta/conf/fragments/machines/qemuarm64.conf new file +5 -0
new file mode 100644
index 00000000000..0fc164541d5
@@ -0,0 +1,5 @@
+BB_CONF_FRAGMENT_SUMMARY = "Use qemuarm64 as a target MACHINE, suitable for running in QEMU system emulator."
+BB_CONF_FRAGMENT_DESCRIPTION = "Select qemuarm64 as the target machine. This is the best option for running the target system inside QEMU emulator on arm64 build hosts, \
+as it allows near-native performance with kvm acceleration. Also useful for testing arm64 specific assembly code or compiler output."
+
+MACHINE ?= "qemuarm64"
meta/conf/fragments/machines/qemux86-64.conf new file +5 -0
new file mode 100644
index 00000000000..0fce37c4e2e
@@ -0,0 +1,5 @@
+BB_CONF_FRAGMENT_SUMMARY = "Use qemux86-64 as a target MACHINE, suitable for running in QEMU system emulator."
+BB_CONF_FRAGMENT_DESCRIPTION = "Select qemux86-64 as the target machine. This is the best option for running the target system inside QEMU emulator on x86-64 build hosts, \
+as it allows near-native performance with kvm acceleration. Also useful for testing x86-64 specific assembly code or compiler output."
+
+MACHINE ?= "qemux86-64"
Signature · 1 line
2.39.5
#2 lore raw

PATCH 3/4 conf/fragments: add a fragment for CDN sstate mirror

In reply to Alexander Kanavin

From: Alexander Kanavin <[email protected]>

This will be used in bitbake-setup official configurations and it will be awesome.

---
 meta/conf/fragments/yocto/sstate-mirror-cdn.conf | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 meta/conf/fragments/yocto/sstate-mirror-cdn.conf
meta/conf/fragments/yocto/sstate-mirror-cdn.conf new file +12 -0
new file mode 100644
index 00000000000..e204975ce3b
@@ -0,0 +1,12 @@
+BB_CONF_FRAGMENT_SUMMARY = "Use prebuilt sstate artifacts for standard Yocto build configurations."
+BB_CONF_FRAGMENT_DESCRIPTION = "The Yocto Project has prebuilt artefacts available for standard build configurations. \
+This fragment enables their use. This will mean the build will query the \
+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 \
+"
+
+BB_HASHSERVE_UPSTREAM = 'wss://hashserv.yoctoproject.org/ws'
+SSTATE_MIRRORS ?= "file://.* http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
Signature · 1 line
2.39.5
#3 lore raw

PATCH 4/4 fragments/qemu: add support for enabling sdl in qemu

In reply to Alexander Kanavin

From: Alexander Kanavin <[email protected]>

This has been the default in poky's local.conf template for a long time, but it's not enabled directly in poky distro. To allow better sstate reuse and a better user experience on a typical laptop (qemu will pop up a graphical window directly), let's add this fragment and enable it in official bitbake-setup configurations.

---
 meta/conf/fragments/qemu/enable-native-sdl.conf | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 meta/conf/fragments/qemu/enable-native-sdl.conf
meta/conf/fragments/qemu/enable-native-sdl.conf new file +8 -0
new file mode 100644
index 00000000000..21c1298171e
@@ -0,0 +1,8 @@
+BB_CONF_FRAGMENT_SUMMARY = "Enable SDL support for direct graphical output on the build host."
+BB_CONF_FRAGMENT_DESCRIPTION = "By default qemu is built with a internal VNC server \
+support. To see graphical output from the guest system, one can use a VNC client to \
+connect to it. This fragment enables Simple Directmedia Layer support, which allows \
+seeing the graphical output from guest directly in a X/Wayland session on the build host machine. \
+"
+
+PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
Signature · 1 line
2.39.5