boundarydevices / imx_usb_loader

USB & UART loader for i.MX5/6/7/8 series
GNU Lesser General Public License v2.1
262 stars 158 forks source link

Running imx_usb_loader without root privileges #121

Closed niecore closed 3 years ago

niecore commented 3 years ago

What needs to be configured in order to run the imx usb loader without root rights?

sean-anderson-seco commented 3 years ago

Create /etc/udev/rules.d/50-imx.rules containing

SUBSYSTEM=="usb", ATTR{idVendor}=="15a2", MODE="0660", GROUP="plugdev", TAG+="uaccess"

Add another line for each idVendor your device uses. Then run

udevadm control reload && udevadm trigger

This will allow users in the plugdev group to run imx_usb without root. Add yourself to the group with

usermod -aG plugdev <your username>

You will need to log out and log back in to become a member. You can fix your groups in one terminal by running

sg plugdev newgrp $(id -gn)