summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--classes/image_types_ostree.bbclass4
-rw-r--r--classes/image_types_ota.bbclass5
-rw-r--r--classes/sota_minnowboard.bbclass3
3 files changed, 11 insertions, 1 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index f350449..5ebed81 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -12,6 +12,8 @@ do_image_ostree[depends] += "ostree-native:do_populate_sysroot \
12export OSTREE_REPO 12export OSTREE_REPO
13export OSTREE_BRANCHNAME 13export OSTREE_BRANCHNAME
14 14
15export GARAGE_TARGET_NAME
16
15RAMDISK_EXT ?= ".ext4.gz" 17RAMDISK_EXT ?= ".ext4.gz"
16RAMDISK_EXT_arm ?= ".ext4.gz.u-boot" 18RAMDISK_EXT_arm ?= ".ext4.gz.u-boot"
17 19
@@ -205,7 +207,7 @@ IMAGE_CMD_garagesign () {
205 push_success=0 207 push_success=0
206 for push_retries in $( seq 3 ); do 208 for push_retries in $( seq 3 ); do
207 garage-sign targets pull --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} 209 garage-sign targets pull --repo tufrepo --home-dir ${GARAGE_SIGN_REPO}
208 garage-sign targets add --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} --name ${OSTREE_BRANCHNAME} --format OSTREE --version ${ostree_target_hash} --length 0 --url "https://example.com/" --sha256 ${ostree_target_hash} --hardwareids ${MACHINE} 210 garage-sign targets add --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} --name ${GARAGE_TARGET_NAME} --format OSTREE --version ${ostree_target_hash} --length 0 --url "https://example.com/" --sha256 ${ostree_target_hash} --hardwareids ${MACHINE}
209 garage-sign targets sign --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} --key-name=targets 211 garage-sign targets sign --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} --key-name=targets
210 errcode=0 212 errcode=0
211 garage-sign targets push --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} || errcode=$? 213 garage-sign targets push --repo tufrepo --home-dir ${GARAGE_SIGN_REPO} || errcode=$?
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass
index b827444..e753e0e 100644
--- a/classes/image_types_ota.bbclass
+++ b/classes/image_types_ota.bbclass
@@ -53,6 +53,8 @@ export OSTREE_BRANCHNAME
53export OSTREE_REPO 53export OSTREE_REPO
54export OSTREE_BOOTLOADER 54export OSTREE_BOOTLOADER
55 55
56export GARAGE_TARGET_NAME
57
56IMAGE_CMD_otaimg () { 58IMAGE_CMD_otaimg () {
57 if ${@bb.utils.contains('IMAGE_FSTYPES', 'otaimg', 'true', 'false', d)}; then 59 if ${@bb.utils.contains('IMAGE_FSTYPES', 'otaimg', 'true', 'false', d)}; then
58 if [ -z "$OSTREE_REPO" ]; then 60 if [ -z "$OSTREE_REPO" ]; then
@@ -106,6 +108,9 @@ IMAGE_CMD_otaimg () {
106 mv ${HOME_TMP}/usr/homedirs/home ${PHYS_SYSROOT}/ || true 108 mv ${HOME_TMP}/usr/homedirs/home ${PHYS_SYSROOT}/ || true
107 # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local) 109 # Ensure that /var/local exists (AGL symlinks /usr/local to /var/local)
108 install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local 110 install -d ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/local
111 # Set package version for the first deployment
112 echo "{\"${ostree_target_hash}\":\"${GARAGE_TARGET_NAME}-${ostree_target_hash}\"}" > ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota/installed_versions
113
109 rm -rf ${HOME_TMP} 114 rm -rf ${HOME_TMP}
110 115
111 # Calculate image type 116 # Calculate image type
diff --git a/classes/sota_minnowboard.bbclass b/classes/sota_minnowboard.bbclass
index 8417348..63510e3 100644
--- a/classes/sota_minnowboard.bbclass
+++ b/classes/sota_minnowboard.bbclass
@@ -4,4 +4,7 @@ EFI_PROVIDER_sota = "grub-efi"
4WKS_FILE_sota = "efiimage-sota.wks" 4WKS_FILE_sota = "efiimage-sota.wks"
5IMAGE_BOOT_FILES_sota = "" 5IMAGE_BOOT_FILES_sota = ""
6 6
7IMAGE_FSTYPES_remove_sota = "live hddimg"
7OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 console=ttyS0,115200 console=tty0" 8OSTREE_KERNEL_ARGS ?= "ramdisk_size=16384 rw rootfstype=ext4 rootwait rootdelay=2 console=ttyS0,115200 console=tty0"
9
10IMAGE_INSTALL_append = " minnowboard-efi-startup"