I’m using meta-mender/meta-mender-core with a Toradex Apalis imx8 board (branch kirkstone).
When I copy the sdimg to a SD card with bmaptool, the 1st vfat boot partition is incorrect. Normal files are here, but the partition shows a lot of errors.
After investigating, I think there is an error in the mender-bootimg.bbclass.
The following patch corrects this error :
diff --git a/meta-mender-core/classes/mender-bootimg.bbclass b/meta-mender-core/classes/mender-bootimg.bbclass
index 755772f7..12ed7690 100644
--- a/meta-mender-core/classes/mender-bootimg.bbclass
+++ b/meta-mender-core/classes/mender-bootimg.bbclass
@@ -25,7 +25,7 @@ IMAGE_CMD:bootimg() {
mender_merge_bootfs_and_image_boot_files
rm -f "${WORKDIR}/boot.${MENDER_BOOT_PART_FSTYPE_TO_GEN}"
- dd if=/dev/zero of="${WORKDIR}/boot.${MENDER_BOOT_PART_FSTYPE_TO_GEN}" count=0 bs=1M seek=${MENDER_BOOT_PART_SIZE_MB}
+ dd if=/dev/zero of="${WORKDIR}/boot.${MENDER_BOOT_PART_FSTYPE_TO_GEN}" bs=1M count=${MENDER_BOOT_PART_SIZE_MB}
if [ ${MENDER_BOOT_PART_FSTYPE_TO_GEN} = "vfat" ]; then
mkfs.${MENDER_BOOT_PART_FSTYPE_TO_GEN} \
$force_flag \