On 12/01/23 21:50, Denys Dmytriyenko wrote:
On Wed, Jan 04, 2023 at 10:12:42AM -0600, Andrew Davis via 
lists.yoctoproject.org wrote:
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.


Andrew,

Even with --quiet, the error logs were there in journalctl as modprobe
has a non-zero exit status. I looked at other udev rules for loading
modules and since they were also using `kmod`, I used this command.

For instance, in /lib/udev/rules.d/80-drivers.rules:
ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load $env{MODALIAS}"



(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

Ping! I haven't seen any answers to the above questions, but the patch
unfortunately already got merged...


Denys,

I missed this email thread.
I am extremely sorry about that.

-Jayesh


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14171): 
https://lists.yoctoproject.org/g/meta-arago/message/14171
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