diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/image_types_ota.bbclass | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/classes/image_types_ota.bbclass b/classes/image_types_ota.bbclass index 9eecd1b..ceea339 100644 --- a/classes/image_types_ota.bbclass +++ b/classes/image_types_ota.bbclass | |||
@@ -114,19 +114,19 @@ IMAGE_CMD_otaimg () { | |||
114 | # Calculate image type | 114 | # Calculate image type |
115 | OTA_ROOTFS_SIZE=$(calculate_size `du -ks $PHYS_SYSROOT | cut -f 1` "${IMAGE_OVERHEAD_FACTOR}" "${IMAGE_ROOTFS_SIZE}" "${IMAGE_ROOTFS_MAXSIZE}" `expr ${IMAGE_ROOTFS_EXTRA_SPACE}` "${IMAGE_ROOTFS_ALIGNMENT}") | 115 | OTA_ROOTFS_SIZE=$(calculate_size `du -ks $PHYS_SYSROOT | cut -f 1` "${IMAGE_OVERHEAD_FACTOR}" "${IMAGE_ROOTFS_SIZE}" "${IMAGE_ROOTFS_MAXSIZE}" `expr ${IMAGE_ROOTFS_EXTRA_SPACE}` "${IMAGE_ROOTFS_ALIGNMENT}") |
116 | 116 | ||
117 | if [ $OTA_ROOTFS_SIZE -lt 0 ]; then | 117 | if [ ${OTA_ROOTFS_SIZE} -lt 0 ]; then |
118 | exit -1 | 118 | exit -1 |
119 | fi | 119 | fi |
120 | eval local COUNT=\"0\" | 120 | eval local COUNT=\"0\" |
121 | eval local MIN_COUNT=\"60\" | 121 | eval local MIN_COUNT=\"60\" |
122 | if [ $OTA_ROOTFS_SIZE -lt $MIN_COUNT ]; then | 122 | if [ ${OTA_ROOTFS_SIZE} -lt ${MIN_COUNT} ]; then |
123 | eval COUNT=\"$MIN_COUNT\" | 123 | eval COUNT=\"${MIN_COUNT}\" |
124 | fi | 124 | fi |
125 | 125 | ||
126 | # create image | 126 | # create image |
127 | rm -rf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg | 127 | rm -rf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg |
128 | sync | 128 | sync |
129 | dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg seek=$OTA_ROOTFS_SIZE count=$COUNT bs=1024 | 129 | dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg seek=${OTA_ROOTFS_SIZE} count=${COUNT} bs=1024 |
130 | mkfs.ext4 -O ^64bit ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg -L otaroot -d ${PHYS_SYSROOT} | 130 | mkfs.ext4 -O ^64bit ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.otaimg -L otaroot -d ${PHYS_SYSROOT} |
131 | rm -rf ${PHYS_SYSROOT} | 131 | rm -rf ${PHYS_SYSROOT} |
132 | 132 | ||