<div dir="ltr">We had to revert this because it meant that input devices didn&#39;t work in qemu, which is quite a problem!<div><br><div>Ross</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 November 2017 at 06:08, Hongxu Jia <span dir="ltr">&lt;<a href="mailto:hongxu.jia@windriver.com" target="_blank">hongxu.jia@windriver.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">- Add whitelist hd* devices<br>
<br>
- Backport latest rules from upstream<br>
<br>
- Fix formatting IDE storage does not trigger &quot;change&quot; uevents<br>
<br>
Signed-off-by: Hongxu Jia &lt;<a href="mailto:hongxu.jia@windriver.com">hongxu.jia@windriver.com</a>&gt;<br>
---<br>
 .../eudev/0001-rules-<wbr>whitelist-hd-devices.patch    |  33 ++++<br>
 .../udev/eudev/0002-rules-<wbr>update.patch             | 196 +++++++++++++++++++++<br>
 ...les-watch-metadata-changes-<wbr>in-ide-devices.patch |  43 +++++<br>
 meta/recipes-core/udev/<a href="http://eudev_3.2.2.bb" rel="noreferrer" target="_blank">eudev_<wbr>3.2.2.bb</a>              |   3 +<br>
 4 files changed, 275 insertions(+)<br>
 create mode 100644 meta/recipes-core/udev/eudev/<wbr>0001-rules-whitelist-hd-<wbr>devices.patch<br>
 create mode 100644 meta/recipes-core/udev/eudev/<wbr>0002-rules-update.patch<br>
 create mode 100644 meta/recipes-core/udev/eudev/<wbr>0003-rules-watch-metadata-<wbr>changes-in-ide-devices.patch<br>
