diff --git a/layers/meta-belden-coreos/classes/coreos_metadata_scm.bbclass b/layers/meta-belden-coreos/classes/coreos_metadata_scm.bbclass new file mode 100644 index 0000000..0bb6ec3 --- /dev/null +++ b/layers/meta-belden-coreos/classes/coreos_metadata_scm.bbclass @@ -0,0 +1,19 @@ +# This change the default value of variables defined into metadata_scm.bbclass +# Note that metadata_scm.bbclass is already ihnerited by the base class, so we +# don't need to add it here. + +def coreos_get_scmbasepath(d): + return os.path.normpath(os.path.join(d.getVar('COREBASE'), '../..')) + +def coreos_detect_revision(d): + path = coreos_get_scmbasepath(d) + return base_get_metadata_git_revision(path, d) + +def coreos_detect_branch(d): + path = coreos_get_scmbasepath(d) + return base_get_metadata_git_branch(path, d) + +# metadata_scm.bbclass set this two variable to the branch and revision of +# the openembedded-core layer +METADATA_BRANCH := "${@coreos_detect_branch(d)}" +METADATA_REVISION := "${@coreos_detect_revision(d)}" \ No newline at end of file diff --git a/layers/meta-belden-coreos/conf/distro/belden-coreos.conf b/layers/meta-belden-coreos/conf/distro/belden-coreos.conf new file mode 100644 index 0000000..0537f99 --- /dev/null +++ b/layers/meta-belden-coreos/conf/distro/belden-coreos.conf @@ -0,0 +1,54 @@ +DISTRO = "belden-coreos" +DISTRO_NAME = "Belden CoreOS" +MAINTAINER = "Belden CoreOS Team" + +INHERIT += "coreos_metadata_scm" + +DISTRO_VERSION = "0.0.1-${METADATA_BRANCH}+${METADATA_REVISION}" +DISTRO_CODENAME = "kirkstone" + +# Distro features and policies +# ============================================================================== + +PACKAGE_CLASSES = "package_ipk" +INIT_MANAGER = "systemd" + +DISTRO_FEATURES_DEFAULT ?= "bluetooth usbhost pci ipv4 ipv6 wifi multiarch usrmerge" +DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT}" +DISTRO_FEATURES_BACKFILL_CONSIDERED = "pulseaudio gobject-introspection-data ldconfig" +DISTRO_EXTRA_RDEPENDS += "packagegroup-core-boot" + +# Build configuration +# ============================================================================== + +TARGET_VENDOR = "-belden" + +# We don't support multiple libc, so we don't need to append the libc name to +# the tmp directory: ie use build/tmp instead of build/tmp-glibc +TCLIBCAPPEND = "" + +SANITY_TESTED_DISTROS ?= " \ + debian-11 \n \ + " + +require conf/distro/include/no-static-libs.inc +require conf/distro/include/yocto-uninative.inc +require conf/distro/include/security_flags.inc + +# uninative is need to share the sstates between multiple host distrubtion +INHERIT += "uninative" + +# Bitbake configuration +# ============================================================================== + +BB_SIGNATURE_HANDLER ?= "OEEquivHash" +BB_HASHSERVE ??= "auto" + +# SDK Configuration +# ============================================================================== + +SDK_VENDOR = "-coreossdk" +SDK_VERSION = "${DISTRO_VERSION}" +SDK_VERSION[vardepvalue] = "${SDK_VERSION}" +SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}" +SDKPATHINSTALL = "/opt/${DISTRO}/${SDK_VERSION}" diff --git a/layers/meta-belden-coreos/recipes-core/base-files/base-files/issue b/layers/meta-belden-coreos/recipes-core/base-files/base-files/issue new file mode 100644 index 0000000..bda6092 --- /dev/null +++ b/layers/meta-belden-coreos/recipes-core/base-files/base-files/issue @@ -0,0 +1,6 @@ + ____ _ _ _____ ____ _____ + | _ \\ | | | | / ____| / __ \\ / ____| + | |_) | ___| | __| | ___ _ __ | | ___ _ __ ___| | | | (___ + | _ < / _ \\ |/ _` |/ _ \\ '_ \\ | | / _ \\| '__/ _ \\ | | |\\___ \\ + | |_) | __/ | (_| | __/ | | | | |___| (_) | | | __/ |__| |____) | + |____/ \\___|_|\\__,_|\\___|_| |_| \\_____\\___/|_| \\___|\\____/|_____/ diff --git a/layers/meta-belden-coreos/recipes-core/base-files/base-files/issue.net b/layers/meta-belden-coreos/recipes-core/base-files/base-files/issue.net new file mode 100644 index 0000000..bda6092 --- /dev/null +++ b/layers/meta-belden-coreos/recipes-core/base-files/base-files/issue.net @@ -0,0 +1,6 @@ + ____ _ _ _____ ____ _____ + | _ \\ | | | | / ____| / __ \\ / ____| + | |_) | ___| | __| | ___ _ __ | | ___ _ __ ___| | | | (___ + | _ < / _ \\ |/ _` |/ _ \\ '_ \\ | | / _ \\| '__/ _ \\ | | |\\___ \\ + | |_) | __/ | (_| | __/ | | | | |___| (_) | | | __/ |__| |____) | + |____/ \\___|_|\\__,_|\\___|_| |_| \\_____\\___/|_| \\___|\\____/|_____/ diff --git a/layers/meta-belden-coreos/recipes-core/base-files/base-files_%.bbappend b/layers/meta-belden-coreos/recipes-core/base-files/base-files_%.bbappend new file mode 100644 index 0000000..ff91933 --- /dev/null +++ b/layers/meta-belden-coreos/recipes-core/base-files/base-files_%.bbappend @@ -0,0 +1,3 @@ +# File in the base-files subdirectory of this recipe should overwrite the +# same file in OE-Core +FILESEXTRAPATHS:prepend := "${THISDIR}/base-files:" diff --git a/layers/meta-belden-coreos/recipes-example/example/example_0.1.bb b/layers/meta-belden-coreos/recipes-example/example/example_0.1.bb deleted file mode 100644 index facaae3..0000000 --- a/layers/meta-belden-coreos/recipes-example/example/example_0.1.bb +++ /dev/null @@ -1,13 +0,0 @@ -SUMMARY = "bitbake-layers recipe" -DESCRIPTION = "Recipe created by bitbake-layers" -LICENSE = "MIT" - -python do_display_banner() { - bb.plain("***********************************************"); - bb.plain("* *"); - bb.plain("* Example recipe created by bitbake-layers *"); - bb.plain("* *"); - bb.plain("***********************************************"); -} - -addtask display_banner before do_build diff --git a/templates/local.conf.sample b/templates/local.conf.sample index 795c944..c7bb73f 100644 --- a/templates/local.conf.sample +++ b/templates/local.conf.sample @@ -70,29 +70,15 @@ MACHINE ??= "qemuarm64" # #TMPDIR = "${TOPDIR}/tmp" - # -# Package Management configuration +# Default policy config # -# This variable lists which packaging formats to enable. Multiple package backends -# can be enabled at once and the first item listed in the variable will be used -# to generate the root filesystems. -# Options are: -# - 'package_deb' for debian style deb files -# - '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" -# We default to ipk: -PACKAGE_CLASSES ?= "package_ipk" - +# 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. # -# SDK target architecture -# -# This variable specifies the architecture to build SDK items for and means -# you can build the SDK packages for architectures other than the machine you are -# running the build on (i.e. building i686 packages on an x86_64 host). -# Supported values are i686, x86_64, aarch64 -#SDKMACHINE ?= "i686" +DISTRO ?= "belden-coreos" # # Extra image configuration defaults @@ -129,7 +115,6 @@ EXTRA_IMAGE_FEATURES ?= "debug-tweaks" # - 'buildstats' collect build statistics USER_CLASSES ?= "buildstats" - # # Runtime testing of images # @@ -209,20 +194,6 @@ PACKAGECONFIG:append:pn-qemu-system-native = " sdl" PACKAGECONFIG:append:pn-nativesdk-qemu = " sdl" #ASSUME_PROVIDED += "libsdl2-native" -# -# 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 ":" format -# -#BB_HASHSERVE = "auto" -#BB_SIGNATURE_HANDLER = "OEEquivHash" - # # Memory Resident Bitbake #