mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 13:49:41 +01:00
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:
@@ -9,8 +9,8 @@ LABELS_append = " ${SYSLINUX_LABELS} "
|
||||
|
||||
ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
|
||||
|
||||
do_bootimg[depends] += "${INITRD_IMAGE}:do_rootfs"
|
||||
do_bootimg[depends] += "${PN}:do_rootfs"
|
||||
do_bootimg[depends] += "${INITRD_IMAGE}:do_image_complete"
|
||||
do_bootimg[depends] += "${PN}:do_image_complete"
|
||||
|
||||
inherit bootimg
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ LABELS_append = " ${SYSLINUX_LABELS} "
|
||||
# Using an initramfs is optional. Enable it by setting INITRD_IMAGE.
|
||||
INITRD_IMAGE ?= ""
|
||||
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
|
||||
do_bootdirectdisk[depends] += "${PN}:do_rootfs"
|
||||
do_bootdirectdisk[depends] += "${PN}:do_image_complete"
|
||||
ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
|
||||
|
||||
# creating VM images relies on having a hddimg so ensure we inherit it here.
|
||||
|
||||
@@ -167,7 +167,7 @@ python () {
|
||||
initramfs_image = d.getVar('INITRAMFS_IMAGE', True) or ""
|
||||
if initramfs_image != "":
|
||||
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"
|
||||
@@ -486,4 +486,4 @@ do_bundle_initramfs[noexec] = "1"
|
||||
do_bundle_initramfs () {
|
||||
:
|
||||
}
|
||||
addtask bundle_initramfs after do_rootfs
|
||||
addtask bundle_initramfs after do_image_complete
|
||||
|
||||
@@ -93,7 +93,7 @@ IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE
|
||||
IMAGE_CMD_TAR ?= "tar"
|
||||
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 () {
|
||||
(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
|
||||
@@ -200,8 +200,8 @@ IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
|
||||
|
||||
# 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)}"
|
||||
do_rootfs[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[file-checksums] += "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
|
||||
do_image_wic[vardeps] += "${@bb.utils.contains("USING_WIC", "1", "${WICVARS}", "", d)}"
|
||||
|
||||
EXTRA_IMAGECMD = ""
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ python __anonymous () {
|
||||
|
||||
image = d.getVar('INITRAMFS_IMAGE', True)
|
||||
if image:
|
||||
d.appendVarFlag('do_assemble_fitimage', 'depends', ' ${INITRAMFS_IMAGE}:do_rootfs')
|
||||
d.appendVarFlag('do_assemble_fitimage', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
|
||||
}
|
||||
|
||||
#
|
||||
|
||||
@@ -25,7 +25,7 @@ python __anonymous () {
|
||||
|
||||
image = d.getVar('INITRAMFS_IMAGE', True)
|
||||
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
|
||||
# The preferred method is to set INITRAMFS_IMAGE, because
|
||||
|
||||
@@ -67,6 +67,10 @@ do_rm_work () {
|
||||
i=dummy
|
||||
break
|
||||
;;
|
||||
*do_image*)
|
||||
i=dummy
|
||||
break
|
||||
;;
|
||||
*do_build*)
|
||||
i=dummy
|
||||
break
|
||||
@@ -108,7 +112,7 @@ rm_work_populatesdk () {
|
||||
}
|
||||
rm_work_populatesdk[cleandirs] = "${WORKDIR}/sdk"
|
||||
|
||||
do_rootfs[postfuncs] += "rm_work_rootfs"
|
||||
do_image_complete[postfuncs] += "rm_work_rootfs"
|
||||
rm_work_rootfs () {
|
||||
:
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@ inherit testimage
|
||||
python do_testimage_auto() {
|
||||
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[lockfiles] += "${TESTIMAGELOCK}"
|
||||
|
||||
Reference in New Issue
Block a user