summaryrefslogtreecommitdiffstats
path: root/meta/classes/image-vm.bbclass
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-09-01 11:56:00 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-04 00:07:28 +0100
commit9cc449273252314fdc88cd62deb18a3e03d8abd5 (patch)
tree7be59be75f83dc27aaf1cc8b1e816bce1f03c434 /meta/classes/image-vm.bbclass
parent619d2996fbb12e6ab63daa73b2d9683023cc2744 (diff)
downloadpoky-9cc449273252314fdc88cd62deb18a3e03d8abd5.tar.gz
image: Deploy images to IMGDEPLOYDIR
Changed deployment directory from DEPLOY_DIR_IMAGE to IMGDEPLOYDIR to make sstate machinery to do final deployment and generate manifest. Renamed variable deploy_dir to deploy_dir_image in selftest code to avoid confusion with DEPLOYDIR variable. Updated the code of rootfs.py:Rootfs class to use IMGDEPLOYDIR variable as it's now used as a new deployment destination. (From OE-Core rev: 6d969bacc718e21a5246d4da9bf9639dcae29b02) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image-vm.bbclass')
-rw-r--r--meta/classes/image-vm.bbclass22
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}"
33IMAGE_TYPES_MASKED += "vmdk vdi qcow2 hdddirect" 33IMAGE_TYPES_MASKED += "vmdk vdi qcow2 hdddirect"
34 34
35VM_ROOTFS_TYPE ?= "ext4" 35VM_ROOTFS_TYPE ?= "ext4"
36ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${VM_ROOTFS_TYPE}" 36ROOTFS ?= "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${VM_ROOTFS_TYPE}"
37 37
38# Used by bootloader 38# Used by bootloader
39LABELS_VM ?= "boot" 39LABELS_VM ?= "boot"
40ROOT_VM ?= "root=/dev/sda2" 40ROOT_VM ?= "root=/dev/sda2"
41# Using an initramfs is optional. Enable it by setting INITRD_IMAGE_VM. 41# Using an initramfs is optional. Enable it by setting INITRD_IMAGE_VM.
42INITRD_IMAGE_VM ?= "" 42INITRD_IMAGE_VM ?= ""
43INITRD_VM ?= "${@'${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_VM}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE_VM}' else ''}" 43INITRD_VM ?= "${@'${IMGDEPLOYDIR}/${INITRD_IMAGE_VM}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE_VM}' else ''}"
44do_bootdirectdisk[depends] += "${@'${INITRD_IMAGE_VM}:do_image_complete' if '${INITRD_IMAGE_VM}' else ''}" 44do_bootdirectdisk[depends] += "${@'${INITRD_IMAGE_VM}:do_image_complete' if '${INITRD_IMAGE_VM}' else ''}"
45 45
46BOOTDD_VOLUME_ID ?= "boot" 46BOOTDD_VOLUME_ID ?= "boot"
@@ -52,7 +52,7 @@ DISK_SIGNATURE[vardepsexclude] = "DISK_SIGNATURE_GENERATED"
52build_boot_dd() { 52build_boot_dd() {
53 HDDDIR="${S}/hdd/boot" 53 HDDDIR="${S}/hdd/boot"
54 HDDIMG="${S}/hdd.image" 54 HDDIMG="${S}/hdd.image"
55 IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect 55 IMAGE=${IMGDEPLOYDIR}/${IMAGE_NAME}.hdddirect
56 56
57 populate_kernel $HDDDIR 57 populate_kernel $HDDDIR
58 58
@@ -104,13 +104,13 @@ build_boot_dd() {
104 dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512 104 dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
105 dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512 105 dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
106 106
107 cd ${DEPLOY_DIR_IMAGE} 107 cd ${IMGDEPLOYDIR}
108 108
109 if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ]; then 109 if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ]; then
110 rm -f $(readlink -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect) 110 rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect)
111 fi 111 fi
112 112
113 ln -sf ${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect 113 ln -sf ${IMAGE_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect
114} 114}
115 115
116python do_bootdirectdisk() { 116python do_bootdirectdisk() {
@@ -145,13 +145,13 @@ DISK_SIGNATURE_GENERATED := "${@generate_disk_signature()}"
145 145
146run_qemu_img (){ 146run_qemu_img (){
147 type="$1" 147 type="$1"
148 qemu-img convert -O $type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.$type 148 qemu-img convert -O $type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.hdddirect ${IMGDEPLOYDIR}/${IMAGE_NAME}.$type
149 149
150 if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type ]; then 150 if [ "${RM_OLD_IMAGE}" = "1" ] && [ -L ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type ]; then
151 rm -f $(readlink -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type) 151 rm -f $(readlink -f ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type)
152 fi 152 fi
153 153
154 ln -sf ${IMAGE_NAME}.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type 154 ln -sf ${IMAGE_NAME}.$type ${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.$type
155} 155}
156create_vmdk_image () { 156create_vmdk_image () {
157 run_qemu_img vmdk 157 run_qemu_img vmdk