rockchip-gpt-img: fix intermittent build failure

If a new build is kicked off, and no changes are required to the image
contents themselves, but a new rockchip gpt image needs to be generated, the
build will fail because this build (run now) will look for an ext4 rootfs that
should also exist from this build. However, since no changes were made to the
rootfs, a rootfs with this build's timestamp will not exist. I.e. when
generating the rockchip gpt image, the script currently looks for the rootfs
in:

	<image name>-<machine name>-<timestamp>.rootfs.<rootfs type>

In other words, if the last build to be done had a timestamp of <yesterday>
and the build the is currently running has a timestamp of <now>, when the
build tries to generate the rockchip gpt image, it will look for:

	<image name>-<machine name>-<now>.rootfs.ext4

but that file will not exist. The file that will exist is:

	<image name>-<machine name>-<yesterday>.rootfs.ext4

Therefore, don't look for the absolute file, but use the symlink instead which
does not include the timestamp, but will point to the latest rootfs:

	<image name>-<machine name>.ext4

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
This commit is contained in:
Trevor Woerner 2018-04-25 09:23:20 -04:00
parent 87a8187d39
commit 1fa1fba729

View File

@ -6,7 +6,7 @@ inherit image_types
# Use an uncompressed ext4 by default as rootfs # Use an uncompressed ext4 by default as rootfs
IMG_ROOTFS_TYPE = "ext4" IMG_ROOTFS_TYPE = "ext4"
IMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.${IMG_ROOTFS_TYPE}" IMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${IMG_ROOTFS_TYPE}"
# This image depends on the rootfs image # This image depends on the rootfs image
IMAGE_TYPEDEP_rockchip-gpt-img = "${IMG_ROOTFS_TYPE}" IMAGE_TYPEDEP_rockchip-gpt-img = "${IMG_ROOTFS_TYPE}"