diff options
Diffstat (limited to 'meta/classes/image-vm.bbclass')
-rw-r--r-- | meta/classes/image-vm.bbclass | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass index bf57e2c6c5..32c6550037 100644 --- a/meta/classes/image-vm.bbclass +++ b/meta/classes/image-vm.bbclass @@ -33,14 +33,14 @@ IMAGE_TYPEDEP_hdddirect = "${VM_ROOTFS_TYPE}" IMAGE_TYPES_MASKED += "vmdk vdi qcow2 hdddirect" VM_ROOTFS_TYPE ?= "ext4" -ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${VM_ROOTFS_TYPE}" +ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${VM_ROOTFS_TYPE}" # Used by bootloader LABELS_VM ?= "boot" ROOT_VM ?= "root=/dev/sda2" # Using an initramfs is optional. Enable it by setting INITRD_IMAGE_VM. INITRD_IMAGE_VM ?= "" -INITRD_VM ?= "${@'${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_VM}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE_VM}' else ''}" +INITRD_VM ?= "${@'${IMGDEPLOYDIR}/${INITRD_IMAGE_VM}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE_VM}' else ''}" do_bootdirectdisk[depends] += "${@'${INITRD_IMAGE_VM}:do_image_complete' if '${INITRD_IMAGE_VM}' else ''}" BOOTDD_VOLUME_ID ?= "boot" @@ -52,7 +52,7 @@ DISK_SIGNATURE[vardepsexclude] = "DISK_SIGNATURE_GENERATED" build_boot_dd() { HDDDIR="${S}/hdd/boot" HDDIMG="${S}/hdd.image" - IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect + IMAGE=${IMGDEPLOYDIR}/${IMAGE_NAME}.hdddirect populate_kernel $HDDDIR @@ -104,13 +104,13 @@ build_boot_dd() { dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512 dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512 - cd ${DEPLOY_DIR_IMAGE} + cd ${IMGDEPLOYDIR} - if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ]; then - rm -f $(readlink -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect) + if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ]; then + rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect) fi - ln -sf ${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect + ln -sf ${IMAGE_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect } python do_bootdirectdisk() { @@ -145,13 +145,13 @@ DISK_SIGNATURE_GENERATED := "${@generate_disk_signature()}" run_qemu_img (){ type="$1" - qemu-img convert -O $type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.$type + qemu-img convert -O $type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type - if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type ]; then - rm -f $(readlink -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type) + if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type ]; then + rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type) fi - ln -sf ${IMAGE_NAME}.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type + ln -sf ${IMAGE_NAME}.$type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type } create_vmdk_image () { run_qemu_img vmdk |