feat(coros-image): add some basics image for coreos

This commit is contained in:
Samuel Dolt 2022-09-30 11:35:29 +02:00
parent d0c40a22c4
commit 614c12cdce
7 changed files with 73 additions and 4 deletions

View File

@ -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)}"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -10,8 +10,8 @@
You can now run 'bitbake <target>'
Common targets are:
core-image-minimal
core-image-full-cmdline
coreos-image-minimal
coreos-image-full-cmdline
meta-toolchain
meta-ide-support