All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
@ 2017-11-17  6:08 Hongxu Jia
  2017-11-17  6:08 ` [PATCH 2/3] eudev: sync rules with systemd Hongxu Jia
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Hongxu Jia @ 2017-11-17  6:08 UTC (permalink / raw)
  To: openembedded-core, ross.burton

Formatting IDE storage does not trigger "change" uevents. As a result
clients using udev API don't get any updates afterwards and get outdated
information about the device.
...
root@qemux86-64:~# mkfs.ext4 -F /dev/hda1
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: 98791eb2-2bf3-47ad-b4d8-4cf7e914eee2

root@qemux86-64:~# ls /dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
ls: cannot access '/dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2': No such file or directory
...
Include hd* in a match for watch option assignment.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 ...les-watch-metadata-changes-in-ide-devices.patch | 43 ++++++++++++++++++++++
 meta/recipes-core/systemd/systemd_234.bb           |  1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta/recipes-core/systemd/systemd/0020-rules-watch-metadata-changes-in-ide-devices.patch

diff --git a/meta/recipes-core/systemd/systemd/0020-rules-watch-metadata-changes-in-ide-devices.patch b/meta/recipes-core/systemd/systemd/0020-rules-watch-metadata-changes-in-ide-devices.patch
new file mode 100644
index 0000000..17d698a
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0020-rules-watch-metadata-changes-in-ide-devices.patch
@@ -0,0 +1,43 @@
+From 8207d645582e96c56950674e104653d0cd552d60 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 17 Nov 2017 09:46:00 +0800
+Subject: [PATCH] rules: watch metadata changes in ide devices
+
+Formatting IDE storage does not trigger "change" uevents. As a result
+clients using udev API don't get any updates afterwards and get outdated
+information about the device.
+...
+root@qemux86-64:~# mkfs.ext4 -F /dev/hda1
+Creating filesystem with 262144 4k blocks and 65536 inodes
+Filesystem UUID: 98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
+
+root@qemux86-64:~# ls /dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
+ls: cannot access '/dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2': No such file or directory
+...
+Include hd* in a match for watch option assignment.
+
+Upstream-Status: Denied
+
+qemu by default emulates IDE and the linux-yocto kernel(s) use
+CONFIG_IDE instead of the more modern libsata, so disks appear as
+/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
+is deprecated.
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ rules/60-block.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rules/60-block.rules b/rules/60-block.rules
+index 343fc06..b5237da 100644
+--- a/rules/60-block.rules
++++ b/rules/60-block.rules
+@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
+ ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
+ 
+ # watch metadata changes, caused by tools closing the device node which was opened for writing
+-ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*", OPTIONS+="watch"
++ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*|hd*", OPTIONS+="watch"
+-- 
+1.8.3.1
+
diff --git a/meta/recipes-core/systemd/systemd_234.bb b/meta/recipes-core/systemd/systemd_234.bb
index 6b8745b..4283d3d 100644
--- a/meta/recipes-core/systemd/systemd_234.bb
+++ b/meta/recipes-core/systemd/systemd_234.bb
@@ -27,6 +27,7 @@ SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
            file://0017-remove-duplicate-include-uchar.h.patch \
            file://0018-check-for-uchar.h-in-configure.patch \
            file://0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
+           file://0020-rules-watch-metadata-changes-in-ide-devices.patch \
            file://0001-add-fallback-parse_printf_format-implementation.patch \
            file://0002-src-basic-missing.h-check-for-missing-strndupa.patch \
            file://0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/3] eudev: sync rules with systemd
  2017-11-17  6:08 [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents Hongxu Jia
@ 2017-11-17  6:08 ` Hongxu Jia
  2017-12-18 12:01   ` Burton, Ross
  2017-11-17  6:08 ` [PATCH 3/3] mesa/screen: change patch status Hongxu Jia
  2017-11-20 11:07 ` [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents Burton, Ross
  2 siblings, 1 reply; 16+ messages in thread
From: Hongxu Jia @ 2017-11-17  6:08 UTC (permalink / raw)
  To: openembedded-core, ross.burton

- Add whitelist hd* devices

- Backport latest rules from upstream

- Fix formatting IDE storage does not trigger "change" uevents

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../eudev/0001-rules-whitelist-hd-devices.patch    |  33 ++++
 .../udev/eudev/0002-rules-update.patch             | 196 +++++++++++++++++++++
 ...les-watch-metadata-changes-in-ide-devices.patch |  43 +++++
 meta/recipes-core/udev/eudev_3.2.2.bb              |   3 +
 4 files changed, 275 insertions(+)
 create mode 100644 meta/recipes-core/udev/eudev/0001-rules-whitelist-hd-devices.patch
 create mode 100644 meta/recipes-core/udev/eudev/0002-rules-update.patch
 create mode 100644 meta/recipes-core/udev/eudev/0003-rules-watch-metadata-changes-in-ide-devices.patch

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



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/3] mesa/screen: change patch status
  2017-11-17  6:08 [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents Hongxu Jia
  2017-11-17  6:08 ` [PATCH 2/3] eudev: sync rules with systemd Hongxu Jia
@ 2017-11-17  6:08 ` Hongxu Jia
  2017-11-20 11:07 ` [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents Burton, Ross
  2 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2017-11-17  6:08 UTC (permalink / raw)
  To: openembedded-core, ross.burton

The patch has been accepted upstream.
Changed patch status Pending/Submitted -> Accepted.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch    | 3 ++-
 .../0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch    | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch b/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch
index e8db12c..1274b27 100644
--- a/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch
+++ b/meta/recipes-extended/screen/screen/0001-configure.ac-fix-configure-failed-while-build-dir-ha.patch
@@ -9,7 +9,8 @@ test always return true.
 We rarely use "yes;" to name build dir, so s/yes/yes;/g
 could fix the issue
 
-Upstream-Status: Pending
+Upstream-Status: Accepted
+https://git.savannah.gnu.org/cgit/screen.git/commit/?h=screen-v4&id=8c2b4061d16756ee2ed37f08db063b8215656943
 
 Signed-off-by: Jian Kang <jian.kang@windriver.com>
 ---
diff --git a/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch b/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch
index bd1e863..ff8eda4 100644
--- a/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch
+++ b/meta/recipes-graphics/mesa/files/0001-Makefile.vulkan.am-explictly-add-lib-expat-to-intel-.patch
@@ -20,7 +20,8 @@ undefined reference to `XML_GetCurrentLineNumber'
 
 explictly add EXPAT_LIBS to intel's VULKAN_LIB_DEPS
 
-Upstream-Status: Submitted [mesa-dev@lists.freedesktop.org]
+Upstream-Status: Accepted
+https://cgit.freedesktop.org/mesa/mesa/commit/?id=05fc62d89f59ce19a18bfd4e63a09624910d6caf
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
  2017-11-17  6:08 [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents Hongxu Jia
  2017-11-17  6:08 ` [PATCH 2/3] eudev: sync rules with systemd Hongxu Jia
  2017-11-17  6:08 ` [PATCH 3/3] mesa/screen: change patch status Hongxu Jia
@ 2017-11-20 11:07 ` Burton, Ross
  2017-11-21  1:18   ` Hongxu Jia
  2017-11-21  1:21   ` Hongxu Jia
  2 siblings, 2 replies; 16+ messages in thread
From: Burton, Ross @ 2017-11-20 11:07 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 371 bytes --]

On 17 November 2017 at 06:08, Hongxu Jia <hongxu.jia@windriver.com> wrote:

> +qemu by default emulates IDE and the linux-yocto kernel(s) use
> +CONFIG_IDE instead of the more modern libsata, so disks appear as
> +/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
> +is deprecated.
>

Can we fix our kernel and/or qemu configuration too?

Ross

[-- Attachment #2: Type: text/html, Size: 711 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
  2017-11-20 11:07 ` [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents Burton, Ross
@ 2017-11-21  1:18   ` Hongxu Jia
  2017-11-21  3:04     ` Bruce Ashfield
  2017-11-21  1:21   ` Hongxu Jia
  1 sibling, 1 reply; 16+ messages in thread
From: Hongxu Jia @ 2017-11-21  1:18 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 575 bytes --]

On 2017年11月20日 19:07, Burton, Ross wrote:
> On 17 November 2017 at 06:08, Hongxu Jia <hongxu.jia@windriver.com 
> <mailto:hongxu.jia@windriver.com>> wrote:
>
>     +qemu by default emulates IDE and the linux-yocto kernel(s) use
>     +CONFIG_IDE instead of the more modern libsata, so disks appear as
>     +/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
>     +is deprecated.
>
>
> Can we fix our kernel and/or qemu configuration too?
>

Hi Bruce,

Do you have any suggestion? How about disable CONFIG_IDE?

//Hongxu

> Ross



[-- Attachment #2: Type: text/html, Size: 1950 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
  2017-11-20 11:07 ` [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents Burton, Ross
  2017-11-21  1:18   ` Hongxu Jia
@ 2017-11-21  1:21   ` Hongxu Jia
  2017-11-21  2:00     ` Andre McCurdy
  1 sibling, 1 reply; 16+ messages in thread
From: Hongxu Jia @ 2017-11-21  1:21 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1059 bytes --]

On 2017年11月20日 19:07, Burton, Ross wrote:
> On 17 November 2017 at 06:08, Hongxu Jia <hongxu.jia@windriver.com 
> <mailto:hongxu.jia@windriver.com>> wrote:
>
>     +qemu by default emulates IDE and the linux-yocto kernel(s) use
>     +CONFIG_IDE instead of the more modern libsata, so disks appear as
>     +/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
>     +is deprecated.
>
>
> Can we fix our kernel and/or qemu configuration too?
>

For qemu, RP have replace it with virtio, but it have the
similar issue on virtualbox with IDE controller.
...
commit f59e729f98ef9b506b0cfdc415567e03ec87f2a9
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Tue Aug 22 22:58:02 2017 +0100

     runqemu: Use virtio to mount cdrom drives

     The IDE driver in the kernel is fragile and in 4.12 is causing 
backtraces.
     To unblock 4.12 kernel merging use the virtio CD driver instead to 
mount
     iso images which should be faster and more stable.
...

//Hongxu

> Ross



[-- Attachment #2: Type: text/html, Size: 2615 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
  2017-11-21  1:21   ` Hongxu Jia
@ 2017-11-21  2:00     ` Andre McCurdy
  2017-11-21  2:24       ` Hongxu Jia
  0 siblings, 1 reply; 16+ messages in thread
From: Andre McCurdy @ 2017-11-21  2:00 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: OE-core

On Mon, Nov 20, 2017 at 5:21 PM, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> On 2017年11月20日 19:07, Burton, Ross wrote:
> On 17 November 2017 at 06:08, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>>
>> +qemu by default emulates IDE and the linux-yocto kernel(s) use
>> +CONFIG_IDE instead of the more modern libsata, so disks appear as
>> +/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
>> +is deprecated.
>
> Can we fix our kernel and/or qemu configuration too?
>
> For qemu, RP have replace it with virtio, but it have the
> similar issue on virtualbox with IDE controller.

VirtualBox gives you the choice about whether to connect the HDD image
to a virtual IDE or SATA port.

ie VirtualBox isn't a reason to have our rootfs images continue to try
to support IDE.

> ...
> commit f59e729f98ef9b506b0cfdc415567e03ec87f2a9
> Author: Richard Purdie <richard.purdie@linuxfoundation.org>
> Date:   Tue Aug 22 22:58:02 2017 +0100
>
>     runqemu: Use virtio to mount cdrom drives
>
>     The IDE driver in the kernel is fragile and in 4.12 is causing
> backtraces.
>     To unblock 4.12 kernel merging use the virtio CD driver instead to mount
>     iso images which should be faster and more stable.
> ...
>
> //Hongxu
>
> Ross
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
  2017-11-21  2:00     ` Andre McCurdy
@ 2017-11-21  2:24       ` Hongxu Jia
  0 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2017-11-21  2:24 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Bruce Ashfield, OE-core

On 2017年11月21日 10:00, Andre McCurdy wrote:
> On Mon, Nov 20, 2017 at 5:21 PM, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>> On 2017年11月20日 19:07, Burton, Ross wrote:
>> On 17 November 2017 at 06:08, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>>> +qemu by default emulates IDE and the linux-yocto kernel(s) use
>>> +CONFIG_IDE instead of the more modern libsata, so disks appear as
>>> +/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
>>> +is deprecated.
>> Can we fix our kernel and/or qemu configuration too?
>>
>> For qemu, RP have replace it with virtio, but it have the
>> similar issue on virtualbox with IDE controller.
> VirtualBox gives you the choice about whether to connect the HDD image
> to a virtual IDE or SATA port.
>
> ie VirtualBox isn't a reason to have our rootfs images continue to try
> to support IDE.

For IDE, the mainstream distribution (ubuntu/fedora) do not support it.

Ubuntu 17.10, kernel 4.13.0-16
vim /boot/config-4.13.0-16-generic
...
# CONFIG_IDE is not set
CONFIG_ATA_PIIX=y
...

Fedora 27, kernel 4.13.5
vi /boot/config-4.13.5-300.fc27.x86_64
...
# CONFIG_IDE is not set
CONFIG_ATA_PIIX=y
...

The IDE seems not stable, and I have fixed two issue on it.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=79d73346ac05bc31f2e96f899c4e9aaaa616a8d4
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8dc7a31fbce5e2dbbacd83d910da37105181b054

If enable both of IDE and ATA and the IDE still have a higher priority.
We should explicitly not set CONFIG_IDE.

Here is the discussion on upstream mailing list.
https://www.mail-archive.com/linux-block@vger.kernel.org/msg15114.html

//Hongxu

>> ...
>> commit f59e729f98ef9b506b0cfdc415567e03ec87f2a9
>> Author: Richard Purdie <richard.purdie@linuxfoundation.org>
>> Date:   Tue Aug 22 22:58:02 2017 +0100
>>
>>      runqemu: Use virtio to mount cdrom drives
>>
>>      The IDE driver in the kernel is fragile and in 4.12 is causing
>> backtraces.
>>      To unblock 4.12 kernel merging use the virtio CD driver instead to mount
>>      iso images which should be faster and more stable.
>> ...
>>
>> //Hongxu
>>
>> Ross
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
  2017-11-21  1:18   ` Hongxu Jia
@ 2017-11-21  3:04     ` Bruce Ashfield
  2017-11-21  7:00       ` Hongxu Jia
  0 siblings, 1 reply; 16+ messages in thread
From: Bruce Ashfield @ 2017-11-21  3:04 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

On Mon, Nov 20, 2017 at 8:18 PM, Hongxu Jia <hongxu.jia@windriver.com>
wrote:

> On 2017年11月20日 19:07, Burton, Ross wrote:
>
> On 17 November 2017 at 06:08, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>
>> +qemu by default emulates IDE and the linux-yocto kernel(s) use
>> +CONFIG_IDE instead of the more modern libsata, so disks appear as
>> +/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
>> +is deprecated.
>>
>
> Can we fix our kernel and/or qemu configuration too?
>
>
> Hi Bruce,
>
> Do you have any suggestion? How about disable CONFIG_IDE?
>

I've been telling people we can disable CONFIG_IDE for years now.

It just requires the kernel-cache change, and someone to boot all arches to
show that
it continues to work, as well as a quick search for references to hda to
make sure they
are all gone.

Not something that is on my TODO list at the moment, but I'd take patches
to the kernel
part (with that testing shown).

Bruce


>
> //Hongxu
>
> Ross
>
>
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>


-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 3303 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
  2017-11-21  3:04     ` Bruce Ashfield
@ 2017-11-21  7:00       ` Hongxu Jia
  2017-11-21 11:31         ` Burton, Ross
  0 siblings, 1 reply; 16+ messages in thread
From: Hongxu Jia @ 2017-11-21  7:00 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 2177 bytes --]

On 2017年11月21日 11:04, Bruce Ashfield wrote:
>
>
> On Mon, Nov 20, 2017 at 8:18 PM, Hongxu Jia <hongxu.jia@windriver.com 
> <mailto:hongxu.jia@windriver.com>> wrote:
>
>     On 2017年11月20日 19:07, Burton, Ross wrote:
>>     On 17 November 2017 at 06:08, Hongxu Jia
>>     <hongxu.jia@windriver.com <mailto:hongxu.jia@windriver.com>> wrote:
>>
>>         +qemu by default emulates IDE and the linux-yocto kernel(s) use
>>         +CONFIG_IDE instead of the more modern libsata, so disks
>>         appear as
>>         +/dev/hd*. A similar patch rejected by upstream because
>>         CONFIG_IDE
>>         +is deprecated.
>>
>>
>>     Can we fix our kernel and/or qemu configuration too?
>>
>
>     Hi Bruce,
>
>     Do you have any suggestion? How about disable CONFIG_IDE?
>
>
> I've been telling people we can disable CONFIG_IDE for years now.
>
> It just requires the kernel-cache change, and someone to boot all 
> arches to show that
> it continues to work, as well as a quick search for references to hda 
> to make sure they
> are all gone.
>
> Not something that is on my TODO list at the moment, but I'd take 
> patches to the kernel
> part (with that testing shown).
>

I think I could have a try to clean up CONFIG_IDE.

Two steps:
1. Tweak kernel-cache to remove CONFIG_IDE for all available bsp.
     It require necessary test to prove it is safe to remove it.
     If the test is OK, I will send patch to yocto mailing list.

2. After 1 merged to kernel, I will clean up hda related (systemd/udev)
     in oe-core, and send the fix to this mailing list.

//Hongxu

> Bruce
>
>
>     //Hongxu
>
>>     Ross
>
>
>
>     --
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>     <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
>
>
>
>
> -- 
> "Thou shalt not follow the NULL pointer, for chaos and madness await 
> thee at its end"



[-- Attachment #2: Type: text/html, Size: 6203 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
  2017-11-21  7:00       ` Hongxu Jia
@ 2017-11-21 11:31         ` Burton, Ross
  2017-11-22  3:36           ` Hongxu Jia
  0 siblings, 1 reply; 16+ messages in thread
From: Burton, Ross @ 2017-11-21 11:31 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

On 21 November 2017 at 07:00, Hongxu Jia <hongxu.jia@windriver.com> wrote:

> 1. Tweak kernel-cache to remove CONFIG_IDE for all available bsp.
>     It require necessary test to prove it is safe to remove it.
>     If the test is OK, I will send patch to yocto mailing list.
>

I know you have your own huge autobuilder framework inside WR but I'll
happily throw a patch against oe-core at the public autobuilders for extra
testing.

Ross

[-- Attachment #2: Type: text/html, Size: 953 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
  2017-11-21 11:31         ` Burton, Ross
@ 2017-11-22  3:36           ` Hongxu Jia
  2017-11-22 15:09             ` Bruce Ashfield
  0 siblings, 1 reply; 16+ messages in thread
From: Hongxu Jia @ 2017-11-22  3:36 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Joshua Lock, OE-core

[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]

On 2017年11月21日 19:31, Burton, Ross wrote:
> On 21 November 2017 at 07:00, Hongxu Jia <hongxu.jia@windriver.com 
> <mailto:hongxu.jia@windriver.com>> wrote:
>
>     1. Tweak kernel-cache to remove CONFIG_IDE for all available bsp.
>         It require necessary test to prove it is safe to remove it.
>         If the test is OK, I will send patch to yocto mailing list.
>
>
> I know you have your own huge autobuilder framework inside WR but I'll 
> happily throw a patch against oe-core at the public autobuilders for 
> extra testing.
>

No problem, I would like the public autobuilders.

But there several banners:

1. I do not have account on public autobuilder
     https://autobuilder.yocto.io/

     Maybe I should ask Michael or Joshua for help

2. The fix is on kernel-cache, not directly on oe-core,
     So it is difficult to use autobuilder

    Maybe I should ask Bruce for help

3. Most importantly, how to test, when find a way,
     the ideally is to add the test case to oe-core's
     meta-selftest

    I should do some investigation on the storage test.

So I think I should do 3 first, and then 1/2 later

//Hongxu

> Ross



[-- Attachment #2: Type: text/html, Size: 3046 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
  2017-11-22  3:36           ` Hongxu Jia
@ 2017-11-22 15:09             ` Bruce Ashfield
  2017-11-22 15:21               ` Hongxu Jia
  0 siblings, 1 reply; 16+ messages in thread
From: Bruce Ashfield @ 2017-11-22 15:09 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: Joshua Lock, OE-core

[-- Attachment #1: Type: text/plain, Size: 1611 bytes --]

On Tue, Nov 21, 2017 at 10:36 PM, Hongxu Jia <hongxu.jia@windriver.com>
wrote:

> On 2017年11月21日 19:31, Burton, Ross wrote:
>
> On 21 November 2017 at 07:00, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>
>> 1. Tweak kernel-cache to remove CONFIG_IDE for all available bsp.
>>     It require necessary test to prove it is safe to remove it.
>>     If the test is OK, I will send patch to yocto mailing list.
>>
>
> I know you have your own huge autobuilder framework inside WR but I'll
> happily throw a patch against oe-core at the public autobuilders for extra
> testing.
>
>
> No problem, I would like the public autobuilders.
>
> But there several banners:
>
> 1. I do not have account on public autobuilder
>     https://autobuilder.yocto.io/
>
>     Maybe I should ask Michael or Joshua for help
>
> 2. The fix is on kernel-cache, not directly on oe-core,
>     So it is difficult to use autobuilder
>
>    Maybe I should ask Bruce for help
>


If you send a change for the kernel configuration, I can merge it, but not
activate it (i.e. I won't send SRCREV bumps), so as long as the autobuilder
can build a branch, we can queue this part of the change for testing.

Bruce


>
> 3. Most importantly, how to test, when find a way,
>     the ideally is to add the test case to oe-core's
>     meta-selftest
>
>    I should do some investigation on the storage test.
>
> So I think I should do 3 first, and then 1/2 later
>
> //Hongxu
>
> Ross
>
>
>


-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 3840 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents
  2017-11-22 15:09             ` Bruce Ashfield
@ 2017-11-22 15:21               ` Hongxu Jia
  0 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2017-11-22 15:21 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: Joshua Lock, OE-core

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]


>
> If you send a change for the kernel configuration, I can merge it, but not
> activate it (i.e. I won't send SRCREV bumps), so as long as the 
> autobuilder
> can build a branch, we can queue this part of the change for testing.
>

Got it, thanks

//Hongxu

> Bruce
>
>
>     3. Most importantly, how to test, when find a way,
>         the ideally is to add the test case to oe-core's
>         meta-selftest
>
>        I should do some investigation on the storage test.
>
>     So I think I should do 3 first, and then 1/2 later
>
>     //Hongxu
>
>>     Ross
>
>
>
>
>
> -- 
> "Thou shalt not follow the NULL pointer, for chaos and madness await 
> thee at its end"



[-- Attachment #2: Type: text/html, Size: 2663 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/3] eudev: sync rules with systemd
  2017-11-17  6:08 ` [PATCH 2/3] eudev: sync rules with systemd Hongxu Jia
@ 2017-12-18 12:01   ` Burton, Ross
  2017-12-19  1:29     ` Hongxu Jia
  0 siblings, 1 reply; 16+ messages in thread
From: Burton, Ross @ 2017-12-18 12:01 UTC (permalink / raw)
  To: Hongxu Jia; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 16954 bytes --]

We had to revert this because it meant that input devices didn't work in
qemu, which is quite a problem!

Ross

On 17 November 2017 at 06:08, Hongxu Jia <hongxu.jia@windriver.com> wrote:

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

[-- Attachment #2: Type: text/html, Size: 22103 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/3] eudev: sync rules with systemd
  2017-12-18 12:01   ` Burton, Ross
@ 2017-12-19  1:29     ` Hongxu Jia
  0 siblings, 0 replies; 16+ messages in thread
From: Hongxu Jia @ 2017-12-19  1:29 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 19601 bytes --]

On 2017年12月18日 20:01, Burton, Ross wrote:
> We had to revert this because it meant that input devices didn't work 
> in qemu, which is quite a problem!
>

OK, sorry for the inconvenience.

//Hongxu

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


[-- Attachment #2: Type: text/html, Size: 27269 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-12-19  1:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-17  6:08 [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents Hongxu Jia
2017-11-17  6:08 ` [PATCH 2/3] eudev: sync rules with systemd Hongxu Jia
2017-12-18 12:01   ` Burton, Ross
2017-12-19  1:29     ` Hongxu Jia
2017-11-17  6:08 ` [PATCH 3/3] mesa/screen: change patch status Hongxu Jia
2017-11-20 11:07 ` [PATCH 1/3] systemd: fix formatting IDE storage does not trigger "change" uevents Burton, Ross
2017-11-21  1:18   ` Hongxu Jia
2017-11-21  3:04     ` Bruce Ashfield
2017-11-21  7:00       ` Hongxu Jia
2017-11-21 11:31         ` Burton, Ross
2017-11-22  3:36           ` Hongxu Jia
2017-11-22 15:09             ` Bruce Ashfield
2017-11-22 15:21               ` Hongxu Jia
2017-11-21  1:21   ` Hongxu Jia
2017-11-21  2:00     ` Andre McCurdy
2017-11-21  2:24       ` Hongxu Jia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.