diff --git a/layers/meta-belden-coreos/classes/coreos-image.bbclass b/layers/meta-belden-coreos/classes/coreos-image.bbclass new file mode 100644 index 0000000..f643366 --- /dev/null +++ b/layers/meta-belden-coreos/classes/coreos-image.bbclass @@ -0,0 +1,48 @@ +# Class used to generate image based on Belden CoreOS + +# We don't ihnerit from core-image, so not all core-image specific IMAGE_FEATURE +# are available. Only theses one are supported: +FEATURE_PACKAGES_tools-debug = "packagegroup-core-tools-debug" +FEATURE_PACKAGES_tools-profile = "packagegroup-core-tools-profile" +FEATURE_PACKAGES_hwcodecs = "${MACHINE_HWCODECS}" + +MACHINE_HWCODECS ??= "" + +# These image features are CoreOS specifics: +# +# ssh-server: provide a ssh server, on core-image, two ssh server are supported +# and the features ssh-server-dropbear and ssh-server-openssh are +# available. For CoreOS, we only support dropbear +FEATURE_PACKAGES_ssh-server = "packagegroup-core-ssh-dropbear" + + +# We can handle feature that conflicts with either: + +# IMAGE_FEATURES_REPLACES_foo = 'bar1 bar2' +# Including image feature foo would replace the image features bar1 and bar2 + +# IMAGE_FEATURES_CONFLICTS_foo = 'bar1 bar2' +# An error exception would be raised if both image features foo and bar1(or bar2) are included + +COREOS_IMAGE_BASE_INSTALL = '\ + packagegroup-core-boot \ + packagegroup-base-extended \ + \ + ${COREOS_IMAGE_EXTRA_INSTALL} \ + ' + +COREOS_IMAGE_EXTRA_INSTALL ?= "" + +IMAGE_INSTALL ?= "${COREOS_IMAGE_BASE_INSTALL} ${COREOS_IMAGE_EXTRA_INSTALL}" + +# IMAGE_LINGUAS default value is set in image.bbclass, so we need to change it +# before ihneriting the image class, as we don't need to install custom locales +IMAGE_LINGUAS ?= " " + +inherit image + +# Enable some feature by default +IMAGE_FEATURES += "read-only-rootfs" + +# Add some extra space, as done in core-image-minimal +IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("DISTRO_FEATURES", "systemd", " + 4096", "", d)}" diff --git a/layers/meta-belden-coreos/classes/coreos_metadata_scm.bbclass b/layers/meta-belden-coreos/classes/coreos_metadata_scm.bbclass index 0bb6ec3..280c121 100644 --- a/layers/meta-belden-coreos/classes/coreos_metadata_scm.bbclass +++ b/layers/meta-belden-coreos/classes/coreos_metadata_scm.bbclass @@ -16,4 +16,4 @@ def coreos_detect_branch(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 +METADATA_REVISION := "${@coreos_detect_revision(d)}" diff --git a/layers/meta-belden-coreos/conf/distro/belden-coreos.conf b/layers/meta-belden-coreos/conf/distro/belden-coreos.conf index 0537f99..bec0528 100644 --- a/layers/meta-belden-coreos/conf/distro/belden-coreos.conf +++ b/layers/meta-belden-coreos/conf/distro/belden-coreos.conf @@ -13,7 +13,7 @@ DISTRO_CODENAME = "kirkstone" PACKAGE_CLASSES = "package_ipk" INIT_MANAGER = "systemd" -DISTRO_FEATURES_DEFAULT ?= "bluetooth usbhost pci ipv4 ipv6 wifi multiarch usrmerge" +DISTRO_FEATURES_DEFAULT ?= "bluetooth usbhost pci ipv4 ipv6 wifi multiarch usrmerge ptest" DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT}" DISTRO_FEATURES_BACKFILL_CONSIDERED = "pulseaudio gobject-introspection-data ldconfig" DISTRO_EXTRA_RDEPENDS += "packagegroup-core-boot" diff --git a/layers/meta-belden-coreos/recipes-core/images/coreos-image-full-cmdline.bb b/layers/meta-belden-coreos/recipes-core/images/coreos-image-full-cmdline.bb new file mode 100644 index 0000000..a2aa6f7 --- /dev/null +++ b/layers/meta-belden-coreos/recipes-core/images/coreos-image-full-cmdline.bb @@ -0,0 +1,7 @@ +DESCRIPTION = "A console-only image with more full-featured Linux system \ +functionality installed." + +inherit coreos-image + +IMAGE_FEATURES += "ssh-server" +IMAGE_INSTALL:append = " packagegroup-core-full-cmdline" diff --git a/layers/meta-belden-coreos/recipes-core/images/coreos-image-minimal-dev.bb b/layers/meta-belden-coreos/recipes-core/images/coreos-image-minimal-dev.bb new file mode 100644 index 0000000..95d8df7 --- /dev/null +++ b/layers/meta-belden-coreos/recipes-core/images/coreos-image-minimal-dev.bb @@ -0,0 +1,6 @@ +require coreos-image-minimal.bb + +DESCRIPTION = "A small image just capable of allowing a device to boot and \ +is suitable for development work." + +IMAGE_FEATURES += "dev-pkgs" \ No newline at end of file diff --git a/layers/meta-belden-coreos/recipes-core/images/coreos-image-minimal.bb b/layers/meta-belden-coreos/recipes-core/images/coreos-image-minimal.bb new file mode 100644 index 0000000..30d1b9b --- /dev/null +++ b/layers/meta-belden-coreos/recipes-core/images/coreos-image-minimal.bb @@ -0,0 +1,8 @@ +SUMMARY = "A small image just capable of allowing a device to boot." + + +LICENSE = "MIT" + +inherit coreos-image + +IMAGE_ROOTFS_SIZE ?= "8192" diff --git a/templates/conf-notes.txt b/templates/conf-notes.txt index 90cb2d3..c2ae69b 100644 --- a/templates/conf-notes.txt +++ b/templates/conf-notes.txt @@ -10,8 +10,8 @@ You can now run 'bitbake ' Common targets are: - core-image-minimal - core-image-full-cmdline + coreos-image-minimal + coreos-image-full-cmdline meta-toolchain meta-ide-support