summaryrefslogtreecommitdiffstats
path: root/classes/sota.bbclass
diff options
context:
space:
mode:
authorMing Liu <ming.liu@toradex.com>2020-05-11 20:16:05 +0200
committerPatrick Vacek <patrickvacek@gmail.com>2020-07-08 15:52:07 +0200
commit6a41d4cc7378939270d8ff78d9d3ad3fa8975c98 (patch)
treec8d35f5480ee8617b5ae3fe7c20b8d8313cd3a16 /classes/sota.bbclass
parent44c3156736ac7722a971ee4be4e25543571e2104 (diff)
downloadmeta-updater-6a41d4cc7378939270d8ff78d9d3ad3fa8975c98.tar.gz
meta: introduce ostree-kernel-initramfs recipe
We package kernel image, devicetrees, initramfs and install them to /usr/lib/modules/${KERNEL_VERSION}, which is the preferred location according to ostree's new implementation, this could simplify the deployment. Reference: https://github.com/ostreedev/ostree/commit/3ab0d5e6644885440bac6abd17b6d2637df5435f To let initramfs-ostree-image be able to be depended by ostree-kernel-initramfs, it must inherit nopackages to avoid a annoying QA warning like the follows: | WARNING: initramfs-ostree-image-0.0.1-r0 do_package: Manifest ...initramfs-ostree-image.packagedata | not found in colibri_imx6 armv7ahf-neon-imx armv7at2hf-neon-imx armv7at2hf-neon armv7ahf-neon armv7at2hf-vfp | armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp allarch | x86_64_x86_64-nativesdk (variant '')? Also we need define OSTREE_KERNEL, OSTREE_DEPLOY_DEVICETREE and OSTREE_DEVICETREE in sota.bbclass so they could be accessed in other recipes as well as in image recipes. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Ming Liu <ming.liu@toradex.com>
Diffstat (limited to 'classes/sota.bbclass')
-rw-r--r--classes/sota.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/classes/sota.bbclass b/classes/sota.bbclass
index 71bd303..dc18cbc 100644
--- a/classes/sota.bbclass
+++ b/classes/sota.bbclass
@@ -5,8 +5,11 @@ SOTA_CLIENT_PROV ??= "aktualizr-shared-prov"
5SOTA_DEPLOY_CREDENTIALS ?= "1" 5SOTA_DEPLOY_CREDENTIALS ?= "1"
6SOTA_HARDWARE_ID ??= "${MACHINE}" 6SOTA_HARDWARE_ID ??= "${MACHINE}"
7 7
8IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT} ${SOTA_CLIENT_PROV}"
9IMAGE_CLASSES += " image_types_ostree image_types_ota image_repo_manifest" 8IMAGE_CLASSES += " image_types_ostree image_types_ota image_repo_manifest"
9IMAGE_INSTALL_append_sota = " ${SOTA_CLIENT} ${SOTA_CLIENT_PROV} \
10 ostree os-release ostree-kernel \
11 ${@'ostree-initramfs' if d.getVar('KERNEL_IMAGETYPE') != 'fitImage' else ''} \
12 ${@'ostree-devicetrees' if oe.types.boolean('${OSTREE_DEPLOY_DEVICETREE}') else ''}"
10 13
11IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign garagecheck ota-ext4 wic', ' ', d)}" 14IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign garagecheck ota-ext4 wic', ' ', d)}"
12IMAGE_FSTYPES += "${@bb.utils.contains('BUILD_OSTREE_TARBALL', '1', 'ostree.tar.bz2', ' ', d)}" 15IMAGE_FSTYPES += "${@bb.utils.contains('BUILD_OSTREE_TARBALL', '1', 'ostree.tar.bz2', ' ', d)}"
@@ -27,6 +30,9 @@ OSTREE_BRANCHNAME ?= "${SOTA_HARDWARE_ID}"
27OSTREE_OSNAME ?= "poky" 30OSTREE_OSNAME ?= "poky"
28OSTREE_BOOTLOADER ??= 'u-boot' 31OSTREE_BOOTLOADER ??= 'u-boot'
29OSTREE_BOOT_PARTITION ??= "/boot" 32OSTREE_BOOT_PARTITION ??= "/boot"
33OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}"
34OSTREE_DEPLOY_DEVICETREE ??= "0"
35OSTREE_DEVICETREE ??= "${KERNEL_DEVICETREE}"
30 36
31INITRAMFS_IMAGE ?= "initramfs-ostree-image" 37INITRAMFS_IMAGE ?= "initramfs-ostree-image"
32 38