diff options
Diffstat (limited to 'recipes-sota')
-rw-r--r-- | recipes-sota/aktualizr/aktualizr_git.bb | 20 | ||||
-rw-r--r-- | recipes-sota/aktualizr/files/aktualizr.service | 3 | ||||
-rw-r--r-- | recipes-sota/config/aktualizr-binary-pacman.bb | 21 | ||||
-rw-r--r-- | recipes-sota/config/files/10-pacman.toml | 2 | ||||
-rw-r--r-- | recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb | 61 |
5 files changed, 97 insertions, 10 deletions
diff --git a/recipes-sota/aktualizr/aktualizr_git.bb b/recipes-sota/aktualizr/aktualizr_git.bb index 56a6389..d9b464f 100644 --- a/recipes-sota/aktualizr/aktualizr_git.bb +++ b/recipes-sota/aktualizr/aktualizr_git.bb | |||
@@ -17,7 +17,7 @@ PRIVATE_LIBS_${PN}-ptest = "libaktualizr.so libaktualizr_secondary.so" | |||
17 | PV = "1.0+git${SRCPV}" | 17 | PV = "1.0+git${SRCPV}" |
18 | PR = "7" | 18 | PR = "7" |
19 | 19 | ||
20 | GARAGE_SIGN_PV = "0.7.1-4-gf10c1da" | 20 | GARAGE_SIGN_PV = "0.7.1-10-ga0a099a" |
21 | 21 | ||
22 | SRC_URI = " \ | 22 | SRC_URI = " \ |
23 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ | 23 | gitsm://github.com/advancedtelematic/aktualizr;branch=${BRANCH};name=aktualizr \ |
@@ -29,10 +29,10 @@ SRC_URI = " \ | |||
29 | ${@ d.expand("https://tuf-cli-releases.ota.here.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if not oe.types.boolean(d.getVar('GARAGE_SIGN_AUTOVERSION')) else ''} \ | 29 | ${@ d.expand("https://tuf-cli-releases.ota.here.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign") if not oe.types.boolean(d.getVar('GARAGE_SIGN_AUTOVERSION')) else ''} \ |
30 | " | 30 | " |
31 | 31 | ||
32 | SRC_URI[garagesign.md5sum] = "5f8eea81d1559d6fcb28d49c4298727c" | 32 | SRC_URI[garagesign.md5sum] = "e2354fb75ae56c2d253be26617b2bd10" |
33 | SRC_URI[garagesign.sha256sum] = "8b2f5bb164f19b41972069d3377e39c2eb9edffd471777161691039e12a71738" | 33 | SRC_URI[garagesign.sha256sum] = "2ddb26b19090a42d7aeeda287ed40123ffa3ab55b5dcc4ea4c9320d0a0fd59a0" |
34 | 34 | ||
35 | SRCREV = "cf44da79555d1897115eb350cbc43db1e213db03" | 35 | SRCREV = "4169157a1874fca3fb55571c60507c1aefd4e1e5" |
36 | BRANCH ?= "master" | 36 | BRANCH ?= "master" |
37 | 37 | ||
38 | S = "${WORKDIR}/git" | 38 | S = "${WORKDIR}/git" |
@@ -132,23 +132,25 @@ PACKAGESPLITFUNCS_prepend = "split_hosttools_packages " | |||
132 | python split_hosttools_packages () { | 132 | python split_hosttools_packages () { |
133 | bindir = d.getVar('bindir') | 133 | bindir = d.getVar('bindir') |
134 | 134 | ||
135 | # Split all binaries to their own packages except aktualizr-info, | 135 | # Split all binaries to their own packages. |
136 | # aktualizr-info should stay in main package aktualizr. | 136 | do_split_packages(d, bindir, '^(.*)$', '%s', 'Aktualizr tool - %s', extra_depends='aktualizr-configs', prepend=False) |
137 | do_split_packages(d, bindir, r'^((?!(aktualizr-info)).*)$', '%s', 'Aktualizr tool - %s', extra_depends='aktualizr-configs', prepend=False) | ||
138 | } | 137 | } |
139 | 138 | ||
140 | PACKAGES_DYNAMIC = "^aktualizr-.* ^garage-.*" | 139 | PACKAGES_DYNAMIC = "^aktualizr-.* ^garage-.*" |
141 | 140 | ||
142 | PACKAGES =+ "${PN}-host-tools ${PN}-lib ${PN}-resource-control ${PN}-configs ${PN}-secondary ${PN}-secondary-lib ${PN}-sotatools-lib" | 141 | PACKAGES =+ "${PN}-host-tools ${PN}-info ${PN}-lib ${PN}-resource-control ${PN}-configs ${PN}-secondary ${PN}-secondary-lib ${PN}-sotatools-lib" |
143 | 142 | ||
144 | ALLOW_EMPTY_${PN}-host-tools = "1" | 143 | ALLOW_EMPTY_${PN}-host-tools = "1" |
145 | 144 | ||
146 | FILES_${PN} = " \ | 145 | FILES_${PN} = " \ |
147 | ${bindir}/aktualizr \ | 146 | ${bindir}/aktualizr \ |
148 | ${bindir}/aktualizr-info \ | ||
149 | ${systemd_unitdir}/system/aktualizr.service \ | 147 | ${systemd_unitdir}/system/aktualizr.service \ |
150 | " | 148 | " |
151 | 149 | ||
150 | FILES_${PN}-info = " \ | ||
151 | ${bindir}/aktualizr-info \ | ||
152 | " | ||
153 | |||
152 | FILES_${PN}-lib = " \ | 154 | FILES_${PN}-lib = " \ |
153 | ${libdir}/libaktualizr.so \ | 155 | ${libdir}/libaktualizr.so \ |
154 | " | 156 | " |
diff --git a/recipes-sota/aktualizr/files/aktualizr.service b/recipes-sota/aktualizr/files/aktualizr.service index 3d807a1..ae5d23a 100644 --- a/recipes-sota/aktualizr/files/aktualizr.service +++ b/recipes-sota/aktualizr/files/aktualizr.service | |||
@@ -1,6 +1,7 @@ | |||
1 | [Unit] | 1 | [Unit] |
2 | Description=Aktualizr SOTA Client | 2 | Description=Aktualizr SOTA Client |
3 | After=network-online.target nss-lookup.target | 3 | After=network-online.target nss-lookup.target boot-complete.target |
4 | Requires=boot-complete.target | ||
4 | Wants=network-online.target | 5 | Wants=network-online.target |
5 | 6 | ||
6 | [Service] | 7 | [Service] |
diff --git a/recipes-sota/config/aktualizr-binary-pacman.bb b/recipes-sota/config/aktualizr-binary-pacman.bb new file mode 100644 index 0000000..36bafb3 --- /dev/null +++ b/recipes-sota/config/aktualizr-binary-pacman.bb | |||
@@ -0,0 +1,21 @@ | |||
1 | DESCRIPTION = "Configure aktualizr with a binary package manager" | ||
2 | LICENSE = "MPL-2.0" | ||
3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" | ||
4 | |||
5 | inherit allarch | ||
6 | |||
7 | SRC_URI = "\ | ||
8 | file://10-pacman.toml \ | ||
9 | " | ||
10 | |||
11 | FILES_${PN} = " \ | ||
12 | ${libdir}/sota/conf.d \ | ||
13 | ${libdir}/sota/conf.d/10-pacman.toml \ | ||
14 | " | ||
15 | |||
16 | PR = "1" | ||
17 | |||
18 | do_install() { | ||
19 | install -m 0700 -d ${D}${libdir}/sota/conf.d | ||
20 | install -m 0644 ${WORKDIR}/10-pacman.toml ${D}${libdir}/sota/conf.d/10-pacman.toml | ||
21 | } | ||
diff --git a/recipes-sota/config/files/10-pacman.toml b/recipes-sota/config/files/10-pacman.toml new file mode 100644 index 0000000..a24fd39 --- /dev/null +++ b/recipes-sota/config/files/10-pacman.toml | |||
@@ -0,0 +1,2 @@ | |||
1 | [pacman] | ||
2 | type = "none" | ||
diff --git a/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb b/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb new file mode 100644 index 0000000..136bb22 --- /dev/null +++ b/recipes-sota/ostree-kernel-initramfs/ostree-kernel-initramfs_0.0.1.bb | |||
@@ -0,0 +1,61 @@ | |||
1 | SUMMARY = "Ostree linux kernel, devicetrees and initramfs packager" | ||
2 | DESCRIPTION = "Ostree linux kernel, devicetrees and initramfs packager" | ||
3 | SECTION = "kernel" | ||
4 | LICENSE = "GPLv2" | ||
5 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" | ||
6 | |||
7 | # Whilst not a module, this ensures we don't get multilib extended (which would make no sense) | ||
8 | inherit module-base kernel-artifact-names | ||
9 | |||
10 | PACKAGES = "ostree-kernel ostree-initramfs ostree-devicetrees" | ||
11 | |||
12 | ALLOW_EMPTY_ostree-initramfs = "1" | ||
13 | ALLOW_EMPTY_ostree-devicetrees = "1" | ||
14 | |||
15 | FILES_ostree-kernel = "${nonarch_base_libdir}/modules/*/vmlinuz" | ||
16 | FILES_ostree-initramfs = "${nonarch_base_libdir}/modules/*/initramfs.img" | ||
17 | FILES_ostree-devicetrees = "${nonarch_base_libdir}/modules/*/dtb/* \ | ||
18 | ${nonarch_base_libdir}/modules/*/devicetree \ | ||
19 | " | ||
20 | |||
21 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
22 | |||
23 | KERNEL_BUILD_ROOT = "${nonarch_base_libdir}/modules/" | ||
24 | |||
25 | # There's nothing to do here, except install the artifacts where we can package them | ||
26 | do_fetch[noexec] = "1" | ||
27 | do_unpack[noexec] = "1" | ||
28 | do_patch[noexec] = "1" | ||
29 | do_configure[noexec] = "1" | ||
30 | do_compile[noexec] = "1" | ||
31 | deltask do_populate_sysroot | ||
32 | |||
33 | do_install() { | ||
34 | kerneldir=${D}${KERNEL_BUILD_ROOT}${KERNEL_VERSION} | ||
35 | install -d $kerneldir | ||
36 | |||
37 | cp ${DEPLOY_DIR_IMAGE}/${OSTREE_KERNEL} $kerneldir/vmlinuz | ||
38 | |||
39 | if [ "${KERNEL_IMAGETYPE}" != "fitImage" ]; then | ||
40 | if [ -n "${INITRAMFS_IMAGE}" ]; then | ||
41 | cp ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES} $kerneldir/initramfs.img | ||
42 | fi | ||
43 | |||
44 | if [ ${@ oe.types.boolean('${OSTREE_DEPLOY_DEVICETREE}')} = True ] && [ -n "${OSTREE_DEVICETREE}" ]; then | ||
45 | mkdir -p $kerneldir/dtb | ||
46 | for dts_file in ${OSTREE_DEVICETREE}; do | ||
47 | dts_file_basename=$(basename $dts_file) | ||
48 | cp ${DEPLOY_DIR_IMAGE}/$dts_file_basename $kerneldir/dtb/$dts_file_basename | ||
49 | done | ||
50 | cp $kerneldir/dtb/$(basename $(echo ${OSTREE_DEVICETREE} | awk '{print $1}')) $kerneldir/devicetree | ||
51 | fi | ||
52 | fi | ||
53 | } | ||
54 | do_install[vardepsexclude] = "KERNEL_VERSION" | ||
55 | INITRAMFS_IMAGE ?= "" | ||
56 | do_install[depends] = "virtual/kernel:do_deploy ${@['${INITRAMFS_IMAGE}:do_image_complete', ''][d.getVar('INITRAMFS_IMAGE') == '']}" | ||
57 | |||
58 | python() { | ||
59 | if not d.getVar('OSTREE_KERNEL'): | ||
60 | raise bb.parse.SkipRecipe('OSTREE_KERNEL is not defined, maybe your MACHINE config does not inherit sota.bbclass?') | ||
61 | } | ||