diff options
author | cajun-rat <p@beta16.co.uk> | 2017-07-05 14:50:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-05 14:50:37 +0200 |
commit | 00dc1fef0667ab640ad6bd688e4737309b000358 (patch) | |
tree | c9e4c89bce12a81ddd364b2676c8a005fff725dd /classes | |
parent | b0d9d7018502a29f062895f853efd41e7b760d5a (diff) | |
parent | 69a0db9291725b1ddfa643dc00d6d2f1bf6c5caf (diff) | |
download | meta-updater-00dc1fef0667ab640ad6bd688e4737309b000358.tar.gz |
Merge pull request #101 from advancedtelematic/feat/mergemorty
Merge current progress from morty to pyro
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_ostree.bbclass | 2 | ||||
-rw-r--r-- | classes/image_types_ota.bbclass | 7 | ||||
-rw-r--r-- | classes/sdcard_image-rpi-ota.bbclass | 8 | ||||
-rw-r--r-- | classes/sota.bbclass | 2 | ||||
-rw-r--r-- | classes/sota_m3ulcb.bbclass | 9 | ||||
-rw-r--r-- | classes/sota_raspberrypi.bbclass | 2 |
6 files changed, 18 insertions, 12 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 2a74e51..72d7df5 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -203,7 +203,7 @@ IMAGE_CMD_ostree () { | |||
203 | IMAGE_TYPEDEP_ostreepush = "ostree" | 203 | IMAGE_TYPEDEP_ostreepush = "ostree" |
204 | IMAGE_DEPENDS_ostreepush = "sota-tools-native:do_populate_sysroot" | 204 | IMAGE_DEPENDS_ostreepush = "sota-tools-native:do_populate_sysroot" |
205 | IMAGE_CMD_ostreepush () { | 205 | IMAGE_CMD_ostreepush () { |
206 | if [ ${OSTREE_PUSH_CREDENTIALS} ]; then | 206 | if [ -n "${OSTREE_PUSH_CREDENTIALS}" ]; then |
207 | garage-push --repo=${OSTREE_REPO} \ | 207 | garage-push --repo=${OSTREE_REPO} \ |
208 | --ref=${OSTREE_BRANCHNAME} \ | 208 | --ref=${OSTREE_BRANCHNAME} \ |
209 | --credentials=${OSTREE_PUSH_CREDENTIALS} \ | 209 | --credentials=${OSTREE_PUSH_CREDENTIALS} \ |
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index 8108d51..09c30ff 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass | |||
@@ -92,12 +92,13 @@ IMAGE_CMD_otaimg () { | |||
92 | kargs_list="${kargs_list} --karg-append=$arg" | 92 | kargs_list="${kargs_list} --karg-append=$arg" |
93 | done | 93 | done |
94 | 94 | ||
95 | ostree admin --sysroot=${PHYS_SYSROOT} deploy ${kargs_list} --os=${OSTREE_OSNAME} ${OSTREE_OSNAME}:${OSTREE_BRANCHNAME} | 95 | ostree admin --sysroot=${PHYS_SYSROOT} deploy ${kargs_list} --os=${OSTREE_OSNAME} ${OSTREE_BRANCHNAME} |
96 | 96 | ||
97 | # Copy deployment /home and /var/sota to sysroot | 97 | # Copy deployment /home and /var/sota to sysroot |
98 | HOME_TMP=`mktemp -d ${WORKDIR}/home-tmp-XXXXX` | 98 | HOME_TMP=`mktemp -d ${WORKDIR}/home-tmp-XXXXX` |
99 | tar --xattrs --xattrs-include='*' -C ${HOME_TMP} -xf ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 ./usr/homedirs ./var/sota || true | 99 | tar --xattrs --xattrs-include='*' -C ${HOME_TMP} -xf ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.ostree.tar.bz2 ./usr/homedirs ./var/sota ./var/local || true |
100 | mv ${HOME_TMP}/var/sota ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true | 100 | mv ${HOME_TMP}/var/sota ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true |
101 | mv ${HOME_TMP}/var/local ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/ || true | ||
101 | # Create /var/sota if it doesn't exist yet | 102 | # Create /var/sota if it doesn't exist yet |
102 | mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota || true | 103 | mkdir -p ${PHYS_SYSROOT}/ostree/deploy/${OSTREE_OSNAME}/var/sota || true |
103 | mv ${HOME_TMP}/usr/homedirs/home ${PHYS_SYSROOT}/ || true | 104 | mv ${HOME_TMP}/usr/homedirs/home ${PHYS_SYSROOT}/ || true |
diff --git a/classes/sdcard_image-rpi-ota.bbclass b/classes/sdcard_image-rpi-ota.bbclass index 9022aaf..81d71e9 100644 --- a/classes/sdcard_image-rpi-ota.bbclass +++ b/classes/sdcard_image-rpi-ota.bbclass | |||
@@ -61,7 +61,7 @@ IMAGE_DEPENDS_rpi-sdimg-ota = " \ | |||
61 | IMAGE_TYPEDEP_rpi-sdimg-ota = "otaimg" | 61 | IMAGE_TYPEDEP_rpi-sdimg-ota = "otaimg" |
62 | 62 | ||
63 | # SD card image name | 63 | # SD card image name |
64 | SDIMG_OTA = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.rpi-sdimg-ota" | 64 | SDIMG_OTA = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.rpi-sdimg-ota" |
65 | 65 | ||
66 | # Compression method to apply to SDIMG_OTA after it has been created. Supported | 66 | # Compression method to apply to SDIMG_OTA after it has been created. Supported |
67 | # compression formats are "gzip", "bzip2" or "xz". The original .rpi-sdimg-ota file | 67 | # compression formats are "gzip", "bzip2" or "xz". The original .rpi-sdimg-ota file |
@@ -165,9 +165,6 @@ IMAGE_CMD_rpi-sdimg-ota () { | |||
165 | dd if=${SDIMG_OTA_ROOTFS} of=${SDIMG_OTA} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync | 165 | dd if=${SDIMG_OTA_ROOTFS} of=${SDIMG_OTA} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) && sync && sync |
166 | fi | 166 | fi |
167 | 167 | ||
168 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rpi-sdimg-ota | ||
169 | ln -s ${IMAGE_NAME}.rootfs.rpi-sdimg-ota ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rpi-sdimg-ota | ||
170 | |||
171 | # Optionally apply compression | 168 | # Optionally apply compression |
172 | case "${SDIMG_OTA_COMPRESSION}" in | 169 | case "${SDIMG_OTA_COMPRESSION}" in |
173 | "gzip") | 170 | "gzip") |
@@ -180,9 +177,6 @@ IMAGE_CMD_rpi-sdimg-ota () { | |||
180 | xz -k "${SDIMG_OTA}" | 177 | xz -k "${SDIMG_OTA}" |
181 | ;; | 178 | ;; |
182 | esac | 179 | esac |
183 | |||
184 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.rpi-sdimg-ota | ||
185 | ln -s ${IMAGE_NAME}.rootfs.rpi-sdimg-ota ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs.rpi-sdimg-ota | ||
186 | } | 180 | } |
187 | 181 | ||
188 | ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; " | 182 | ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; " |
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 2761111..5073e29 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass | |||
@@ -5,6 +5,7 @@ python __anonymous() { | |||
5 | 5 | ||
6 | OVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" | 6 | OVERRIDES .= "${@bb.utils.contains('DISTRO_FEATURES', 'sota', ':sota', '', d)}" |
7 | 7 | ||
8 | SOTA_CLIENT ??= "aktualizr" | ||
8 | IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT}" | 9 | IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT}" |
9 | IMAGE_CLASSES += " image_types_ostree image_types_ota" | 10 | IMAGE_CLASSES += " image_types_ostree image_types_ota" |
10 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush otaimg wic', ' ', d)}" | 11 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush otaimg wic', ' ', d)}" |
@@ -24,6 +25,7 @@ SOTA_MACHINE ??="none" | |||
24 | SOTA_MACHINE_raspberrypi2 ?= "raspberrypi" | 25 | SOTA_MACHINE_raspberrypi2 ?= "raspberrypi" |
25 | SOTA_MACHINE_raspberrypi3 ?= "raspberrypi" | 26 | SOTA_MACHINE_raspberrypi3 ?= "raspberrypi" |
26 | SOTA_MACHINE_porter ?= "porter" | 27 | SOTA_MACHINE_porter ?= "porter" |
28 | SOTA_MACHINE_m3ulcb = "m3ulcb" | ||
27 | SOTA_MACHINE_intel-corei7-64 ?= "minnowboard" | 29 | SOTA_MACHINE_intel-corei7-64 ?= "minnowboard" |
28 | SOTA_MACHINE_qemux86-64 ?= "qemux86-64" | 30 | SOTA_MACHINE_qemux86-64 ?= "qemux86-64" |
29 | SOTA_MACHINE_am335x-evm ?= "am335x-evm-wifi" | 31 | SOTA_MACHINE_am335x-evm ?= "am335x-evm-wifi" |
diff --git a/classes/sota_m3ulcb.bbclass b/classes/sota_m3ulcb.bbclass new file mode 100644 index 0000000..21d04ba --- /dev/null +++ b/classes/sota_m3ulcb.bbclass | |||
@@ -0,0 +1,9 @@ | |||
1 | # Commit united image to OSTree, not just uImage | ||
2 | OSTREE_KERNEL = "Image" | ||
3 | |||
4 | EXTRA_IMAGEDEPENDS_append_sota = " m3ulcb-ota-bootfiles" | ||
5 | IMAGE_CLASSES_append_sota = " image_types_uboot " | ||
6 | IMAGE_BOOT_FILES_sota += "m3ulcb-ota-bootfiles/*" | ||
7 | |||
8 | OSTREE_BOOTLOADER ?= "u-boot" | ||
9 | UBOOT_MACHINE_sota = "m3ulcb_defconfig" | ||
diff --git a/classes/sota_raspberrypi.bbclass b/classes/sota_raspberrypi.bbclass index 9b103ff..cc6b666 100644 --- a/classes/sota_raspberrypi.bbclass +++ b/classes/sota_raspberrypi.bbclass | |||
@@ -1,5 +1,5 @@ | |||
1 | IMAGE_CLASSES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'image_types_uboot sdcard_image-rpi-ota', '', d)}" | 1 | IMAGE_CLASSES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'image_types_uboot sdcard_image-rpi-ota', '', d)}" |
2 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'rpi-sdimg-ota', 'rpi-sdimg', d)}" | 2 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'rpi-sdimg-ota.xz', 'rpi-sdimg.xz', d)}" |
3 | 3 | ||
4 | IMAGE_FSTYPES_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'wic rpi-sdimg rpi-sdimg.xz', '', d)}" | 4 | IMAGE_FSTYPES_remove = "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'wic rpi-sdimg rpi-sdimg.xz', '', d)}" |
5 | 5 | ||