Skip to content

Commit 4b545d6

Browse files
committed
RP2040: add post_install linux script
Use the same script to add rules for Portenta and any other board that doesn't use CDC / plugdev method
1 parent f59b273 commit 4b545d6

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

post_install.sh

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env bash
2+
3+
rp2040rules () {
4+
echo ""
5+
echo "# Raspberry Pi RP2040 bootloader mode UDEV rules"
6+
echo ""
7+
cat <<EOF
8+
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2e8a", MODE:="0666"
9+
EOF
10+
}
11+
12+
if [ "$EUID" -ne 0 ]
13+
then echo "Please run as root"
14+
exit
15+
fi
16+
17+
rp2040rules > /etc/udev/rules.d/60-rp2040.rules
18+
19+
# reload udev rules
20+
echo "Reload rules..."
21+
udevadm trigger
22+
udevadm control --reload-rules

0 commit comments

Comments
 (0)