Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore internal eMMC #247

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions udev/rules.d/96-cryptosd.rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@

SUBSYSTEM!="block", GOTO="cryptosd_end"

# Ignore the additions / changes by Jolla per
# https://git.sailfishos.org/mer-core/udisks2/blob/master/rpm/0005-Add-udev-rule-for-the-sda-drives.patch
# Ignore the additions / changes by Jolla before and after this commit / PR 4
# https://github.com/sailfishos/udisks2/pull/4/files
# by setting these anew / clobbering these for *all suitable* devices.
KERNEL=="mmcblk[1-9]*", ENV{DEVTYPE}=="disk", ENV{MMC_TYPE}!="?*", ENV{ID_DRIVE_FLASH_SD}="1", ENV{ID_DRIVE_MEDIA_FLASH_SD}="1"
SUBSYSTEMS=="usb", KERNEL=="mmcblk0*|sd*|sr*", ENV{DEVTYPE}=="disk", ATTR{queue/rotational}=="0", ENV{MMC_TYPE}!="?*", ENV{ID_DRIVE_FLASH_SD}="1", ENV{ID_DRIVE_MEDIA_FLASH_SD}="1"

# Do not try to handle (i.e., to auto-mount) internal eMMC (ToDo: in the future also UFS & NVMe) devices with either boot areas or RPMBs:
KERNEL=="mmcblk[0-9]*", SUBSYSTEMS=="mmc", ENV{DEVTYPE}=="disk", ATTR{%kboot0/size}=="?*", ENV{CRYPTOSD_IGNORE}="1"
KERNEL=="mmcblk[0-9]*", SUBSYSTEMS=="mmc", ENV{DEVTYPE}=="disk", ATTR{%krpmb/size}=="??*", ENV{CRYPTOSD_IGNORE}="1"
KERNEL=="mmcblk[0-9]*", SUBSYSTEMS=="mmc", ENV{DEVTYPE}!="disk", IMPORT{parent}="CRYPTOSD_IGNORE"
ENV{CRYPTOSD_IGNORE}=="1", GOTO="cryptosd_end"

# Set power control / UDISKS_CAN_POWER_OFF for all devices dealt with, here: This is also supported for partitions, not only disks!?!
# KERNEL=="mmcblk[1-9]*", ATTR{power/control}=="off", ATTR{power/control}="auto"
# SUBSYSTEMS=="usb", KERNEL=="mmcblk0*|sd*|sr*", ATTR{power/control}=="off", ATTR{power/control}="auto"
Expand Down