diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2011-09-03 23:27:17 +0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-09-05 20:25:46 +0100 |
commit | 654112e76c23fab2ee7105fc5927ac98b5aa9daa (patch) | |
tree | a3e5b2c6aa816be2031b6c696728ba583a055f7a /meta | |
parent | fa4555268833ab30e4a4802c3afce119062951b9 (diff) | |
download | poky-654112e76c23fab2ee7105fc5927ac98b5aa9daa.tar.gz |
image_types.bbclass: use per-image dirs for extX.gz images generation
Currently image_types.bbclass uses deploy/images/${MACHINE}tpm.gz dir for
temporary files when generating extX.gz images. This can lead to races
and strange errors during image generation. To overcome this use
deploy/images/${MACHINE}tpm.gz-${PN} dir for temporary files.
(From OE-Core rev: 3016f8f13e86034cc1c5686fc01a3bf39eb33d79)
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/image_types.bbclass | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index 2bdda41945..1abd53334f 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass | |||
@@ -40,11 +40,11 @@ IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.r | |||
40 | 40 | ||
41 | IMAGE_CMD_ext2 = "genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2" | 41 | IMAGE_CMD_ext2 = "genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2" |
42 | IMAGE_CMD_ext2.gz () { | 42 | IMAGE_CMD_ext2.gz () { |
43 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz | 43 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} |
44 | genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2 | 44 | genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2 |
45 | gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2 | 45 | gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2 |
46 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz | 46 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz |
47 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz | 47 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} |
48 | } | 48 | } |
49 | 49 | ||
50 | IMAGE_CMD_ext3 () { | 50 | IMAGE_CMD_ext3 () { |
@@ -52,12 +52,12 @@ IMAGE_CMD_ext3 () { | |||
52 | tune2fs -j ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 | 52 | tune2fs -j ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 |
53 | } | 53 | } |
54 | IMAGE_CMD_ext3.gz () { | 54 | IMAGE_CMD_ext3.gz () { |
55 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz | 55 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} |
56 | genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3 | 56 | genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext3 |
57 | tune2fs -j ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3 | 57 | tune2fs -j ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext3 |
58 | gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3 | 58 | gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext3 |
59 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3.gz | 59 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext3.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3.gz |
60 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz | 60 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} |
61 | } | 61 | } |
62 | 62 | ||
63 | oe_mkext4fs () { | 63 | oe_mkext4fs () { |
@@ -77,11 +77,11 @@ IMAGE_CMD_ext4 () { | |||
77 | oe_mkext4fs ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4 | 77 | oe_mkext4fs ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4 |
78 | } | 78 | } |
79 | IMAGE_CMD_ext4.gz () { | 79 | IMAGE_CMD_ext4.gz () { |
80 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz | 80 | rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} |
81 | oe_mkext4fs ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext4 | 81 | oe_mkext4fs ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext4 |
82 | gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext4 | 82 | gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext4 |
83 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext4.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4.gz | 83 | mv ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}/${IMAGE_NAME}.rootfs.ext4.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4.gz |
84 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz | 84 | rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN} |
85 | } | 85 | } |
86 | 86 | ||
87 | IMAGE_CMD_btrfs () { | 87 | IMAGE_CMD_btrfs () { |