diff options
author | Fabien Proriol <fabien.proriol@kazoe.org> | 2025-05-23 18:30:47 +0200 |
---|---|---|
committer | Fabien Proriol <fabien.proriol@kazoe.org> | 2025-05-23 18:30:47 +0200 |
commit | 09783505e865bab1626fa70b15ea64c6e782fd4a (patch) | |
tree | 24db454ef45f09c464c4fbb6f8cfa354b664e7fd | |
parent | 5840b7823d8b03c249da2d3ed31514cc41f80cbf (diff) |
Add default conf and tools
-rw-r--r-- | conf/distro/kazoe.conf | 61 | ||||
-rw-r--r-- | conf/layer.conf | 13 | ||||
-rw-r--r-- | conf/templates/default/bblayers.conf.sample | 16 | ||||
-rw-r--r-- | conf/templates/default/conf-notes.txt | 19 | ||||
-rw-r--r-- | conf/templates/default/local.conf.sample | 133 | ||||
-rw-r--r-- | conf/templates/default/site.conf.sample | 33 | ||||
-rw-r--r-- | conf/templates/templateconf | 1 | ||||
-rwxr-xr-x | tools/oe-init-build-env | 11 |
8 files changed, 287 insertions, 0 deletions
diff --git a/conf/distro/kazoe.conf b/conf/distro/kazoe.conf new file mode 100644 index 0000000..dfecc4c --- /dev/null +++ b/conf/distro/kazoe.conf @@ -0,0 +1,61 @@ +DISTRO = "kazoe" +DISTRO_NAME = "kazoe" +DISTRO_CODENAME = "KaZoe" +MAINTAINER = "Fabien Proriol <fabien.proriol@kazoe.org>" + +DISTRO_VERSION_RELEASE = "0" +DISTRO_VERSION_FLAG = "" +DISTRO_VERSION_HOTFIX = "" + +SDK_VERSION_MINOR = "0" +SDK_VERSION_RELEASE = "1" +SDK_REVISION = "10" +SDK_DESCRIPTION = "SDK for KaZoe" +SDK_FORMAT = "deb" + + +DISTRO_FEATURES_COMMON = " pam polkit xdg waylan " + +DISTRO_VERSION_MAJOR_scarthgap = "5" +DISTRO_VERSION_MINOR_scarthgap = "0" + +DISTRO_VERSION_MAJOR = "${DISTRO_VERSION_MAJOR_${LAYERSERIES_CORENAMES}}" +DISTRO_VERSION_MINOR = "${DISTRO_VERSION_MINOR_${LAYERSERIES_CORENAMES}}" + +DISTRO_VERSION = "${DISTRO_VERSION_MAJOR}.${DISTRO_VERSION_MINOR}.${DISTRO_VERSION_RELEASE}${DISTRO_VERSION_FLAG}${DISTRO_VERSION_HOTFIX}" +SDK_VENDOR = "-kazoe" +SDK_VERSION = "${@d.getVar('DISTRO_CODENAME', 1).upper()}-${DISTRO_VERSION_MAJOR}.${DISTRO_VERSION_MINOR}.${SDK_VERSION_MINOR}" +TARGET_VENDOR = "-kazoe" +ROOT_HOME = "/root" + +SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}" +SDKPATH = "/opt/sdk/kazoe-{SDK_VERSION}" + +TOOLCHAIN_HOST_TASK = "nativesdk-packagegroup-sdk-host packagegroup-cross-canadian-${MACHINE} " +TOOLCHAIN_TARGET_TASK = "packagegroup-core-standalone-sdk-target packagegroup-core-standalone-sdk-target-dbg" +SDKIMAGE_FEATURES = "dev-pkgs staticdev-pkgs" + +USER_CLASSES ?= "buildstats" + +DISTRO_INIT_MODE ?= "SYSTEMD" +DISTRO_FEATURES_COMMON ?= " ${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} largefile opengl " +DISTRO_FEATURES_SYSTEMD ?= " systemd " +DISTRO_FEATURES_SYSTEMV ?= " sysvinit " +DISTRO_FEATURES = "${DISTRO_FEATURES_COMMON} ${DISTRO_FEATURES_EXTENDS} ${DISTRO_FEATURES_${DISTRO_INIT_MODE}}" +INIT_MANAGER = "${@bb.utils.contains('DISTRO_INIT_MODE', 'SYSTEMD', 'systemd', 'sysvinit', d)}" + +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + + +PACKAGE_CLASSES = "package_deb" + +QEMU_TARGETS = "aarch64 x86_64" +TOOLCHAIN = "gcc" + + +KAZOE_USER ?= "root" + +# Manage Qt6 +QT_QPA_DEFAULT_PLATFORM:pn-qtbase:class-target = "eglfs" +PACKAGECONFIG_GRAPHICS:pn-qtbase:class-target = " wayland opengl kms gbm gles2 eglfs " diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..6ec38ab --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,13 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH := "${BBPATH}:${LAYERDIR}" + +# We have a packages directory, add to BBFILES +BBFILES := "${BBFILES} \ + ${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-kazoe" +BBFILE_PATTERN_meta-kazoe := "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-kazoe = "10" + +LAYERSERIES_COMPAT_meta-kazoe = "scarthgap" diff --git a/conf/templates/default/bblayers.conf.sample b/conf/templates/default/bblayers.conf.sample new file mode 100644 index 0000000..91cc3d3 --- /dev/null +++ b/conf/templates/default/bblayers.conf.sample @@ -0,0 +1,16 @@ +# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +LCONF_VERSION = "6" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" + +BBLAYERS ?= " \ + ##COREBASE##/meta-yocto/meta \ + ##COREBASE##/meta-oe/meta-filesystems \ + ##COREBASE##/meta-oe/meta-oe \ + ##COREBASE##/meta-oe/meta-python \ + ##COREBASE##/meta-oe/meta-networking \ + ##COREBASE##/meta-qt6 \ + ##COREBASE##/meta-kazoe \ + " diff --git a/conf/templates/default/conf-notes.txt b/conf/templates/default/conf-notes.txt new file mode 100644 index 0000000..cfd1f19 --- /dev/null +++ b/conf/templates/default/conf-notes.txt @@ -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 diff --git a/conf/templates/default/local.conf.sample b/conf/templates/default/local.conf.sample new file mode 100644 index 0000000..0605211 --- /dev/null +++ b/conf/templates/default/local.conf.sample @@ -0,0 +1,133 @@ +# +# Machine Selection +MACHINE ??= "qemux86" + +# +# Where to place downloads +DL_DIR ?= "${TOPDIR}/../downloads" + +# The default is a tmp directory under TOPDIR. +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 = "kazoe" + + +# +# SDK target architecture +SDKMACHINE ?= "x86_64" + +# +# Extra image configuration defaults +# +# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated +# images. Some of these options are added to certain image types automatically. The +# variable can contain the following options: +# "dbg-pkgs" - add -dbg packages for all installed packages +# (adds symbol information for debugging/profiling) +# "src-pkgs" - add -src packages for all installed packages +# (adds source code for debugging) +# "dev-pkgs" - add -dev packages for all installed packages +# (useful if you want to develop against libs in the image) +# "ptest-pkgs" - add -ptest packages for all ptest-enabled packages +# (useful if you want to run the package test suites) +# "tools-sdk" - add development tools (gcc, make, pkgconfig etc.) +# "tools-debug" - add debugging tools (gdb, strace) +# "eclipse-debug" - add Eclipse remote debugging support +# "tools-profile" - add profiling tools (oprofile, lttng, valgrind) +# "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.) +# "debug-tweaks" - make an image suitable for development +# e.g. ssh root access has a blank password +# There are other application targets that can be used here too, see +# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details. +# We default to enabling the debugging tweaks. +EXTRA_IMAGE_FEATURES ?= "" + +# +# Additional image features +# +# The following is a list of additional classes to use when building images which +# enable extra features. Some available options which can be included in this variable +# are: +# - 'buildstats' collect build statistics +USER_CLASSES ?= "buildstats" + + +# Interactive shell configuration +# +# Under certain circumstances the system may need input from you and to do this it +# can launch an interactive shell. It needs to do this since the build is +# multithreaded and needs to be able to handle the case where more than one parallel +# process may require the user's attention. The default is iterate over the available +# terminal types to find one that works. +# +# Examples of the occasions this may happen are when resolving patches which cannot +# be applied, to use the devshell or the kernel menuconfig +# +# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none +# Note: currently, Konsole support only works for KDE 3.x due to the way +# newer Konsole versions behave +#OE_TERMINAL = "auto" +# By default disable interactive patch resolution (tasks will just fail instead): +PATCHRESOLVE = "noop" + +# +# Disk Space Monitoring during the build +# +# Monitor the disk space during the build. If there is less that 1GB of space or less +# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully +# shutdown the build. If there is less than 100MB or 1K inodes, perform a hard halt +# of the build. The reason for this is that running completely out of space can corrupt +# files and damages the build in ways which may not be easily recoverable. +# It's necessary to monitor /tmp, if there is no space left the build will fail +# with very exotic errors. +BB_DISKMON_DIRS ??= "\ + STOPTASKS,${TMPDIR},1G,100K \ + STOPTASKS,${DL_DIR},1G,100K \ + STOPTASKS,${SSTATE_DIR},1G,100K \ + STOPTASKS,/tmp,100M,100K \ + HALT,${TMPDIR},100M,1K \ + HALT,${DL_DIR},100M,1K \ + HALT,${SSTATE_DIR},100M,1K \ + HALT,/tmp,10M,1K" + +# Hash Equivalence +# +# Enable support for automatically running a local hash equivalence server and +# instruct bitbake to use a hash equivalence aware signature generator. Hash +# equivalence improves reuse of sstate by detecting when a given sstate +# artifact can be reused as equivalent, even if the current task hash doesn't +# match the one that generated the artifact. +# +# A shared hash equivalent server can be set with "<HOSTNAME>:<PORT>" format +# +#BB_HASHSERVE = "auto" +#BB_SIGNATURE_HANDLER = "OEEquivHash" + +# +# Memory Resident Bitbake +# +# Bitbake's server component can stay in memory after the UI for the current command +# has completed. This means subsequent commands can run faster since there is no need +# for bitbake to reload cache files and so on. Number is in seconds, after which the +# server will shut down. +# +#BB_SERVER_TIMEOUT = "60" + +# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to +# track the version of this file when it was generated. This can safely be ignored if +# this doesn't mean anything to you. +CONF_VERSION = "2" +INHERIT += "rm_work" +#RM_WORK_EXCLUDE += "" + +# Configure WORKSPACE for developer +# INHERIT += "externalsrc" +# EXTERNALSRC:pn-toto = "/tmp/toto" diff --git a/conf/templates/default/site.conf.sample b/conf/templates/default/site.conf.sample new file mode 100644 index 0000000..5164fed --- /dev/null +++ b/conf/templates/default/site.conf.sample @@ -0,0 +1,33 @@ +# +# 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/" + diff --git a/conf/templates/templateconf b/conf/templates/templateconf new file mode 100644 index 0000000..2eecff9 --- /dev/null +++ b/conf/templates/templateconf @@ -0,0 +1 @@ +TEMPLATECONF=${TEMPLATECONF:-/meta-kazoe/conf/templates/default} diff --git a/tools/oe-init-build-env b/tools/oe-init-build-env new file mode 100755 index 0000000..2ae4f63 --- /dev/null +++ b/tools/oe-init-build-env @@ -0,0 +1,11 @@ +export BASH_SOURCE="$(pwd)/oe-init-build-env" +export OEROOT=$(pwd) +export PATH=$(pwd)/:$(pwd)/meta-kazoe/tools/:$PATH + +BUILD_DIR=$1 +BUILD_CONF_DIR=$(pwd)/$BUILD_DIR/conf +export YOCTO_ROOT_DIR=$(pwd) + +. $(pwd)/meta-yocto/oe-init-build-env $* + +export BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS YOCTO_ROOT_DIR" |