]> code.ossystems Code Review - meta-freescale.git/commitdiff
udev[-extraconf]: skip mmc rpmb partitions
authorTing Liu <ting.liu@freescale.com>
Fri, 1 Aug 2014 04:33:16 +0000 (12:33 +0800)
committerZhenhua Luo <zhenhua.luo@freescale.com>
Wed, 6 Aug 2014 03:07:40 +0000 (11:07 +0800)
In FSL SDK 1.6 Kernel, mmc driver has created a new partition
with "mmcblkXrpmb" if device expresses it support of RPMB.

RPMB (Replay Protected Memory Block), A signed access to a Replay
Protected Memory Block is provided. This function provides means
for the system to store data to the specific memory area in an
authenticated and replay protected manner.

In that case, any read/write access to this partition device will
report errors which will not impact any fuction.

add rules to skip it, avoid the below error msg:
| mmcblk0rpmb: retrying using single block read
| mmcblk0rpmb: error -110 transferring data

Signed-off-by: Ting Liu <ting.liu@freescale.com>
meta-fsl-ppc/recipes-core/udev/udev-extraconf_%.bbappend
meta-fsl-ppc/recipes-core/udev/udev/skip-rules-for-mmc-rpmb-partition.patch [new file with mode: 0644]
meta-fsl-ppc/recipes-core/udev/udev_182.bbappend

index db74aacb2250a8ab75e8dbe7660f868caef6ce57..6c2bfe2c6430c5cd2b13ce028d7eee666206e4a9 100644 (file)
@@ -1,10 +1,13 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
 
-SRC_URI_append = " file://${@bb.utils.contains("TUNE_FEATURES", "e6500", \
+SRC_URI_append_qoriq-ppc = " file://${@bb.utils.contains("TUNE_FEATURES", "e6500", \
     "72-fsl-dpaa-persistent-networking.rules", "71-fsl-dpaa-persistent-networking.rules", d)}"
 
-do_install_append () {
+do_install_append_qoriq-ppc () {
     install -d ${D}${sysconfdir}/udev/rules.d/
     install -m 0644 ${WORKDIR}/*-fsl-dpaa-persistent-networking.rules ${D}${sysconfdir}/udev/rules.d
+
+    # skip mmc rpmb partitions
+    echo "/dev/mmcblk.*rpmb" >>${D}${sysconfdir}/udev/mount.blacklist
 }
 
diff --git a/meta-fsl-ppc/recipes-core/udev/udev/skip-rules-for-mmc-rpmb-partition.patch b/meta-fsl-ppc/recipes-core/udev/udev/skip-rules-for-mmc-rpmb-partition.patch
new file mode 100644 (file)
index 0000000..edbc0b3
--- /dev/null
@@ -0,0 +1,41 @@
+From 68a780f4cbba18c01d8409faafb1f7904afa86a9 Mon Sep 17 00:00:00 2001
+From: Ting Liu <ting.liu@freescale.com>
+Date: Thu, 31 Jul 2014 16:12:32 +0800
+Subject: [PATCH] skip rules for mmc rpmb partition
+
+Upstream-status: Pending
+
+In FSL SDK 1.6 Kernel, mmc driver has created a new partition 
+with "mmcblkXrpmb" if device expresses it support of RPMB.
+
+RPMB (Replay Protected Memory Block), A signed access to a Replay 
+Protected Memory Block is provided. This function provides means 
+for the system to store data to the specific memory area in an 
+authenticated and replay protected manner.
+
+In that case, any read/write access to this partition device will 
+report errors which will not impact any fuction.
+
+add rules to skip it.
+
+Signed-off-by: Ting Liu <ting.liu@freescale.com>
+---
+ rules/60-persistent-storage.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
+index fa687f2..bb3f8f9 100644
+--- a/rules/60-persistent-storage.rules
++++ b/rules/60-persistent-storage.rules
+@@ -14,7 +14,7 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
+ SUBSYSTEM!="block", GOTO="persistent_storage_end"
+ # skip rules for inappropriate block devices
+-KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|dm-*|md*", GOTO="persistent_storage_end"
++KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|dm-*|md*|mmcblk*rpmb", GOTO="persistent_storage_end"
+ # ignore partitions that span the entire disk
+ TEST=="whole_disk", GOTO="persistent_storage_end"
+-- 
+1.8.3.2
+
index 72d991c7e590bcac43dd2ab6da2de898cd36f829..4eedfd89253991adc73d12d30bb745ebfbaf4a7c 100644 (file)
@@ -1 +1,6 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
+
+SRC_URI_append_qoriq-ppc = " \
+    file://skip-rules-for-mmc-rpmb-partition.patch \
+"
+