From 8c0aaf79b6b1d7e35bde483c2f41294c595c0794 Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Thu, 16 May 2019 16:16:39 +0200 Subject: [PATCH] base-files: add filter to ignore mmc RPMB partitions The Replay Protected Memory Block (RPMB) is an special storage partition that cannot be accessed via standard block layer. When a user space tool like blkid, tries to read it the kernel suffers buffer I/O errors and timeouts. This commit modifies the post installation script to filter the RPMB partitions from the mmc block devices, to avoid multiple kernel errors during the script execution. https://jira.digi.com/browse/DEL-6609 Signed-off-by: Arturo Buzarra --- .../recipes-core/base-files/base-files_3.0.14.bbappend | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend b/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend index c676446a9..8173b2067 100644 --- a/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend +++ b/meta-digi-dey/recipes-core/base-files/base-files_3.0.14.bbappend @@ -25,9 +25,9 @@ pkg_postinst_ontarget_${PN}() { DM_BLOCK_DEVICE="/dev/dm-" EMMC_BLOCK_DEVICE="$(get_emmc_block_device)" if [ -x "${RESIZE2FS}" -a -n "${EMMC_BLOCK_DEVICE}" ]; then - PARTITIONS="$(blkid | sed -ne "{s,\(^${EMMC_BLOCK_DEVICE}[^:]\+\):.*TYPE=\"ext4\".*,\1,g;T;p}" | sort -u)" + PARTITIONS="$(blkid ${EMMC_BLOCK_DEVICE}p* | sed -ne "{s,\(^${EMMC_BLOCK_DEVICE}[^:]\+\):.*TYPE=\"ext4\".*,\1,g;T;p}" | sort -u)" # Add possible device mapper devices - PARTITIONS="${PARTITIONS} $(blkid | sed -ne "{s,\(^${DM_BLOCK_DEVICE}[^:]\+\):.*TYPE=\"ext4\".*,\1,g;T;p}" | sort -u)" + PARTITIONS="${PARTITIONS} $(blkid ${DM_BLOCK_DEVICE}* | sed -ne "{s,\(^${DM_BLOCK_DEVICE}[^:]\+\):.*TYPE=\"ext4\".*,\1,g;T;p}" | sort -u)" for i in ${PARTITIONS}; do if ! ${RESIZE2FS} ${i} 2>/dev/null; then echo "ERROR: resize2fs ${i}"