udev

How to populate /dev with a custom directory with udev

左心房为你撑大大i 提交于 2021-02-08 10:14:51
问题 For using gadgetfs I have to mount the gadgetfs filesystem to the mount point /dev/gadget . But because /dev is controlled by udev a manually created directory gets lost on each reboot. Sure, I could create the directory in some init.d-Skript but a more clean solution would be to configure udev to automatically create this directory. I'm pretty sure this must be possible somehow because there are lots of other directories in there already. So how can I configure udev to create a /dev/gadget

Automatically installing multiple apps on Android devices when connected to a linux system

流过昼夜 提交于 2021-02-04 16:45:37
问题 I had written some scripts using Ubuntu 14.04 and adb to automatically configure 100´s of Android smartphones. To achieve that I used an udev rule to identify if an USB device is attached to the pc and if that's the case I call my scripts to install some apps onto the devices. So far, so good but there are some problems. At the moment we are connecting 5 devices at the same time, but it happens quite often that on one of the devices one ore more apps are not being installed. It does not

How to get a unique ID for each Arduino

心已入冬 提交于 2021-01-29 04:50:35
问题 I use two Arduino Nano, and want to change their name as listed in /dev , because currently they are always ttyUSB<NUMBER> . How can I get a unique serial number to create a udev rule? I tried to get it via udevadm , but it returns the same serial ID for both Arduinos. /var/log: udevadm info -a -n /dev/ttyUSB0 | grep '{serial}' ATTRS{serial}=="0000:00:14.0" 回答1: Arduino Nano is based on ATmega328 which does not have a built-in USB controller. The USB connector on the board is connected to an

bitbake do_rootfs install fails with shared library symlink in bbappend

纵饮孤独 提交于 2021-01-27 17:11:59
问题 I am trying to add a shared library package to a Yocto Krogoth image from a custom recipe that is dependent on libudev.so.0 but the openembedded-core layer's eudev recipe only provides libudev.so.1.6.3 and a libudev.so.1 symlink: libudev.so.1 -> libudev.so.1.6.3 I have added a eudev_%.bbappend recipes_core recipe that creates the symlink do_install_append() { ln -srf ${D}${base_libdir}/libudev.so.1 ${D}${base_libdir}/libudev.so.0 } and I can confirm the libudev.so.0 file is added to the

How to get host's udev events from a Docker container?

拈花ヽ惹草 提交于 2020-12-10 08:47:19
问题 In a Docker container, I am looking for a way to get the udev events on the host. Using udevadm monitor , it sends back host's kernel events only in a container. The question is whether there is a way to detect host's udev events or forward host's event to containers? 回答1: This is how I made my container receive host events by udev: docker run --net=host -v /run/udev/control:/run/udev/control --net=host allows container and host operate through PF_NETLINK sockets, which are used by udev

Why udev init script default disable container support while in fact it works?

杀马特。学长 韩版系。学妹 提交于 2020-06-25 02:14:46
问题 Use docker run -idt -v /dev:/dev --privileged --name delete ubuntu:18.04 /bin/bash to new a container, and in container use apt-get install -y udev to install udev. When start udev, it reports next: root@0947408dab9b:~# service udev start * udev does not support containers, not started Then, I change the init script in /etc/init.d/udev , comments next 2 parts: 1) Comments next: #if ! ps --no-headers --format args ax | egrep -q '^\['; then # log_warning_msg "udev does not support containers,

libusb calls without sudo using udev-rules

99封情书 提交于 2020-04-30 05:11:11
问题 Tested on Kubuntu 16.04 64 bit only. I have an application which source is not under my control. It uses some libusb calls which ends up in e.g.: libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/001/031: Permission denied libusb: error [_get_usbfs_fd] libusb requires write access to USB device nodes. When running the above mentioned application as root, it works as expected. When I change the permissions of the regarding file like: sudo chmod a+w /dev/bus/usb/001/031

Diolan DLN-2 SPI controller on x86_64 platform

*爱你&永不变心* 提交于 2020-04-18 04:41:38
问题 I am attempting to utilize the DLN-2 in an x86_64 Linux environment (kernel version 4.18) to provide SPI and I2C bus controllers to the userspace, in a similar manner you would using an ARM platform with DTS/DTB file modifications. I am having trouble identifying the proper method to attach a SPI slave device or mount the device to userspace with the spidev driver. The kernel modules are loading successfully and the SPI bus is mounted as a spi_master. I am certain the chip itself is working

read usb serial code in bash using udevadm

浪尽此生 提交于 2020-02-25 06:51:35
问题 I am trying to read usb unique id in bash using using udevadm command. used command is: udevadm info --query=all --name=/dev/sdc1 output is proper while using a regular usb storage, E: ID_SERIAL=JetFlash_Transcend_2GB_7FYD0N04-0:0 E: ID_SERIAL_SHORT=7FYD0N04 But when i use a mp3 player, output is something odd like: E: ID_SERIAL=10d6_USB_2.0_FS__FLASH_DISK_USB_2.0_FS__FLASH_DISK E: ID_SERIAL_SHORT=USB_2.0_FS__FLASH_DISK Is there some thing unique other than ID_SERIAL_SHORT for a usb storage?

read usb serial code in bash using udevadm

ぐ巨炮叔叔 提交于 2020-02-25 06:51:11
问题 I am trying to read usb unique id in bash using using udevadm command. used command is: udevadm info --query=all --name=/dev/sdc1 output is proper while using a regular usb storage, E: ID_SERIAL=JetFlash_Transcend_2GB_7FYD0N04-0:0 E: ID_SERIAL_SHORT=7FYD0N04 But when i use a mp3 player, output is something odd like: E: ID_SERIAL=10d6_USB_2.0_FS__FLASH_DISK_USB_2.0_FS__FLASH_DISK E: ID_SERIAL_SHORT=USB_2.0_FS__FLASH_DISK Is there some thing unique other than ID_SERIAL_SHORT for a usb storage?