Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions build/linux/dist/arduino-linux-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Release v11 changelog :
#
# + Fixing ModemManager removal for Fedora Core
# + Adding Atmel ICE Debugger CMSIS-DAP rule
#
# Release v10 changelog :
#
# + Adding support for Slackware
Expand Down Expand Up @@ -62,6 +67,8 @@
# + now the script checks for SUDO permissions
#

#!/bin/bash

# if [[ $EUID != 0 ]] ; then
# echo This must be run as root!
# exit 1
Expand Down Expand Up @@ -91,8 +98,11 @@ groupsfunc () {
echo "******* Add User to dialout,tty, uucp, plugdev groups *******"
echo ""

sudo groupadd plugdev
sudo groupadd tty
sudo groupadd dialout
sudo groupadd uucp
sudo groupadd plugdev

sudo usermod -a -G tty $1
sudo usermod -a -G dialout $1
sudo usermod -a -G uucp $1
Expand All @@ -116,7 +126,7 @@ EOF
openocdrules () {

echo ""
echo "# Adding Arduino M0/M0 Pro, Primo UDEV Rules for CMSIS-DAP port"
echo "# Adding Arduino M0/M0 Pro, Primo, Atmel ICE Debugger UDEV Rules for CMSIS-DAP port"
echo ""

cat <<EOF
Expand All @@ -125,6 +135,9 @@ SUBSYSTEM!="usb|tty|hidraw", GOTO="openocd_rules_end"

#Please keep this list sorted by VID:PID

#Atmel ICE Debugger
ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2141", MODE="664", GROUP="plugdev", TAG+="uaccess"

#CMSIS-DAP compatible adapters
ATTRS{product}=="*CMSIS-DAP*", MODE="664", GROUP="plugdev"

Expand Down Expand Up @@ -194,7 +207,8 @@ removemm () {
elif [ -f /etc/fedora-release ] || [ -f /etc/redhat-release ]
then
#Only for Red Hat/Fedora/CentOS
sudo yum remove modemmanager
sudo rpm -e --nodeps ModemManager
sudo rpm -e --nodeps ModemManager-glib
elif [ -f /etc/arch-release ]
then
#Only for ArchLinux
Expand All @@ -206,7 +220,7 @@ removemm () {
elif [ -f /etc/lsb-release ] || [ -f /etc/debian_version ] || [ -f /etc/linuxmint/info ]
then
#Only for Ubuntu/Mint/Debian
sudo apt-get -y remove modemmanager
sudo apt-get -y purge modemmanager
else
echo ""
echo "Your system is not supported, please remove the ModemManager package with your package manager!"
Expand Down