Merge pull request #443 from vpeter4/fsck

scripts/mkimage: check filesystem on system partition
This commit is contained in:
MilhouseVH 2016-06-13 02:34:56 +01:00 committed by GitHub
commit 64949dd51f

View File

@ -268,6 +268,14 @@ fi # bootloader
echo "image: merging part2 back to image..." echo "image: merging part2 back to image..."
dd if="$OE_TMP/part2.ext4" of="$DISK" bs=512 seek="$STORAGE_PART_START" conv=fsync,notrunc >"$SAVE_ERROR" 2>&1 || show_error dd if="$OE_TMP/part2.ext4" of="$DISK" bs=512 seek="$STORAGE_PART_START" conv=fsync,notrunc >"$SAVE_ERROR" 2>&1 || show_error
# extract part1 from image to run fsck
echo "image: extracting part1 from image..."
SYSTEM_PART_COUNT=$(( $SYSTEM_PART_END - $SYSTEM_PART_START + 1 ))
sync
dd if="$DISK" of="$OE_TMP/part1.fat" bs=512 skip="$SYSTEM_PART_START" count="$SYSTEM_PART_COUNT" conv=fsync >"$SAVE_ERROR" 2>&1 || show_error
echo "image: checking filesystem on part1..."
fsck -n $OE_TMP/part1.fat >"$SAVE_ERROR" 2>&1 || show_error
# gzip # gzip
echo "image: compressing..." echo "image: compressing..."
gzip $DISK gzip $DISK