From bf28dfe7b23f8f6bf10db22f74e0ea1af37b46d6 Mon Sep 17 00:00:00 2001 From: Patrick Vogelaar Date: Fri, 3 Mar 2023 10:05:57 +0100 Subject: [PATCH] feat(multiconfig): use multiconfig for building containers --- .../conf/multiconfig/cn9130-cf-pro.conf | 3 +++ .../conf/multiconfig/container-arm64.conf | 3 +++ .../meta-belden-coreos-bsp/conf/multiconfig/qemuarm64.conf | 3 +++ .../classes/coreos-container-package.bbclass | 5 +++-- templates/local.conf.sample | 2 ++ 5 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 layers/meta-belden-coreos-bsp/conf/multiconfig/cn9130-cf-pro.conf create mode 100644 layers/meta-belden-coreos-bsp/conf/multiconfig/container-arm64.conf create mode 100644 layers/meta-belden-coreos-bsp/conf/multiconfig/qemuarm64.conf diff --git a/layers/meta-belden-coreos-bsp/conf/multiconfig/cn9130-cf-pro.conf b/layers/meta-belden-coreos-bsp/conf/multiconfig/cn9130-cf-pro.conf new file mode 100644 index 0000000..4db877b --- /dev/null +++ b/layers/meta-belden-coreos-bsp/conf/multiconfig/cn9130-cf-pro.conf @@ -0,0 +1,3 @@ +MACHINE = "cn9130-cf-pro" + +TMPDIR = "${TOPDIR}/tmp" \ No newline at end of file diff --git a/layers/meta-belden-coreos-bsp/conf/multiconfig/container-arm64.conf b/layers/meta-belden-coreos-bsp/conf/multiconfig/container-arm64.conf new file mode 100644 index 0000000..0fe961d --- /dev/null +++ b/layers/meta-belden-coreos-bsp/conf/multiconfig/container-arm64.conf @@ -0,0 +1,3 @@ +MACHINE = "container-arm64" + +TMPDIR = "${TOPDIR}/tmp-container-arm64" \ No newline at end of file diff --git a/layers/meta-belden-coreos-bsp/conf/multiconfig/qemuarm64.conf b/layers/meta-belden-coreos-bsp/conf/multiconfig/qemuarm64.conf new file mode 100644 index 0000000..ebe2ef1 --- /dev/null +++ b/layers/meta-belden-coreos-bsp/conf/multiconfig/qemuarm64.conf @@ -0,0 +1,3 @@ +MACHINE = "qemuarm64" + +TMPDIR = "${TOPDIR}/tmp" \ No newline at end of file diff --git a/layers/meta-belden-coreos/classes/coreos-container-package.bbclass b/layers/meta-belden-coreos/classes/coreos-container-package.bbclass index f0ab9d8..1c2975b 100644 --- a/layers/meta-belden-coreos/classes/coreos-container-package.bbclass +++ b/layers/meta-belden-coreos/classes/coreos-container-package.bbclass @@ -6,6 +6,7 @@ # ============================================================================== CONTAINER_IMAGE ??= "" +CONTAINER_CONFIG ??= "" # At the moment, only podman is supported. Support for for `systemd-container` # or another runtime can be added later if needed @@ -35,14 +36,14 @@ PACKAGE_ARCH="${MACHINE_ARCH}" # ============================================================================== INHIBIT_DEFAULT_DEPS = "1" -do_install[depends] += "${CONTAINER_IMAGE}:do_image_complete" +do_install[mcdepends] += "mc::${CONTAINER_CONFIG}:${CONTAINER_IMAGE}:do_image_complete" RDEPENDS:${PN} += "${CONTAINER_RUNTIME}" # SystemD integration # ============================================================================== -inherit systemd +inherit systemd SYSTEMD_SERVICE:${PN} ??= "${GENERATED_SYSTEMD_SERVICE_NAME}.service" diff --git a/templates/local.conf.sample b/templates/local.conf.sample index 252cf52..bcd8e01 100644 --- a/templates/local.conf.sample +++ b/templates/local.conf.sample @@ -209,3 +209,5 @@ PACKAGECONFIG:append:pn-nativesdk-qemu = " sdl" # 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" + +BBMULTICONFIG = "container-arm64" \ No newline at end of file