def __get_rootfs_dir(rootfs_dir): if os.path.isdir(rootfs_dir): return rootfs_dir bitbake_env_lines = find_bitbake_env_lines(rootfs_dir) if not bitbake_env_lines: msg = "Couldn't get bitbake environment, exiting." msger.error(msg) image_rootfs_dir = find_artifact(bitbake_env_lines, "IMAGE_ROOTFS") if not os.path.isdir(image_rootfs_dir): msg = "No valid artifact IMAGE_ROOTFS from image named" msg += " %s has been found at %s, exiting.\n" % (rootfs_dir, image_rootfs_dir) msger.error(msg) return image_rootfs_dir
def __get_rootfs_dir(rootfs_dir): if os.path.isdir(rootfs_dir): return rootfs_dir bitbake_env_lines = find_bitbake_env_lines(rootfs_dir) if not bitbake_env_lines: msg = "Couldn't get bitbake environment, exiting." msger.error(msg) image_rootfs_dir = find_artifact(bitbake_env_lines, "IMAGE_ROOTFS") if not os.path.isdir(image_rootfs_dir): msg = "No valid artifact IMAGE_ROOTFS from image named" msg += " %s has been found at %s, exiting.\n" % \ (rootfs_dir, image_rootfs_dir) msger.error(msg) return image_rootfs_dir
def _get_rootfs_dir(rootfs_dir): """ Find rootfs pseudo dir If rootfs_dir is a directory consider it as rootfs directory. Otherwise ask bitbake about the IMAGE_ROOTFS directory. """ if os.path.isdir(rootfs_dir): return rootfs_dir bitbake_env_lines = misc.find_bitbake_env_lines(rootfs_dir) if not bitbake_env_lines: msger.error("Couldn't get bitbake environment, exiting.") image_rootfs_dir = misc.find_artifact(bitbake_env_lines, "IMAGE_ROOTFS") if not os.path.isdir(image_rootfs_dir): msg = "No valid artifact IMAGE_ROOTFS from image named" msg += " %s has been found at %s, exiting.\n" % \ (rootfs_dir, image_rootfs_dir) msger.error(msg) return image_rootfs_dir