classes: Fix do_rootfs references

After the separation of do_rootfs, some rootfs references need changing
to image_complete.

(From OE-Core rev: 59a5f596ca29b1eb8283706e3c60fbb39f9c2c23)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2016-01-06 22:57:49 +00:00
parent 0a4e1f968a
commit 3341f3fbee
8 changed files with 17 additions and 13 deletions

View File

@ -9,8 +9,8 @@ LABELS_append = " ${SYSLINUX_LABELS} "
ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4" ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
do_bootimg[depends] += "${INITRD_IMAGE}:do_rootfs" do_bootimg[depends] += "${INITRD_IMAGE}:do_image_complete"
do_bootimg[depends] += "${PN}:do_rootfs" do_bootimg[depends] += "${PN}:do_image_complete"
inherit bootimg inherit bootimg

View File

@ -6,10 +6,10 @@ LABELS_append = " ${SYSLINUX_LABELS} "
# Using an initramfs is optional. Enable it by setting INITRD_IMAGE. # Using an initramfs is optional. Enable it by setting INITRD_IMAGE.
INITRD_IMAGE ?= "" INITRD_IMAGE ?= ""
INITRD ?= "${@'${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE}' else ''}" INITRD ?= "${@'${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE}' else ''}"
do_bootdirectdisk[depends] += "${@'${INITRD_IMAGE}:do_rootfs' if '${INITRD_IMAGE}' else ''}" do_bootdirectdisk[depends] += "${@'${INITRD_IMAGE}:do_image_complete' if '${INITRD_IMAGE}' else ''}"
# need to define the dependency and the ROOTFS for directdisk # need to define the dependency and the ROOTFS for directdisk
do_bootdirectdisk[depends] += "${PN}:do_rootfs" do_bootdirectdisk[depends] += "${PN}:do_image_complete"
ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4" ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
# creating VM images relies on having a hddimg so ensure we inherit it here. # creating VM images relies on having a hddimg so ensure we inherit it here.

View File

@ -167,7 +167,7 @@ python () {
initramfs_image = d.getVar('INITRAMFS_IMAGE', True) or "" initramfs_image = d.getVar('INITRAMFS_IMAGE', True) or ""
if initramfs_image != "": if initramfs_image != "":
d.appendVarFlag('do_build', 'depends', " %s:do_bundle_initramfs" % d.getVar('PN', True)) d.appendVarFlag('do_build', 'depends', " %s:do_bundle_initramfs" % d.getVar('PN', True))
d.appendVarFlag('do_bundle_initramfs', 'depends', " %s:do_rootfs" % initramfs_image) d.appendVarFlag('do_bundle_initramfs', 'depends', " %s:do_image_complete" % initramfs_image)
} }
IMAGE_CLASSES += "image_types" IMAGE_CLASSES += "image_types"
@ -486,4 +486,4 @@ do_bundle_initramfs[noexec] = "1"
do_bundle_initramfs () { do_bundle_initramfs () {
: :
} }
addtask bundle_initramfs after do_rootfs addtask bundle_initramfs after do_image_complete

View File

@ -93,7 +93,7 @@ IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE
IMAGE_CMD_TAR ?= "tar" IMAGE_CMD_TAR ?= "tar"
IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar -C ${IMAGE_ROOTFS} ." IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar -C ${IMAGE_ROOTFS} ."
do_rootfs[cleandirs] += "${WORKDIR}/cpio_append" do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
IMAGE_CMD_cpio () { IMAGE_CMD_cpio () {
(cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio) (cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
if [ ! -L ${IMAGE_ROOTFS}/init -a ! -e ${IMAGE_ROOTFS}/init ]; then if [ ! -L ${IMAGE_ROOTFS}/init -a ! -e ${IMAGE_ROOTFS}/init ]; then
@ -200,8 +200,8 @@ IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
# Rebuild when the wks file or vars in WICVARS change # Rebuild when the wks file or vars in WICVARS change
USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${COMPRESSIONTYPES}'.split()), '1', '', d)}" USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${COMPRESSIONTYPES}'.split()), '1', '', d)}"
do_rootfs[file-checksums] += "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}" do_image_wic[file-checksums] += "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
do_rootfs[vardeps] += "${@bb.utils.contains("USING_WIC", "1", "${WICVARS}", "", d)}" do_image_wic[vardeps] += "${@bb.utils.contains("USING_WIC", "1", "${WICVARS}", "", d)}"
EXTRA_IMAGECMD = "" EXTRA_IMAGECMD = ""

View File

@ -14,7 +14,7 @@ python __anonymous () {
image = d.getVar('INITRAMFS_IMAGE', True) image = d.getVar('INITRAMFS_IMAGE', True)
if image: if image:
d.appendVarFlag('do_assemble_fitimage', 'depends', ' ${INITRAMFS_IMAGE}:do_rootfs') d.appendVarFlag('do_assemble_fitimage', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
} }
# #

View File

@ -25,7 +25,7 @@ python __anonymous () {
image = d.getVar('INITRAMFS_IMAGE', True) image = d.getVar('INITRAMFS_IMAGE', True)
if image: if image:
d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_rootfs') d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
# NOTE: setting INITRAMFS_TASK is for backward compatibility # NOTE: setting INITRAMFS_TASK is for backward compatibility
# The preferred method is to set INITRAMFS_IMAGE, because # The preferred method is to set INITRAMFS_IMAGE, because

View File

@ -67,6 +67,10 @@ do_rm_work () {
i=dummy i=dummy
break break
;; ;;
*do_image*)
i=dummy
break
;;
*do_build*) *do_build*)
i=dummy i=dummy
break break
@ -108,7 +112,7 @@ rm_work_populatesdk () {
} }
rm_work_populatesdk[cleandirs] = "${WORKDIR}/sdk" rm_work_populatesdk[cleandirs] = "${WORKDIR}/sdk"
do_rootfs[postfuncs] += "rm_work_rootfs" do_image_complete[postfuncs] += "rm_work_rootfs"
rm_work_rootfs () { rm_work_rootfs () {
: :
} }

View File

@ -18,6 +18,6 @@ inherit testimage
python do_testimage_auto() { python do_testimage_auto() {
testimage_main(d) testimage_main(d)
} }
addtask testimage_auto before do_build after do_rootfs addtask testimage_auto before do_build after do_image_complete
do_testimage_auto[depends] += "${TESTIMAGEDEPENDS}" do_testimage_auto[depends] += "${TESTIMAGEDEPENDS}"
do_testimage_auto[lockfiles] += "${TESTIMAGELOCK}" do_testimage_auto[lockfiles] += "${TESTIMAGELOCK}"