Udevadm not found

I just installed OpenWrt 19.07.6, I was trying to run a script but I found out that udevadm is not installed, I even searched in the menuconfig utility but no luck. please help me to install this. I need to include this in build time to generate binary image.
image

if it's not in the menuconfig or the package list for stable, isn't not available, and you have to add it yourself.

How can I add this to OpenWrt Build System ?

check out https://openwrt.org/docs/guide-developer/packages

1 Like

For all practical intents and purposes, it would probably be easier to re-write your "script" not to use udev, than to add udev to OpenWrt (and expect that the rest will remain functional).

2 Likes

Actually, it turns out that it will be easy to add udevadm :slight_smile:

Some time back, I had a need for a working udev (and not a crippled shim) in order to port and implement Intel's Quickassist drivers and software to Openwrt, as the code uses libudev to generate uevents that need to be processed by hotplug.

I took the old LEDE Makefile of eudev (Gentoo's libudev) and patched it to remove udevd and to strip some of the commands out of udevadm so that the libudev libraries and the udevadm binary can be used safely on Openwrt.

With this variant an app can use the libudev routines to sent kernel uevents that can then be picked up and handled by standard hotplug scripts and the udevadm binary is fully functional within its stripped down constraints.

I've been running this version of eudev on my openwrt for about a year now and it coexists peacefully with everything else. There's actually no good reason that a fully functional version of libudev can't be used on Openwrt as long as udevd is not installed.

The only proviso is that there was recently a new, (cripple as well) libudev-zero added to Openwrt, which needs to be masked out if using this package

diff --git a/libs/libudev-zero/Makefile b/libs/libudev-zero/Makefile
index bb2e94666..8320ff8ce 100644
--- a/libs/libudev-zero/Makefile
+++ b/libs/libudev-zero/Makefile
@@ -26,9 +26,7 @@ define Package/libudev-zero
   CATEGORY:=Libraries
   TITLE:=Drop-in replacement for libudev
   URL:=https://github.com/illiliti/libudev-zero
-  DEPENDS:=+libevdev
-  PROVIDES:=libudev
-  CONFLICTS:=libudev eudev udev
+  DEPENDS:=+libevdev @BROKEN
 endef
 
 MAKE_FLAGS += \

1 Like

Thank You. I will look into it.

I resolved this issue by adding "udev" package into the latest build and recompiled the image, however, I faced some errors which I fixed it. udevadm is working now.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.