Skip to contentSkip to conversation

image_types: Add debugging code to ext4 fs creation

PATCH New Saul Wold 1 participant 1 message Nov 21, 2017

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 image_types: Add debugging code to ext4 fs creation

We have seen a small number of issues with ROOTFS_SIZE not getting computed correctly, resulting in a failure in the mke2fs processing and populating the resulting new filesystem.

This information should help us to reproduce [YOCTO #12304]

---
 meta/classes/image_types.bbclass | 4 ++++
 1 file changed, 4 insertions(+)
meta/classes/image_types.bbclass +4 -0
index b373b217145..cab2963756b 100644
@@ -83,7 +83,11 @@ oe_mkext234fs () {
 		eval COUNT=\"$MIN_COUNT\"
 	fi
 	# Create a sparse image block
+	bbdebug 1 Executing "dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024"
 	dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024
+	bbdebug 1 "Actual Rootfs size:  `du -s ${IMAGE_ROOTFS}`"
+	bbdebug 1 "Actual Partion size: `ls -s ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype`"
+	bbdebug 1 Executing "mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}"
 	mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}
 	# Error codes 0-3 indicate successfull operation of fsck (no errors or errors corrected)
 	fsck.$fstype -pvfD ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype || [ $? -le 3 ]
Signature · 1 line
2.13.5