The fsck in oe_mkext234fs() was added to prevent an extra reboot on the target:
https://git.openembedded.org/openembedded-core/commit/?id=a93d0059341 This has the side effect of increasing delta between images which prevents reproducibility. In many cases, the added security provided by image reproducibility is worth the extra reboot upon first booting the target. The use of fsck should be included by default, but left configurable. [YOCTO #16110] Signed-off-by: Levi Shafter <[email protected]> --- Sponsor: 21SoftWare LLC meta/classes-recipe/image_types.bbclass | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/meta/classes-recipe/image_types.bbclass b/meta/classes-recipe/image_types.bbclass index e6ef0ce11e..63dc504f8c 100644 --- a/meta/classes-recipe/image_types.bbclass +++ b/meta/classes-recipe/image_types.bbclass @@ -92,8 +92,14 @@ oe_mkext234fs () { bbdebug 1 "Actual Partition size: `stat -c '%s' ${IMGDEPLOYDIR}/${IMAGE_NAME}.$fstype`" bbdebug 1 Executing "mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}.$fstype -d ${IMAGE_ROOTFS}" mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}.$fstype -d ${IMAGE_ROOTFS} - # Error codes 0-3 indicate successfull operation of fsck (no errors or errors corrected) - fsck.$fstype -pvfD ${IMGDEPLOYDIR}/${IMAGE_NAME}.$fstype || [ $? -le 3 ] + + if [ '${RUN_FSCK}' = "0" ]; then + bbdebug 1 "Skipping fsck for reduced image delta" + else + bbdebug 1 "Running fsck on image" + # Error codes 0-3 indicate successful operation of fsck (no errors or errors corrected) + fsck.$fstype -pvfD ${IMGDEPLOYDIR}/${IMAGE_NAME}.$fstype || [ $? -le 3 ] + fi } IMAGE_CMD:ext2 = "oe_mkext234fs ext2 ${EXTRA_IMAGECMD}"
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#228752): https://lists.openembedded.org/g/openembedded-core/message/228752 Mute This Topic: https://lists.openembedded.org/mt/117020092/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
