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 ]
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 <levi.shafter@elder-tomes.com> --- Sponsor: 21SoftWare LLC meta/classes-recipe/image_types.bbclass | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) + fi } IMAGE_CMD:ext2 = "oe_mkext234fs ext2 ${EXTRA_IMAGECMD}"