<br>
diff --git a/meta/recipes-core/udev/<wbr>eudev/0001-rules-whitelist-hd-<wbr>devices.patch b/meta/recipes-core/udev/<wbr>eudev/0001-rules-whitelist-hd-<wbr>devices.patch<br>
new file mode 100644<br>
index 0000000..1cc4332<br>
--- /dev/null<br>
+++ b/meta/recipes-core/udev/<wbr>eudev/0001-rules-whitelist-hd-<wbr>devices.patch<br>
@@ -0,0 +1,33 @@<br>
+From 676864191d1855ce23a31026b74c7f<wbr>64b15e5062 Mon Sep 17 00:00:00 2001<br>
+From: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt;<br>
+Date: Wed, 9 Nov 2016 19:41:13 -0800<br>
+Subject: [PATCH 1/3] rules: whitelist hd* devices<br>
+<br>
+qemu by default emulates IDE and the linux-yocto kernel(s) use<br>
+CONFIG_IDE instead of the more modern libsata, so disks appear as<br>
+/dev/hd*. Patch rejected upstream because CONFIG_IDE is deprecated.<br>
+<br>
+Upstream-Status: Denied [<a href="https://github.com/systemd/systemd/pull/1276" rel="noreferrer" target="_blank">https://github.com/systemd/<wbr>systemd/pull/1276</a>]<br>
+<br>
+Signed-off-by: Patrick Ohly &lt;<a href="mailto:patrick.ohly@intel.com">patrick.ohly@intel.com</a>&gt;<br>
+Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt;<br>
+---<br>
+ rules/60-persistent-storage.<wbr>rules | 2 +-<br>
+ 1 file changed, 1 insertion(+), 1 deletion(-)<br>
+<br>
+diff --git a/rules/60-persistent-storage.<wbr>rules b/rules/60-persistent-storage.<wbr>rules<br>
+index 6f60ae9..bcd573a 100644<br>
+--- a/rules/60-persistent-storage.<wbr>rules<br>
++++ b/rules/60-persistent-storage.<wbr>rules<br>
+@@ -7,7 +7,7 @@ ACTION==&quot;remove&quot;, GOTO=&quot;persistent_storage_end&quot;<br>
+ ENV{UDEV_DISABLE_PERSISTENT_<wbr>STORAGE_RULES_FLAG}==&quot;1&quot;, GOTO=&quot;persistent_storage_end&quot;<br>
+<br>
+ SUBSYSTEM!=&quot;block&quot;, GOTO=&quot;persistent_storage_end&quot;<br>
+-KERNEL!=&quot;loop*|mmcblk*[0-9]|<wbr>msblk*[0-9]|mspblk*[0-9]|nvme*<wbr>|sd*|sr*|vd*|xvd*|bcache*|<wbr>cciss*|dasd*|ubd*|scm*|pmem*|<wbr>nbd*&quot;, GOTO=&quot;persistent_storage_end&quot;<br>
++KERNEL!=&quot;loop*|mmcblk*[0-9]|<wbr>msblk*[0-9]|mspblk*[0-9]|nvme*<wbr>|sd*|sr*|vd*|xvd*|bcache*|<wbr>cciss*|dasd*|ubd*|scm*|pmem*|<wbr>nbd*|hd*&quot;, GOTO=&quot;persistent_storage_end&quot;<br>
+<br>
+ # ignore partitions that span the entire disk<br>
+ TEST==&quot;whole_disk&quot;, GOTO=&quot;persistent_storage_end&quot;<br>
+--<br>
+1.8.3.1<br>
+<br>
diff --git a/meta/recipes-core/udev/<wbr>eudev/0002-rules-update.patch b/meta/recipes-core/udev/<wbr>eudev/0002-rules-update.patch<br>
new file mode 100644<br>
index 0000000..7cc4d06<br>
--- /dev/null<br>
+++ b/meta/recipes-core/udev/<wbr>eudev/0002-rules-update.patch<br>
@@ -0,0 +1,196 @@<br>
+From d29a20381bc6bd85e86bdc5b2adb48<wbr>fa12ccd22a Mon Sep 17 00:00:00 2001<br>
+From: &quot;Anthony G. Basile&quot; &lt;<a href="mailto:blueness@gentoo.org">blueness@gentoo.org</a>&gt;<br>
+Date: Sun, 3 Sep 2017 13:20:33 -0400<br>
+Subject: [PATCH 2/3] rules: update<br>
+<br>
+Upstream-Status: Backport [<a href="https://github.com/gentoo/eudev/commit/47367bc4df6f05a49cf4b5b0209153d77a9ade83" rel="noreferrer" target="_blank">https://github.com/gentoo/<wbr>eudev/commit/<wbr>47367bc4df6f05a49cf4b5b0209153<wbr>d77a9ade83</a>]<br>
+<br>
+Signed-off-by: Anthony G. Basile &lt;<a href="mailto:blueness@gentoo.org">blueness@gentoo.org</a>&gt;<br>
+---<br>
+ rules/50-udev-default.rules       |  3 ++-<br>
+ rules/60-block.rules              |  5 +----<br>
+ rules/60-cdrom_id.rules           |  6 +++++-<br>
+ rules/60-drm.rules                |  5 +++++<br>
+ rules/60-evdev.rules              |  6 +++++-<br>
+ rules/60-persistent-input.<wbr>rules   |  2 ++<br>
+ rules/60-persistent-storage.<wbr>rules | 11 +++++++----<br>
+ rules/60-sensor.rules             |  8 ++++++++<br>
+ rules/78-sound-card.rules         |  7 +++++++<br>
+ 9 files changed, 42 insertions(+), 11 deletions(-)<br>
+<br>
+diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules<br>
+index e9eeb85..87438c0 100644<br>
+--- a/rules/50-udev-default.rules<br>
++++ b/rules/50-udev-default.rules<br>
+@@ -11,7 +11,6 @@ SUBSYSTEM==&quot;rtc&quot;, ATTR{hctosys}==&quot;1&quot;, SYMLINK+=&quot;rtc&quot;<br>
+ SUBSYSTEM==&quot;rtc&quot;, KERNEL==&quot;rtc0&quot;, SYMLINK+=&quot;rtc&quot;, OPTIONS+=&quot;link_priority=-100&quot;<br>
+<br>
+ SUBSYSTEM==&quot;usb&quot;, ENV{DEVTYPE}==&quot;usb_device&quot;, IMPORT{builtin}=&quot;usb_id&quot;, IMPORT{builtin}=&quot;hwdb --subsystem=usb&quot;<br>
+-SUBSYSTEM==&quot;input&quot;, ENV{ID_INPUT}==&quot;&quot;, IMPORT{builtin}=&quot;input_id&quot;<br>
+ ENV{MODALIAS}!=&quot;&quot;, IMPORT{builtin}=&quot;hwdb --subsystem=$env{SUBSYSTEM}&quot;<br>
+<br>
+ ACTION!=&quot;add&quot;, GOTO=&quot;default_end&quot;<br>
+@@ -34,6 +33,8 @@ SUBSYSTEM==&quot;video4linux&quot;, GROUP=&quot;video&quot;<br>
+ SUBSYSTEM==&quot;graphics&quot;, GROUP=&quot;video&quot;<br>
+ SUBSYSTEM==&quot;drm&quot;, GROUP=&quot;video&quot;<br>
+ SUBSYSTEM==&quot;dvb&quot;, GROUP=&quot;video&quot;<br>
++SUBSYSTEM==&quot;media&quot;, GROUP=&quot;video&quot;<br>
++SUBSYSTEM==&quot;cec&quot;, GROUP=&quot;video&quot;<br>
+<br>
+ SUBSYSTEM==&quot;sound&quot;, GROUP=&quot;audio&quot;, \<br>
+   OPTIONS+=&quot;static_node=snd/seq&quot;<wbr>, OPTIONS+=&quot;static_node=snd/<wbr>timer&quot;<br>
+diff --git a/rules/60-block.rules b/rules/60-block.rules<br>
+index 5e38e12..343fc06 100644<br>
+--- a/rules/60-block.rules<br>
++++ b/rules/60-block.rules<br>
+@@ -8,7 +8,4 @@ ACTION==&quot;add&quot;, SUBSYSTEM==&quot;module&quot;, KERNEL==&quot;block&quot;, ATTR{parameters/events_dfl_<br>
+ ACTION==&quot;change&quot;, SUBSYSTEM==&quot;scsi&quot;, ENV{DEVTYPE}==&quot;scsi_device&quot;, TEST==&quot;block&quot;, ATTR{block/*/uevent}=&quot;change&quot;<br>
+<br>
+ # watch metadata changes, caused by tools closing the device node which was opened for writing<br>
+-ACTION!=&quot;remove&quot;, SUBSYSTEM==&quot;block&quot;, KERNEL==&quot;loop*|nvme*|sd*|vd*|<wbr>xvd*|pmem*&quot;, OPTIONS+=&quot;watch&quot;<br>
+-<br>
+-# set noop on solid state drives<br>
+-SUBSYSTEM==&quot;block&quot;, ACTION==&quot;add&quot;, ATTR{queue/rotational}==&quot;0&quot;, ATTR{queue/scheduler}=&quot;noop&quot;<br>
++ACTION!=&quot;remove&quot;, SUBSYSTEM==&quot;block&quot;, KERNEL==&quot;loop*|nvme*|sd*|vd*|<wbr>xvd*|pmem*|mmcblk*&quot;, OPTIONS+=&quot;watch&quot;<br>
+diff --git a/rules/60-cdrom_id.rules b/rules/60-cdrom_id.rules<br>
+index 5c3b52e..288f8ce 100644<br>
+--- a/rules/60-cdrom_id.rules<br>
++++ b/rules/60-cdrom_id.rules<br>
+@@ -2,12 +2,16 @@<br>
+<br>
+ ACTION==&quot;remove&quot;, GOTO=&quot;cdrom_end&quot;<br>
+ SUBSYSTEM!=&quot;block&quot;, GOTO=&quot;cdrom_end&quot;<br>
+-KERNEL!=&quot;sr[0-9]*|xvd*&quot;, GOTO=&quot;cdrom_end&quot;<br>
++KERNEL!=&quot;sr[0-9]*|vdisk*|<wbr>xvd*&quot;, GOTO=&quot;cdrom_end&quot;<br>
+ ENV{DEVTYPE}!=&quot;disk&quot;, GOTO=&quot;cdrom_end&quot;<br>
+<br>
+ # unconditionally tag device as CDROM<br>
+ KERNEL==&quot;sr[0-9]*&quot;, ENV{ID_CDROM}=&quot;1&quot;<br>
+<br>
++# stop automatically any mount units bound to the device if the media eject<br>
++# button is pressed.<br>
++ENV{ID_CDROM}==&quot;1&quot;, ENV{SYSTEMD_MOUNT_DEVICE_<wbr>BOUND}=&quot;1&quot;<br>
++<br>
+ # media eject button pressed<br>
+ ENV{DISK_EJECT_REQUEST}==&quot;?*&quot;, RUN+=&quot;cdrom_id --eject-media $devnode&quot;, GOTO=&quot;cdrom_end&quot;<br>
+<br>
+diff --git a/rules/60-drm.rules b/rules/60-drm.rules<br>
+index 1ed3e44..f7f3435 100644<br>
+--- a/rules/60-drm.rules<br>
++++ b/rules/60-drm.rules<br>
+@@ -1,3 +1,8 @@<br>
+ # do not edit this file, it will be overwritten on update<br>
+<br>
+ ACTION!=&quot;remove&quot;, SUBSYSTEM==&quot;drm&quot;, SUBSYSTEMS==&quot;pci|usb|platform&quot;<wbr>, IMPORT{builtin}=&quot;path_id&quot;<br>
++<br>
++# by-path<br>
++ENV{ID_PATH}==&quot;?*&quot;, KERNEL==&quot;card*&quot;, SYMLINK+=&quot;dri/by-path/$env{ID_<wbr>PATH}-card&quot;<br>
++ENV{ID_PATH}==&quot;?*&quot;, KERNEL==&quot;controlD*&quot;, SYMLINK+=&quot;dri/by-path/$env{ID_<wbr>PATH}-control&quot;<br>
++ENV{ID_PATH}==&quot;?*&quot;, KERNEL==&quot;renderD*&quot;, SYMLINK+=&quot;dri/by-path/$env{ID_<wbr>PATH}-render&quot;<br>
+diff --git a/rules/60-evdev.rules b/rules/60-evdev.rules<br>
+index ade7e7f..e5e608a 100644<br>
+--- a/rules/60-evdev.rules<br>
++++ b/rules/60-evdev.rules<br>
+@@ -8,10 +8,14 @@ IMPORT{builtin}=&quot;hwdb --subsystem=input --lookup-prefix=evdev:&quot;, \<br>
+   RUN{builtin}+=&quot;keyboard&quot;, GOTO=&quot;evdev_end&quot;<br>
+<br>
+ # AT keyboard matching by the machine&#39;s DMI data<br>
+-ENV{ID_INPUT_KEY}==&quot;?*&quot;, DRIVERS==&quot;atkbd&quot;, \<br>
++DRIVERS==&quot;atkbd&quot;, \<br>
+   IMPORT{builtin}=&quot;hwdb &#39;evdev:atkbd:$attr{[dmi/id]<wbr>modalias}&#39;&quot;, \<br>
+   RUN{builtin}+=&quot;keyboard&quot;, GOTO=&quot;evdev_end&quot;<br>
+<br>
++# device matching the input device name + properties + the machine&#39;s DMI data<br>
++KERNELS==&quot;input*&quot;, IMPORT{builtin}=&quot;hwdb &#39;evdev:name:$attr{name}:phys:$<wbr>attr{phys}:ev:$attr{<wbr>capabilities/ev}:$attr{[dmi/<wbr>id]modalias}&#39;&quot;, \<br>
++  RUN{builtin}+=&quot;keyboard&quot;, GOTO=&quot;evdev_end&quot;<br>
++<br>
+ # device matching the input device name and the machine&#39;s DMI data<br>
+ KERNELS==&quot;input*&quot;, IMPORT{builtin}=&quot;hwdb &#39;evdev:name:$attr{name}:$attr{<wbr>[dmi/id]modalias}&#39;&quot;, \<br>
+   RUN{builtin}+=&quot;keyboard&quot;, GOTO=&quot;evdev_end&quot;<br>
+diff --git a/rules/60-persistent-input.<wbr>rules b/rules/60-persistent-input.<wbr>rules<br>
+index 607144b..91efbe7 100644<br>
+--- a/rules/60-persistent-input.<wbr>rules<br>
++++ b/rules/60-persistent-input.<wbr>rules<br>
+@@ -3,6 +3,8 @@<br>
+ ACTION==&quot;remove&quot;, GOTO=&quot;persistent_input_end&quot;<br>
+ SUBSYSTEM!=&quot;input&quot;, GOTO=&quot;persistent_input_end&quot;<br>
+ SUBSYSTEMS==&quot;bluetooth&quot;, ENV{ID_BUS}=&quot;bluetooth&quot;, GOTO=&quot;persistent_input_end&quot;<br>
++# Bluetooth devices don&#39;t always have the bluetooth subsystem<br>
++ATTRS{id/bustype}==&quot;0005&quot;, ENV{ID_BUS}=&quot;bluetooth&quot;, GOTO=&quot;persistent_input_end&quot;<br>
+ SUBSYSTEMS==&quot;rmi4&quot;, ENV{ID_BUS}=&quot;rmi&quot;, GOTO=&quot;persistent_input_end&quot;<br>
+ SUBSYSTEMS==&quot;serio&quot;, ENV{ID_BUS}=&quot;i8042&quot;, GOTO=&quot;persistent_input_end&quot;<br>
+<br>
+diff --git a/rules/60-persistent-storage.<wbr>rules b/rules/60-persistent-storage.<wbr>rules<br>
+index bcd573a..63f472b 100644<br>
+--- a/rules/60-persistent-storage.<wbr>rules<br>
++++ b/rules/60-persistent-storage.<wbr>rules<br>
+@@ -20,6 +20,7 @@ KERNEL==&quot;nvme*[0-9]n*[0-9]&quot;, ATTR{wwid}==&quot;?*&quot;, SYMLINK+=&quot;disk/by-id/nvme-$<wbr>attr{w<br>
+ KERNEL==&quot;nvme*[0-9]n*[0-9]p*[<wbr>0-9]&quot;, ENV{DEVTYPE}==&quot;partition&quot;, ATTRS{wwid}==&quot;?*&quot;, SYMLINK+=&quot;disk/by-id/nvme-$<wbr>attr{wwid}-part%n&quot;<br>
+<br>
+ KERNEL==&quot;nvme*[0-9]n*[0-9]&quot;, ENV{DEVTYPE}==&quot;disk&quot;, ATTRS{serial}==&quot;?*&quot;, ENV{ID_SERIAL_SHORT}=&quot;$attr{<wbr>serial}&quot;<br>
++KERNEL==&quot;nvme*[0-9]n*[0-9]&quot;, ENV{DEVTYPE}==&quot;disk&quot;, ATTRS{wwid}==&quot;?*&quot;, ENV{ID_WWN}=&quot;$attr{wwid}&quot;<br>
+ KERNEL==&quot;nvme*[0-9]n*[0-9]&quot;, ENV{DEVTYPE}==&quot;disk&quot;, ATTRS{model}==&quot;?*&quot;, ENV{ID_SERIAL_SHORT}==&quot;?*&quot;, ENV{ID_SERIAL}=&quot;$attr{model}_$<wbr>env{ID_SERIAL_SHORT}&quot;, SYMLINK+=&quot;disk/by-id/nvme-$<wbr>env{ID_SERIAL}&quot;<br>
+<br>
+ KERNEL==&quot;nvme*[0-9]n*[0-9]p*[<wbr>0-9]&quot;, ENV{DEVTYPE}==&quot;partition&quot;, ATTRS{serial}==&quot;?*&quot;, ENV{ID_SERIAL_SHORT}=&quot;$attr{<wbr>serial}&quot;<br>
+@@ -63,9 +64,14 @@ KERNEL==&quot;msblk[0-9]p[0-9]|<wbr>mspblk[0-9]p[0-9]&quot;, ENV{ID_NAME}==&quot;?*&quot;, ENV{ID_SERIAL}<br>
+<br>
+ # by-path<br>
+ ENV{DEVTYPE}==&quot;disk&quot;, DEVPATH!=&quot;*/virtual/*&quot;, IMPORT{builtin}=&quot;path_id&quot;<br>
+-ENV{DEVTYPE}==&quot;disk&quot;, ENV{ID_PATH}==&quot;?*&quot;, SYMLINK+=&quot;disk/by-path/$env{<wbr>ID_PATH}&quot;<br>
++KERNEL==&quot;mmcblk[0-9]boot[0-<wbr>9]&quot;, ENV{DEVTYPE}==&quot;disk&quot;, ENV{ID_PATH}==&quot;?*&quot;, SYMLINK+=&quot;disk/by-path/$env{<wbr>ID_PATH}-boot%n&quot;<br>
++KERNEL!=&quot;mmcblk[0-9]boot[0-<wbr>9]&quot;, ENV{DEVTYPE}==&quot;disk&quot;, ENV{ID_PATH}==&quot;?*&quot;, SYMLINK+=&quot;disk/by-path/$env{<wbr>ID_PATH}&quot;<br>
+ ENV{DEVTYPE}==&quot;partition&quot;, ENV{ID_PATH}==&quot;?*&quot;, SYMLINK+=&quot;disk/by-path/$env{<wbr>ID_PATH}-part%n&quot;<br>
+<br>
++# legacy virtio-pci by-path links (deprecated)<br>
++KERNEL==&quot;vd*[!0-9]&quot;, ENV{ID_PATH}==&quot;pci-*&quot;, SYMLINK+=&quot;disk/by-path/virtio-<wbr>$env{ID_PATH}&quot;<br>
++KERNEL==&quot;vd*[0-9]&quot;, ENV{ID_PATH}==&quot;pci-*&quot;, SYMLINK+=&quot;disk/by-path/virtio-<wbr>$env{ID_PATH}-part%n&quot;<br>
++<br>
+ # probe filesystem metadata of optical drives which have a media inserted<br>
+ KERNEL==&quot;sr*&quot;, ENV{DISK_EJECT_REQUEST}!=&quot;?*&quot;, ENV{ID_CDROM_MEDIA_TRACK_<wbr>COUNT_DATA}==&quot;?*&quot;, ENV{ID_CDROM_MEDIA_SESSION_<wbr>LAST_OFFSET}==&quot;?*&quot;, \<br>
+   IMPORT{builtin}=&quot;blkid --offset=$env{ID_CDROM_MEDIA_<wbr>SESSION_LAST_OFFSET}&quot;<br>
+@@ -88,7 +94,4 @@ ENV{DEVTYPE}==&quot;partition&quot;, ENV{ID_WWN_WITH_EXTENSION}==&quot;?<wbr>*&quot;, SYMLINK+=&quot;disk/by-i<br>
+ ENV{ID_PART_ENTRY_UUID}==&quot;?*&quot;, SYMLINK+=&quot;disk/by-partuuid/$<wbr>env{ID_PART_ENTRY_UUID}&quot;<br>
+ ENV{ID_PART_ENTRY_SCHEME}==&quot;<wbr>gpt&quot;, ENV{ID_PART_ENTRY_NAME}==&quot;?*&quot;, SYMLINK+=&quot;disk/by-partlabel/$<wbr>env{ID_PART_ENTRY_NAME}&quot;<br>
+<br>
+-# add symlink to GPT root disk<br>
+-ENV{ID_PART_ENTRY_SCHEME}==&quot;<wbr>gpt&quot;, ENV{ID_PART_GPT_AUTO_ROOT}==&quot;<wbr>1&quot;, SYMLINK+=&quot;gpt-auto-root&quot;<br>
+-<br>
+ LABEL=&quot;persistent_storage_end&quot;<br>
+diff --git a/rules/60-sensor.rules b/rules/60-sensor.rules<br>
+index 82e44f8..7ad2c36 100644<br>
+--- a/rules/60-sensor.rules<br>
++++ b/rules/60-sensor.rules<br>
+@@ -7,4 +7,12 @@ SUBSYSTEM==&quot;iio&quot;, KERNEL==&quot;iio*&quot;, SUBSYSTEMS==&quot;usb|i2c&quot;, \<br>
+   IMPORT{builtin}=&quot;hwdb &#39;sensor:modalias:$attr{<wbr>modalias}:$attr{[dmi/id]<wbr>modalias}&#39;&quot;, \<br>
+   GOTO=&quot;sensor_end&quot;<br>
+<br>
++SUBSYSTEM==&quot;input&quot;, ENV{ID_INPUT_ACCELEROMETER}==&quot;<wbr>1&quot;, SUBSYSTEMS==&quot;acpi&quot;, \<br>
++  IMPORT{builtin}=&quot;hwdb &#39;sensor:modalias:acpi:$attr{<wbr>hid}:$attr{[dmi/id]modalias}&#39;&quot;<wbr>, \<br>
++  GOTO=&quot;sensor_end&quot;<br>
++<br>
++SUBSYSTEM==&quot;input&quot;, ENV{ID_INPUT_ACCELEROMETER}==&quot;<wbr>1&quot;, SUBSYSTEMS==&quot;platform&quot;, \<br>
++  IMPORT{builtin}=&quot;hwdb &#39;sensor:modalias:platform:$id:<wbr>$attr{[dmi/id]modalias}&#39;&quot;, \<br>
++  GOTO=&quot;sensor_end&quot;<br>
++<br>
+ LABEL=&quot;sensor_end&quot;<br>
+diff --git a/rules/78-sound-card.rules b/rules/78-sound-card.rules<br>
+index 04740e8..f2fc277 100644<br>
+--- a/rules/78-sound-card.rules<br>
++++ b/rules/78-sound-card.rules<br>
+@@ -48,6 +48,13 @@ SUBSYSTEMS==&quot;firewire&quot;, ATTRS{guid}==&quot;?*&quot;, \<br>
+ SUBSYSTEMS==&quot;firewire&quot;, GOTO=&quot;skip_pci&quot;<br>
+<br>
+ SUBSYSTEMS==&quot;pci&quot;, ENV{ID_BUS}=&quot;pci&quot;, ENV{ID_VENDOR_ID}=&quot;$attr{<wbr>vendor}&quot;, ENV{ID_MODEL_ID}=&quot;$attr{<wbr>device}&quot;<br>
++SUBSYSTEMS==&quot;pci&quot;, GOTO=&quot;skip_pci&quot;<br>
++<br>
++# If we reach here, the device nor any of its parents are USB/PCI/firewire bus devices.<br>
++# If we now find a parent that is a platform device, assume that we&#39;re working with<br>
++# an internal sound card.<br>
++SUBSYSTEMS==&quot;platform&quot;, ENV{SOUND_FORM_FACTOR}=&quot;<wbr>internal&quot;, GOTO=&quot;sound_end&quot;<br>
++<br>
+ LABEL=&quot;skip_pci&quot;<br>
+<br>
+ # Define ID_ID if ID_BUS and ID_SERIAL are set. This will work for both<br>
+--<br>
+1.8.3.1<br>
+<br>
diff --git a/meta/recipes-core/udev/<wbr>eudev/0003-rules-watch-<wbr>metadata-changes-in-ide-<wbr>devices.patch b/meta/recipes-core/udev/<wbr>eudev/0003-rules-watch-<wbr>metadata-changes-in-ide-<wbr>devices.patch<br>
new file mode 100644<br>
index 0000000..17d698a<br>
--- /dev/null<br>
+++ b/meta/recipes-core/udev/<wbr>eudev/0003-rules-watch-<wbr>metadata-changes-in-ide-<wbr>devices.patch<br>
@@ -0,0 +1,43 @@<br>
+From 8207d645582e96c56950674e104653<wbr>d0cd552d60 Mon Sep 17 00:00:00 2001<br>
+From: Hongxu Jia &lt;<a href="mailto:hongxu.jia@windriver.com">hongxu.jia@windriver.com</a>&gt;<br>
+Date: Fri, 17 Nov 2017 09:46:00 +0800<br>
+Subject: [PATCH] rules: watch metadata changes in ide devices<br>
+<br>
+Formatting IDE storage does not trigger &quot;change&quot; uevents. As a result<br>
+clients using udev API don&#39;t get any updates afterwards and get outdated<br>
+information about the device.<br>
+...<br>
+root@qemux86-64:~# mkfs.ext4 -F /dev/hda1<br>
+Creating filesystem with 262144 4k blocks and 65536 inodes<br>
+Filesystem UUID: 98791eb2-2bf3-47ad-b4d8-<wbr>4cf7e914eee2<br>
+<br>
+root@qemux86-64:~# ls /dev/disk/by-uuid/98791eb2-<wbr>2bf3-47ad-b4d8-4cf7e914eee2<br>
+ls: cannot access &#39;/dev/disk/by-uuid/98791eb2-<wbr>2bf3-47ad-b4d8-4cf7e914eee2&#39;: No such file or directory<br>
+...<br>
+Include hd* in a match for watch option assignment.<br>
+<br>
+Upstream-Status: Denied<br>
+<br>
+qemu by default emulates IDE and the linux-yocto kernel(s) use<br>
+CONFIG_IDE instead of the more modern libsata, so disks appear as<br>
+/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE<br>
+is deprecated.<br>
+<br>
+Signed-off-by: Hongxu Jia &lt;<a href="mailto:hongxu.jia@windriver.com">hongxu.jia@windriver.com</a>&gt;<br>
+---<br>
+ rules/60-block.rules | 2 +-<br>
+ 1 file changed, 1 insertion(+), 1 deletion(-)<br>
+<br>
+diff --git a/rules/60-block.rules b/rules/60-block.rules<br>
+index 343fc06..b5237da 100644<br>
+--- a/rules/60-block.rules<br>
++++ b/rules/60-block.rules<br>
+@@ -8,4 +8,4 @@ ACTION==&quot;add&quot;, SUBSYSTEM==&quot;module&quot;, KERNEL==&quot;block&quot;, ATTR{parameters/events_dfl_<br>
+ ACTION==&quot;change&quot;, SUBSYSTEM==&quot;scsi&quot;, ENV{DEVTYPE}==&quot;scsi_device&quot;, TEST==&quot;block&quot;, ATTR{block/*/uevent}=&quot;change&quot;<br>
+<br>
+ # watch metadata changes, caused by tools closing the device node which was opened for writing<br>
+-ACTION!=&quot;remove&quot;, SUBSYSTEM==&quot;block&quot;, KERNEL==&quot;loop*|nvme*|sd*|vd*|<wbr>xvd*|pmem*|mmcblk*&quot;, OPTIONS+=&quot;watch&quot;<br>
++ACTION!=&quot;remove&quot;, SUBSYSTEM==&quot;block&quot;, KERNEL==&quot;loop*|nvme*|sd*|vd*|<wbr>xvd*|pmem*|mmcblk*|hd*&quot;, OPTIONS+=&quot;watch&quot;<br>
+--<br>
+1.8.3.1<br>
+<br>
diff --git a/meta/recipes-core/udev/<a href="http://eudev_3.2.2.bb" rel="noreferrer" target="_blank">eudev<wbr>_3.2.2.bb</a> b/meta/recipes-core/udev/<a href="http://eudev_3.2.2.bb" rel="noreferrer" target="_blank">eudev<wbr>_3.2.2.bb</a><br>
index 70e3568..5cee061 100644<br>
--- a/meta/recipes-core/udev/<a href="http://eudev_3.2.2.bb" rel="noreferrer" target="_blank">eudev<wbr>_3.2.2.bb</a><br>
+++ b/meta/recipes-core/udev/<a href="http://eudev_3.2.2.bb" rel="noreferrer" target="_blank">eudev<wbr>_3.2.2.bb</a><br>
@@ -11,6 +11,9 @@ PROVIDES = &quot;udev&quot;<br>
 SRC_URI = &quot;<a href="http://dev.gentoo.org/~blueness/${BPN}/${BP}.tar.gz" rel="noreferrer" target="_blank">http://dev.gentoo.org/~<wbr>blueness/${BPN}/${BP}.tar.gz</a> \<br>
            file://0014-Revert-rules-<wbr>remove-firmware-loading-rules.<wbr>patch \<br>
            file://Revert-udev-remove-<wbr>userspace-firmware-loading-<wbr>suppor.patch \<br>
+           file://0001-rules-whitelist-<wbr>hd-devices.patch \<br>
+           file://0002-rules-update.patch \<br>
+           file://0003-rules-watch-<wbr>metadata-changes-in-ide-<wbr>devices.patch \<br>
            file://devfs-udev.rules \<br>
            file://init \<br>
            file://links.conf \<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.8.1<br>
<br>
</font></span></blockquote></div><br></div>