Created
June 1, 2019 21:20
-
-
Save nuumio/678443ec7298448af821bf31745810aa to your computer and use it in GitHub Desktop.
RockPro64 trigger PCIe probe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FILE: /etc/udev/rules.d/99-rockchip-pcie.rules | |
# Trigger Rockchip PCIe probe | |
ACTION=="add", KERNEL=="f8000000.pcie", SUBSYSTEM=="platform", RUN+="/usr/local/sbin/rockpro64_pcie_probe.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# FILE: /usr/local/sbin/rockpro64_pcie_probe.sh | |
PROBE_TRIGGER=/sys/devices/platform/f8000000.pcie/pcie_deferred | |
if [ ! -f ${PROBE_TRIGGER} ]; then | |
echo "Missing PCIe probe trigger file: ${PROBE_TRIGGER}" | |
echo "Your kernel may not support userspace triggered PCIe probe." | |
exit 1 | |
fi | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
echo "1" > ${PROBE_TRIGGER} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment