On 1/4/23 8:11 AM, Jayesh Choudhary via lists.yoctoproject.org wrote:
Using modprobe causes the rule to fail when the module is builtin in kernel
and it is logged in journalctl. So use the builtin command 'kmod' instead.
This makes the journalctl logs clean and significantly easier to read.

Signed-off-by: Jayesh Choudhary <[email protected]>
---
  meta-arago-distro/recipes-core/systemd/systemd/local.rules | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-arago-distro/recipes-core/systemd/systemd/local.rules 
b/meta-arago-distro/recipes-core/systemd/systemd/local.rules
index b0e9f84f..4829ca14 100644
--- a/meta-arago-distro/recipes-core/systemd/systemd/local.rules
+++ b/meta-arago-distro/recipes-core/systemd/systemd/local.rules
@@ -14,7 +14,7 @@
  #
# Try and modprobe for drivers for new hardware
-ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe 
$env{MODALIAS}"
+ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load 
$env{MODALIAS}"

Is the builtin version as full featured? Does this work in non-systemd systems? 
Is this just
masking all errors or do real errors still get logged somewhere? If this is 
just a way
to mask errors then --quiet might be more portable.

(BTW I ran into this same issue of having no good way to know if a module was 
builtin or just
missing when adding dynamic kernel module support for Android [0])

Andrew

[0] 
https://android.googlesource.com/platform/system/core/+/9963847419f41c76ca008cf0c09e986c79f04e4c

  # Create a symlink to any touchscreen input device
  SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", 
SYMLINK+="input/touchscreen0"


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14150): 
https://lists.yoctoproject.org/g/meta-arago/message/14150
Mute This Topic: https://lists.yoctoproject.org/mt/96050645/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to