You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
93 lines
2.4 KiB
Bash
93 lines
2.4 KiB
Bash
9 years ago
|
#!/usr/bin/env bash
|
||
|
# This script will attempt to setup the Linux dependencies for compiling QMK/TMK
|
||
|
|
||
|
# This could probably go much lower, but since we are including an Arch vagrant,
|
||
|
# making it the first match makes sense
|
||
|
|
||
|
if [[ -n "$(type -P pacman )" ]]; then
|
||
|
# Arch linux and derivatives like Apricity
|
||
9 years ago
|
# Future improvements:
|
||
|
# Allow user to speed up package installs using powerpill/wget tweaks
|
||
|
# Always run the pacman mirror update script if possible when vagrant comes up
|
||
|
# This will ensure that users never get stalled on a horribly slow mirror
|
||
|
pacman -Syyu --needed --noconfirm
|
||
9 years ago
|
pacman -S --needed --noconfirm \
|
||
|
base-devel \
|
||
|
avr-gcc \
|
||
|
avr-binutils \
|
||
|
avr-libc \
|
||
8 years ago
|
dfu-util \
|
||
|
arm-none-eabi-gcc \
|
||
|
arm-none-eabi-binutils \
|
||
|
arm-none-eabi-newlib \
|
||
|
git
|
||
9 years ago
|
|
||
|
elif [[ -n "$(type -P apt-get)" ]]; then
|
||
|
# Debian and derivatives
|
||
9 years ago
|
# This block performs completely non-interactive updates {{
|
||
|
export DEBIAN_FRONTEND=noninteractive
|
||
|
export DEBCONF_NONINTERACTIVE_SEEN=true
|
||
|
echo "grub-pc hold" | dpkg --set-selections
|
||
|
apt-get -y update
|
||
|
apt-get -y --allow-unauthenticated upgrade \
|
||
|
-o Dpkg::Options::="--force-confdef" \
|
||
|
-o Dpkg::Options::="--force-confold"
|
||
|
# }}
|
||
9 years ago
|
apt-get install -y \
|
||
|
build-essential \
|
||
|
gcc \
|
||
|
unzip \
|
||
|
wget \
|
||
|
zip \
|
||
|
gcc-avr \
|
||
|
binutils-avr \
|
||
|
avr-libc \
|
||
9 years ago
|
dfu-programmer \
|
||
8 years ago
|
dfu-util \
|
||
|
gcc-arm-none-eabi \
|
||
|
binutils-arm-none-eabi \
|
||
|
libnewlib-arm-none-eabi \
|
||
|
git
|
||
9 years ago
|
|
||
9 years ago
|
elif [[ -n "$(type -P yum)" ]]; then
|
||
|
# Fedora, CentOS or RHEL and derivatives
|
||
9 years ago
|
yum -y makecache && yum -y update
|
||
9 years ago
|
yum -y install \
|
||
|
gcc \
|
||
|
glibc-headers \
|
||
|
kernel-devel \
|
||
|
kernel-headers \
|
||
|
make \
|
||
|
perl \
|
||
|
git \
|
||
|
wget \
|
||
|
avr-binutils \
|
||
|
avr-gcc \
|
||
|
avr-libc \
|
||
9 years ago
|
dfu-programmer \
|
||
8 years ago
|
dfu-util \
|
||
|
gcc-arm-none-eabi \
|
||
|
binutils-arm-none-eabi \
|
||
|
libnewlib-arm-none-eabi \
|
||
|
git
|
||
|
# The listed eabi pacackes do unfortunately not exist for CentOS,
|
||
|
# But at least in Fedora they do, so try to install them anyway
|
||
|
# TODO: Build them from sources, if the installation fails
|
||
9 years ago
|
|
||
|
elif [[ -n "$(type -P zypper)" ]]; then
|
||
|
# openSUSE
|
||
9 years ago
|
zypper --non-interactive refresh && zypper --non-interactive update
|
||
9 years ago
|
zypper --non-interactive install \
|
||
|
git \
|
||
|
make \
|
||
|
gcc \
|
||
|
kernel-devel \
|
||
|
patch \
|
||
|
wget \
|
||
8 years ago
|
dfu-programmer \
|
||
|
git
|
||
|
# TODO: The avr and eabi tools are not available as default packages, so we need
|
||
|
# another way to install them
|
||
9 years ago
|
|
||
|
fi
|