<commit_before># Base this image on core-image-minimal
include recipes-core/images/core-image-minimal.bb

inherit image-resin

#
# Set size of rootfs at a fixed value of maximum 180MiB
#

# keep this aligned to IMAGE_ROOTFS_ALIGNMENT
IMAGE_ROOTFS_SIZE = "180224"

# No overhead factor
IMAGE_OVERHEAD_FACTOR = "1.0"

# No extra space
IMAGE_ROOTFS_EXTRA_SPACE = "0"

# core-image-minimal add 4M to IMAGE_ROOTFS_EXTRA_SPACE
# Make IMAGE_ROOTFS_MAXSIZE = IMAGE_ROOTFS_SIZE + 4M
IMAGE_ROOTFS_MAXSIZE = "184320"


# Generated resinhup-tar based on RESINHUP variable
IMAGE_FSTYPES = "${<EMAIL>('RESINHUP', 'yes', 'resinhup-tar', '', d)}"

IMAGE_FEATURES_append = " \
    ${<EMAIL>('DISTRO_FEATURES', 'debug-image', 'debug-tweaks', '', d)} \
    splash \
    ssh-server-dropbear \
    "

IMAGE_INSTALL_append = " \
    packagegroup-resin-connectivity \
    packagegroup-resin \
    "

generate_rootfs_fingerprints () {
    find ${IMAGE_ROOTFS} -xdev -type f -exec md5sum {} \; | sed "s#${IMAGE_ROOTFS}##g" | sort -k2 > ${IMAGE_ROOTFS}/${RESIN_ROOT_FS_LABEL}.${FINGERPRINT_EXT}
}

generate_hostos_version () {
    echo "${HOSTOS_VERSION}" > ${DEPLOY_DIR_IMAGE}/VERSION_HOSTOS
}

ROOTFS_POSTPROCESS_COMMAND += " generate_rootfs_fingerprints ; "
IMAGE_POSTPROCESS_COMMAND += " generate_hostos_version ; "

RESIN_BOOT_PARTITION_FILES_append = " resin-logo.png:/splash/resin-logo.png"<commit_msg>resin-image: Generate fingerprints just before image creation<commit_after># Base this image on core-image-minimal
include recipes-core/images/core-image-minimal.bb

inherit image-resin

#
# Set size of rootfs at a fixed value of maximum 180MiB
#

# keep this aligned to IMAGE_ROOTFS_ALIGNMENT
IMAGE_ROOTFS_SIZE = "180224"

# No overhead factor
IMAGE_OVERHEAD_FACTOR = "1.0"

# No extra space
IMAGE_ROOTFS_EXTRA_SPACE = "0"

# core-image-minimal add 4M to IMAGE_ROOTFS_EXTRA_SPACE
# Make IMAGE_ROOTFS_MAXSIZE = IMAGE_ROOTFS_SIZE + 4M
IMAGE_ROOTFS_MAXSIZE = "184320"


# Generated resinhup-tar based on RESINHUP variable
IMAGE_FSTYPES = "${<EMAIL>.contains('RESINHUP', 'yes', 'resinhup-tar', '', d)}"

IMAGE_FEATURES_append = " \
    ${<EMAIL>.contains('DISTRO_FEATURES', 'debug-image', 'debug-tweaks', '', d)} \
    splash \
    ssh-server-dropbear \
    "

IMAGE_INSTALL_append = " \
    packagegroup-resin-connectivity \
    packagegroup-resin \
    "

generate_rootfs_fingerprints () {
    find ${IMAGE_ROOTFS} -xdev -type f -exec md5sum {} \; | sed "s#${IMAGE_ROOTFS}##g" | sort -k2 > ${IMAGE_ROOTFS}/${RESIN_ROOT_FS_LABEL}.${FINGERPRINT_EXT}
}

generate_hostos_version () {
    echo "${HOSTOS_VERSION}" > ${DEPLOY_DIR_IMAGE}/VERSION_HOSTOS
}

IMAGE_PREPROCESS_COMMAND += " generate_rootfs_fingerprints ; "
IMAGE_POSTPROCESS_COMMAND += " generate_hostos_version ; "

RESIN_BOOT_PARTITION_FILES_append = " resin-logo.png:/splash/resin-logo.png"
{'fraction_non_alphanumeric': 0.12367491166077739, 'fraction_numerical': 0.015547703180212015, 'mean_word_length': 4.849173553719008, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '130987', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1051, 'n_words': 191}