]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Add ChibiOS packages to the avr_setup script (#468)
authorfredizzimo <fsundvik@gmail.com>
Fri, 1 Jul 2016 21:22:09 +0000 (00:22 +0300)
committerJack Humbert <jack.humb@gmail.com>
Fri, 1 Jul 2016 21:22:09 +0000 (17:22 -0400)
* Add ChibiOS packages to the avr_setup script

* Add git as a dependency

* Rename avr_setup.sh -> install_dependencies.sh

Also fix the Vagrant welcome message to reflect the new directory
structure.

Vagrantfile
util/avr_setup.sh [deleted file]
util/install_dependencies.sh [new file with mode: 0644]

index 42b4377510ca97a5953074e7e9d1c5b980e01226..8cadeaddfcfbff97164c738d59ce150cc2237b79 100644 (file)
@@ -78,7 +78,7 @@ Vagrant.configure(2) do |config|
   # add a # before ,args: and run 'vagrant up' to get a working
   # non-updated box and then attempt to troubleshoot or open a Github issue
 
-  config.vm.provision "shell", run: "always", path: "./util/avr_setup.sh", args: "-update"
+  config.vm.provision "shell", run: "always", path: "./util/install_dependencies.sh", args: "-update"
 
   config.vm.post_up_message = <<-EOT
   Log into the VM using 'vagrant ssh' on OSX or from Git Bash (Win)
@@ -91,7 +91,7 @@ Vagrant.configure(2) do |config|
 
   Or you can copy and paste the example line below.
 
-  cd /vagrant; cd keyboard; cd ergodox_ez; make clean; make
+  cd /vagrant; cd keyboards; cd ergodox_ez; make clean; make
 
 
   EOT
diff --git a/util/avr_setup.sh b/util/avr_setup.sh
deleted file mode 100644 (file)
index 916d037..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/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
-  # 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
-  pacman -S --needed --noconfirm \
-    base-devel \
-    avr-gcc \
-    avr-binutils \
-    avr-libc \
-    dfu-util
-
-elif [[ -n "$(type -P apt-get)" ]]; then
-  # Debian and derivatives
-  # 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"
-  # }}
-  apt-get install -y \
-    build-essential \
-    gcc \
-    unzip \
-    wget \
-    zip \
-    gcc-avr \
-    binutils-avr \
-    avr-libc \
-    dfu-programmer \
-    dfu-util
-
-elif [[ -n "$(type -P yum)" ]]; then
-  # Fedora, CentOS or RHEL and derivatives
-  yum -y makecache && yum -y update
-  yum -y install \
-    gcc \
-    glibc-headers \
-    kernel-devel \
-    kernel-headers \
-    make \
-    perl \
-    git \
-    wget \
-    avr-binutils \
-    avr-gcc \
-    avr-libc \
-    dfu-programmer \
-    dfu-util
-
-elif [[ -n "$(type -P zypper)" ]]; then
-  # openSUSE
-  zypper --non-interactive refresh  && zypper --non-interactive update
-  zypper --non-interactive install \
-    git \
-    make \
-    gcc \
-    kernel-devel \
-    patch \
-    wget \
-    dfu-programmer
-
-fi
diff --git a/util/install_dependencies.sh b/util/install_dependencies.sh
new file mode 100644 (file)
index 0000000..24564a2
--- /dev/null
@@ -0,0 +1,92 @@
+#!/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
+  # 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
+  pacman -S --needed --noconfirm \
+    base-devel \
+    avr-gcc \
+    avr-binutils \
+    avr-libc \
+    dfu-util \
+    arm-none-eabi-gcc \
+    arm-none-eabi-binutils \
+    arm-none-eabi-newlib \
+    git
+
+elif [[ -n "$(type -P apt-get)" ]]; then
+  # Debian and derivatives
+  # 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"
+  # }}
+  apt-get install -y \
+    build-essential \
+    gcc \
+    unzip \
+    wget \
+    zip \
+    gcc-avr \
+    binutils-avr \
+    avr-libc \
+    dfu-programmer \
+    dfu-util \
+    gcc-arm-none-eabi \
+    binutils-arm-none-eabi \
+    libnewlib-arm-none-eabi \
+    git
+
+elif [[ -n "$(type -P yum)" ]]; then
+  # Fedora, CentOS or RHEL and derivatives
+  yum -y makecache && yum -y update
+  yum -y install \
+    gcc \
+    glibc-headers \
+    kernel-devel \
+    kernel-headers \
+    make \
+    perl \
+    git \
+    wget \
+    avr-binutils \
+    avr-gcc \
+    avr-libc \
+    dfu-programmer \
+    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
+
+elif [[ -n "$(type -P zypper)" ]]; then
+  # openSUSE
+  zypper --non-interactive refresh  && zypper --non-interactive update
+  zypper --non-interactive install \
+    git \
+    make \
+    gcc \
+    kernel-devel \
+    patch \
+    wget \
+    dfu-programmer \
+    git
+  # TODO: The avr and eabi tools are not available as default packages, so we need 
+  # another way to install them
+
+fi