From c30aba0bce989d29458bd3b56090400cb0a91d03 Mon Sep 17 00:00:00 2001 From: fredizzimo Date: Sat, 2 Jul 2016 00:22:09 +0300 Subject: [PATCH] Add ChibiOS packages to the avr_setup script (#468) * 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 | 4 +-- .../{avr_setup.sh => install_dependencies.sh} | 26 ++++++++++++++++--- 2 files changed, 24 insertions(+), 6 deletions(-) rename util/{avr_setup.sh => install_dependencies.sh} (73%) diff --git a/Vagrantfile b/Vagrantfile index 42b4377510..8cadeaddfc 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -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/install_dependencies.sh similarity index 73% rename from util/avr_setup.sh rename to util/install_dependencies.sh index 916d0378b4..24564a2ac5 100644 --- a/util/avr_setup.sh +++ b/util/install_dependencies.sh @@ -16,7 +16,11 @@ if [[ -n "$(type -P pacman )" ]]; then avr-gcc \ avr-binutils \ avr-libc \ - dfu-util + 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 @@ -39,7 +43,11 @@ elif [[ -n "$(type -P apt-get)" ]]; then binutils-avr \ avr-libc \ dfu-programmer \ - dfu-util + 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 @@ -57,7 +65,14 @@ elif [[ -n "$(type -P yum)" ]]; then avr-gcc \ avr-libc \ dfu-programmer \ - dfu-util + 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 @@ -69,6 +84,9 @@ elif [[ -n "$(type -P zypper)" ]]; then kernel-devel \ patch \ wget \ - dfu-programmer + dfu-programmer \ + git + # TODO: The avr and eabi tools are not available as default packages, so we need + # another way to install them fi