Allow udev rules & make it persistent (#210)

* Install default to lib

* Create hmip-rfusb.rules

* Create etc-udev-rules.d.mount

* Update hassos-config

* Update configuration.md

* Update rauc.sh

* Add ln
This commit is contained in:
Pascal Vizeli
2018-10-11 20:49:20 +02:00
committed by Pascal Vizeli
parent 8ffcd3efb9
commit 398b684d8d
6 changed files with 33 additions and 2 deletions

View File

@@ -24,8 +24,8 @@ define BLUETOOTH_BCM43XX_INSTALL_TARGET_CMDS
$(INSTALL) -d $(TARGET_DIR)/lib/firmware/brcm
$(INSTALL) -m 0644 $(@D)/*.hcd $(TARGET_DIR)/lib/firmware/brcm/
$(INSTALL) -d $(TARGET_DIR)/etc/udev/rules.d
$(INSTALL) -m 0644 $(@D)/bluetooth-bcm43xx.rules $(TARGET_DIR)/etc/udev/rules.d/
$(INSTALL) -d $(TARGET_DIR)/usr/lib/udev/rules.d
$(INSTALL) -m 0644 $(@D)/bluetooth-bcm43xx.rules $(TARGET_DIR)/usr/lib/udev/rules.d/
endef
$(eval $(generic-package))

View File

@@ -0,0 +1 @@
/usr/lib/systemd/system/etc-udev-rules.d.mount

View File

@@ -0,0 +1,14 @@
[Unit]
Description=Udev persistent rules.d
Requires=mnt-overlay.mount
After=mnt-overlay.mount
Before=systemd-udevd.service hassos-config.service
[Mount]
What=/mnt/overlay/etc/udev/rules.d
Where=/etc/udev/rules.d
Type=None
Options=bind
[Install]
WantedBy=hassos-bind.target

View File

@@ -0,0 +1 @@
ACTION=="add", ATTRS{idVendor}=="1b1f", ATTRS{idProduct}=="c020", RUN+="/sbin/modprobe cp210x" RUN+="/bin/sh -c 'echo 1b1f c020 >/sys/bus/usb-serial/drivers/cp210x/new_id'"

View File

@@ -33,6 +33,15 @@ if [ -d /mnt/config/modules ]; then
cp -f /mnt/config/modules/* /etc/modules-load.d/*
fi
##
# Udev
if [ -d /mnt/config/udev ]; then
echo "[Info] Update Udev configuration!"
rm -rf /etc/udev/rules.d/*
cp -f /mnt/config/udev/* /etc/udev/rules.d/*
fi
##
# SSH know hosts
if [ -f /mnt/config/authorized_keys ]; then