upload
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

avr_setup.sh 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/usr/bin/env bash
  2. # This script will attempt to setup the Linux dependencies for compiling QMK/TMK
  3. # This could probably go much lower, but since we are including an Arch vagrant,
  4. # making it the first match makes sense
  5. if [[ -n "$(type -P pacman )" ]]; then
  6. # Arch linux and derivatives like Apricity
  7. # Future improvements:
  8. # Allow user to speed up package installs using powerpill/wget tweaks
  9. # Always run the pacman mirror update script if possible when vagrant comes up
  10. # This will ensure that users never get stalled on a horribly slow mirror
  11. pacman -Syyu --needed --noconfirm
  12. pacman -S --needed --noconfirm \
  13. base-devel \
  14. avr-gcc \
  15. avr-binutils \
  16. avr-libc \
  17. dfu-util
  18. elif [[ -n "$(type -P apt-get)" ]]; then
  19. # Debian and derivatives
  20. # This block performs completely non-interactive updates {{
  21. export DEBIAN_FRONTEND=noninteractive
  22. export DEBCONF_NONINTERACTIVE_SEEN=true
  23. echo "grub-pc hold" | dpkg --set-selections
  24. apt-get -y update
  25. apt-get -y --allow-unauthenticated upgrade \
  26. -o Dpkg::Options::="--force-confdef" \
  27. -o Dpkg::Options::="--force-confold"
  28. # }}
  29. apt-get install -y \
  30. build-essential \
  31. gcc \
  32. unzip \
  33. wget \
  34. zip \
  35. gcc-avr \
  36. binutils-avr \
  37. avr-libc \
  38. dfu-util
  39. elif [[ -n "$(type -P yum)" ]]; then
  40. # Fedora, CentOS or RHEL and derivatives
  41. yum -y makecache && yum -y update
  42. yum -y install \
  43. gcc \
  44. glibc-headers \
  45. kernel-devel \
  46. kernel-headers \
  47. make \
  48. perl \
  49. git \
  50. wget \
  51. avr-binutils \
  52. avr-gcc \
  53. avr-libc \
  54. dfu-util
  55. elif [[ -n "$(type -P zypper)" ]]; then
  56. # openSUSE
  57. zypper --non-interactive refresh && zypper --non-interactive update
  58. zypper --non-interactive install \
  59. git \
  60. make \
  61. gcc \
  62. kernel-devel \
  63. patch \
  64. wget \
  65. dfu-programmer
  66. fi