Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bb-customizations: overlap between generic-board-startup and /etc/udev/rules.d/*gpio*.rules #40

Open
nahuel opened this issue Jul 18, 2018 · 5 comments

Comments

@nahuel
Copy link

nahuel commented Jul 18, 2018

The /etc/udev/rules.d/*gpio*.rules files changes the owner/group of the gpio device files to root:gpio, but this is also done in /opt/scripts/boot/generic-startup.sh so there seems to be a redundancy here. Also a race condition between udev and generic-statup.sh will manifest if you add your own udev rules files to set the gpio device files owner/group to be run after the bb-customizations ones with another user/group, breaking what you expect from an udev based system. Probably it will be better to remove the chown's from generic-startup.sh

Besides this, I think the *.rules files must use RUN+= instead of PROGRAM= to call chown.

@turmary
Copy link

turmary commented Jan 7, 2019

I have also a confusion about /etc/udev/rules.d/*gpio*.rules
They slow down the Debian system startup speed, take extra time more than a miniute.

@RobertCNelson
Copy link
Contributor

@turmary do you have any hints/patches for speed up?

@turmary
Copy link

turmary commented Jan 8, 2019

Yes, I have a patch which tested on PocketBeagle Linux v4.9.X.
Instead of travesing /sys/devices/platform/ocp/ocp:*pinmux by chown/chmod, it only traverse specific
/sys/devices/platform/ocp/ocp:XXX_pinmux path each time the udev rule executing.
etc_udev_rules_d.patch.txt

It will speed up the startup one minute time approximately.

I also noticed that keywords OWNER/GROUP/MODE in rules file doesn't take effect.

@amilcarlucas
Copy link

@turmary can you do a github pull request against current master?

@RobertCNelson
Copy link
Contributor

@amilcarlucas gpio permissions are no longer done in generic-startup.sh, it should all be taken by the udev rules:

https://github.com/beagleboard/customizations/tree/master/etc/udev/rules.d

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants