summaryrefslogtreecommitdiffstats
path: root/classes
diff options
context:
space:
mode:
Diffstat (limited to 'classes')
-rw-r--r--classes/image_types_ostree.bbclass13
-rw-r--r--classes/image_types_ota.bbclass2
-rw-r--r--classes/sota.bbclass5
3 files changed, 12 insertions, 8 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index dc14e4a..9e3bc6f 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -1,7 +1,5 @@
1# OSTree deployment 1# OSTree deployment
2 2
3inherit image
4
5do_image_ostree[depends] += "ostree-native:do_populate_sysroot \ 3do_image_ostree[depends] += "ostree-native:do_populate_sysroot \
6 openssl-native:do_populate_sysroot \ 4 openssl-native:do_populate_sysroot \
7 coreutils-native:do_populate_sysroot \ 5 coreutils-native:do_populate_sysroot \
@@ -203,6 +201,12 @@ IMAGE_CMD_garagesign () {
203 201
204 ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME}) 202 ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME})
205 203
204 # Use OSTree target hash as version if none was provided by the user
205 target_version=${ostree_target_hash}
206 if [ -n "${GARAGE_TARGET_VERSION}" ]; then
207 target_version=${GARAGE_TARGET_VERSION}
208 fi
209
206 # Push may fail due to race condition when multiple build machines try to push simultaneously 210 # Push may fail due to race condition when multiple build machines try to push simultaneously
207 # in which case targets.json should be pulled again and the whole procedure repeated 211 # in which case targets.json should be pulled again and the whole procedure repeated
208 push_success=0 212 push_success=0
@@ -213,9 +217,9 @@ IMAGE_CMD_garagesign () {
213 --home-dir ${GARAGE_SIGN_REPO} \ 217 --home-dir ${GARAGE_SIGN_REPO} \
214 --name ${GARAGE_TARGET_NAME} \ 218 --name ${GARAGE_TARGET_NAME} \
215 --format OSTREE \ 219 --format OSTREE \
216 --version ${ostree_target_hash} \ 220 --version ${target_version} \
217 --length 0 \ 221 --length 0 \
218 --url "https://example.com/" \ 222 --url "${GARAGE_TARGET_URL}" \
219 --sha256 ${ostree_target_hash} \ 223 --sha256 ${ostree_target_hash} \
220 --hardwareids ${MACHINE} 224 --hardwareids ${MACHINE}
221 garage-sign targets sign --repo tufrepo \ 225 garage-sign targets sign --repo tufrepo \
@@ -231,6 +235,7 @@ IMAGE_CMD_garagesign () {
231 bbwarn "Push to garage repository has failed, retrying" 235 bbwarn "Push to garage repository has failed, retrying"
232 fi 236 fi
233 done 237 done
238 rm -rf ${GARAGE_SIGN_REPO}
234 239
235 if [ "$push_success" -ne "1" ]; then 240 if [ "$push_success" -ne "1" ]; then
236 bberror "Couldn't push to garage repository" 241 bberror "Couldn't push to garage repository"
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index 36e7059..17fe4e8 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -7,8 +7,6 @@
7# boot scripts, kernel and initramfs images 7# boot scripts, kernel and initramfs images
8# 8#
9 9
10inherit image
11
12OSTREE_BOOTLOADER ??= 'u-boot' 10OSTREE_BOOTLOADER ??= 'u-boot'
13 11
14do_image_otaimg[depends] += "e2fsprogs-native:do_populate_sysroot \ 12do_image_otaimg[depends] += "e2fsprogs-native:do_populate_sysroot \
diff --git a/classes/sota.bbclass b/classes/sota.bbclass
index bbb9ac9..1e765f0 100644
--- a/classes/sota.bbclass
+++ b/classes/sota.bbclass
@@ -31,10 +31,11 @@ OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image"
31GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo" 31GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo"
32GARAGE_SIGN_KEYNAME ?= "garage-key" 32GARAGE_SIGN_KEYNAME ?= "garage-key"
33GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}" 33GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}"
34GARAGE_TARGET_VERSION ?= ""
35GARAGE_TARGET_URL ?= "https://example.com/"
34 36
35SOTA_MACHINE ??="none" 37SOTA_MACHINE ??="none"
36SOTA_MACHINE_raspberrypi2 ?= "raspberrypi" 38SOTA_MACHINE_rpi ?= "raspberrypi"
37SOTA_MACHINE_raspberrypi3 ?= "raspberrypi"
38SOTA_MACHINE_porter ?= "porter" 39SOTA_MACHINE_porter ?= "porter"
39SOTA_MACHINE_m3ulcb = "m3ulcb" 40SOTA_MACHINE_m3ulcb = "m3ulcb"
40SOTA_MACHINE_intel-corei7-64 ?= "minnowboard" 41SOTA_MACHINE_intel-corei7-64 ?= "minnowboard"