diff options
author | Ben Clouser <ben.clouser@toradex.com> | 2018-07-10 17:27:57 -0700 |
---|---|---|
committer | Ben Clouser <ben.clouser@toradex.com> | 2018-07-10 17:28:40 -0700 |
commit | fef98227e6ff5c97593697fe6c382ddd3ee8dfa8 (patch) | |
tree | 962aca8378b7f68b8bc590b8a069972278815f1c /classes | |
parent | 850801c59cbe49e841650489508ae78fbe5a9e82 (diff) | |
download | meta-updater-fef98227e6ff5c97593697fe6c382ddd3ee8dfa8.tar.gz |
Add support for building ota-tar.xz, and fixes from review comments
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_ota.bbclass | 13 | ||||
-rw-r--r-- | classes/sota.bbclass | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index 99a2b63..0b2f7a1 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass | |||
@@ -7,13 +7,8 @@ | |||
7 | # boot scripts, kernel and initramfs images | 7 | # boot scripts, kernel and initramfs images |
8 | # | 8 | # |
9 | 9 | ||
10 | do_image_ota_ext4[depends] += "e2fsprogs-native:do_populate_sysroot \ | ||
11 | ${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER', True) == 'grub' else ''} \ | ||
12 | ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot' else ''}" | ||
13 | 10 | ||
14 | do_image_ota_tar[depends] += "e2fsprogs-native:do_populate_sysroot \ | 11 | do_image_ota_ext4[depends] += "e2fsprogs-native:do_populate_sysroot" |
15 | ${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER', True) == 'grub' else ''} \ | ||
16 | ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot' else ''}" | ||
17 | 12 | ||
18 | calculate_size () { | 13 | calculate_size () { |
19 | BASE=$1 | 14 | BASE=$1 |
@@ -152,6 +147,8 @@ create_ota () { | |||
152 | tar -cf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg.tar -C ${OTA_SYSROOT} . | 147 | tar -cf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg.tar -C ${OTA_SYSROOT} . |
153 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg.tar | 148 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg.tar |
154 | ln -s ${IMAGE_NAME}.otaimg.tar ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg.tar | 149 | ln -s ${IMAGE_NAME}.otaimg.tar ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg.tar |
150 | # To fit in with the rest of yocto's image utils, we create a rootfs.ota-tar in the deploy dir | ||
151 | cp ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.otaimg.tar ${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.ota-tar | ||
155 | else | 152 | else |
156 | rm -rf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg* | 153 | rm -rf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg* |
157 | bbfatal "create_ota Function called with unknown or unspecified FS_TYPE of ${FS_TYPE}. Failing!" | 154 | bbfatal "create_ota Function called with unknown or unspecified FS_TYPE of ${FS_TYPE}. Failing!" |
@@ -174,7 +171,9 @@ IMAGE_CMD_ota-tar () { | |||
174 | } | 171 | } |
175 | 172 | ||
176 | do_otasetup[doc] = "Sets up the base ota rootfs used for subsequent image generation" | 173 | do_otasetup[doc] = "Sets up the base ota rootfs used for subsequent image generation" |
177 | do_otasetup[depends] += "virtual/fakeroot-native:do_populate_sysroot" | 174 | do_otasetup[depends] += "virtual/fakeroot-native:do_populate_sysroot \ |
175 | ${@'grub:do_populate_sysroot' if d.getVar('OSTREE_BOOTLOADER', True) == 'grub' else ''} \ | ||
176 | ${@'virtual/bootloader:do_deploy' if d.getVar('OSTREE_BOOTLOADER', True) == 'u-boot' else ''}" | ||
178 | 177 | ||
179 | addtask do_otasetup after do_image_ostree before do_image_ota_ext4 do_image_ota_tar | 178 | addtask do_otasetup after do_image_ostree before do_image_ota_ext4 do_image_ota_tar |
180 | 179 | ||
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index f86a589..3aca92c 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass | |||
@@ -14,7 +14,7 @@ IMAGE_INSTALL_append_sota = " ostree os-release ${SOTA_CLIENT} ${SOTA_CLIENT_PRO | |||
14 | IMAGE_CLASSES += " image_types_ostree image_types_ota" | 14 | IMAGE_CLASSES += " image_types_ostree image_types_ota" |
15 | 15 | ||
16 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign garagecheck ota-ext4 wic', ' ', d)}" | 16 | IMAGE_FSTYPES += "${@bb.utils.contains('DISTRO_FEATURES', 'sota', 'ostreepush garagesign garagecheck ota-ext4 wic', ' ', d)}" |
17 | IMAGE_FSTYPES += "${@bb.utils.contains('BUILD_OTA_TARBALL', '1', 'ota-tar', ' ', d)}" | 17 | IMAGE_FSTYPES += "${@bb.utils.contains('BUILD_OTA_TARBALL', '1', 'ota-tar ota-tar.xz', ' ', d)}" |
18 | 18 | ||
19 | PACKAGECONFIG_append_pn-curl = " ssl" | 19 | PACKAGECONFIG_append_pn-curl = " ssl" |
20 | PACKAGECONFIG_remove_pn-curl = "gnutls" | 20 | PACKAGECONFIG_remove_pn-curl = "gnutls" |