aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-08-25 19:04:42 +1000
committerGitHub <noreply@github.com>2020-08-25 19:04:42 +1000
commitc9c63806a7a068cbc4d12d5739fdd0b05742241d (patch)
tree66affb54cd142093125f90ece3068647b4a24139 /util
parent5460489b5177245371d23b84b94673951866d003 (diff)
downloadqmk_firmware-c9c63806a7a068cbc4d12d5739fdd0b05742241d.tar.gz
qmk_firmware-c9c63806a7a068cbc4d12d5739fdd0b05742241d.zip
MSYS2: install packages for AVR toolchain (#10078)
Diffstat (limited to 'util')
-rwxr-xr-xutil/activate_msys2.sh1
-rwxr-xr-xutil/msys2_install.sh33
2 files changed, 5 insertions, 29 deletions
diff --git a/util/activate_msys2.sh b/util/activate_msys2.sh
index b003c1a78..3fc149dbb 100755
--- a/util/activate_msys2.sh
+++ b/util/activate_msys2.sh
@@ -3,7 +3,6 @@
3function export_variables { 3function export_variables {
4 local util_dir=~/qmk_utils 4 local util_dir=~/qmk_utils
5 export PATH=$PATH:$util_dir 5 export PATH=$PATH:$util_dir
6 export PATH=$PATH:$util_dir/avr8-gnu-toolchain/bin
7 export PATH=$PATH:$util_dir/gcc-arm-none-eabi/bin 6 export PATH=$PATH:$util_dir/gcc-arm-none-eabi/bin
8} 7}
9 8
diff --git a/util/msys2_install.sh b/util/msys2_install.sh
index 1351aa5d7..b92199647 100755
--- a/util/msys2_install.sh
+++ b/util/msys2_install.sh
@@ -2,25 +2,18 @@
2 2
3dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) 3dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
4download_dir=~/qmk_utils 4download_dir=~/qmk_utils
5avrtools=avr8-gnu-toolchain
6armtools=gcc-arm-none-eabi 5armtools=gcc-arm-none-eabi
7util_dir=$(dirname "$0") 6util_dir=$(dirname "$0")
8 7
9echo "Installing dependencies needed for the installation (quazip)" 8echo "Installing dependencies needed for the installation"
10pacman --needed --noconfirm --disable-download-timeout -Sy base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git mingw-w64-x86_64-python3-pip unzip 9pacman --needed --noconfirm --disable-download-timeout -Sy base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git mingw-w64-x86_64-python3-pip unzip
11 10
12source "$dir/win_shared_install.sh" 11source "$dir/win_shared_install.sh"
13 12
14function install_avr { 13function install_avr {
15 rm -f -r "$avrtools" 14 pacman --needed --noconfirm --disable-download-timeout -S \
16 wget "https://blog.zakkemble.net/download/avr-gcc-8.3.0-x86-mingw.zip" 15 mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \
17 echo "Extracting AVR toolchain..." 16 mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-teensy-loader-cli
18 unzip -q -d . avr-gcc-8.3.0-x86-mingw.zip
19 mv avr-gcc-8.3.0-x86-mingw avr8-gnu-toolchain
20 rm avr8-gnu-toolchain/bin/make.exe
21 rm avr-gcc-8.3.0-x86-mingw.zip
22
23 pacman --needed --noconfirm --disable-download-timeout -S mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-teensy-loader-cli
24} 17}
25 18
26function install_arm { 19function install_arm {
@@ -35,23 +28,7 @@ function install_arm {
35 28
36pushd "$download_dir" 29pushd "$download_dir"
37 30
38if [ ! -d "$avrtools" ]; then 31install_avr
39 echo
40 echo "The AVR toolchain is not installed."
41 echo "This is needed for building AVR based keyboards."
42 install_avr
43else
44 while true; do
45 echo
46 echo "The AVR toolchain is already installed"
47 read -p "Do you want to reinstall? (Y/N) " res
48 case $res in
49 [Yy]* ) install_avr; break;;
50 [Nn]* ) break;;
51 * ) echo "Invalid answer";;
52 esac
53 done
54fi
55 32
56if [ ! -d "$armtools" ]; then 33if [ ! -d "$armtools" ]; then
57 echo 34 echo