aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-10-01 04:10:02 +1000
committerGitHub <noreply@github.com>2020-10-01 04:10:02 +1000
commit482c9fbbf28c7e871145cacd01f22c9edf7d1ddf (patch)
tree9c20cfeb1608326cf9e7f689d4e21ebf75d8216b /util
parent5ecb1b2d39f5424979a1325e2642ac73db828c03 (diff)
downloadqmk_firmware-482c9fbbf28c7e871145cacd01f22c9edf7d1ddf.tar.gz
qmk_firmware-482c9fbbf28c7e871145cacd01f22c9edf7d1ddf.zip
MSYS2: Switch to arm-none-eabi-gcc package (#10421)
Diffstat (limited to 'util')
-rwxr-xr-xutil/activate_msys2.sh1
-rwxr-xr-xutil/msys2_install.sh47
2 files changed, 6 insertions, 42 deletions
diff --git a/util/activate_msys2.sh b/util/activate_msys2.sh
index 3fc149dbb..b37bee859 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/gcc-arm-none-eabi/bin
7} 6}
8 7
9export_variables 8export_variables
diff --git a/util/msys2_install.sh b/util/msys2_install.sh
index b92199647..c223e52fa 100755
--- a/util/msys2_install.sh
+++ b/util/msys2_install.sh
@@ -2,53 +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
5armtools=gcc-arm-none-eabi
6util_dir=$(dirname "$0") 5util_dir=$(dirname "$0")
7 6
8echo "Installing dependencies needed for the installation" 7echo "Installing dependencies needed for the installation"
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 8pacman --needed --noconfirm --disable-download-timeout -Sy \
9 base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git unzip \
10 mingw-w64-x86_64-python-pip \
11 mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \
12 mingw-w64-x86_64-arm-none-eabi-binutils mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-arm-none-eabi-newlib \
13 mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-dfu-util mingw-w64-x86_64-teensy-loader-cli
10 14
11source "$dir/win_shared_install.sh" 15source "$dir/win_shared_install.sh"
12 16
13function install_avr {
14 pacman --needed --noconfirm --disable-download-timeout -S \
15 mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \
16 mingw-w64-x86_64-avrdude mingw-w64-x86_64-bootloadhid mingw-w64-x86_64-dfu-programmer mingw-w64-x86_64-teensy-loader-cli
17}
18
19function install_arm {
20 rm -f -r "$armtools"
21 wget -O gcc-arm-none-eabi-8-2019-q3-update-win32.zip "https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-win32.zip"
22 echo "Extracting ARM toolchain..."
23 unzip -q -d gcc-arm-none-eabi gcc-arm-none-eabi-8-2019-q3-update-win32.zip
24 rm gcc-arm-none-eabi-8-2019-q3-update-win32.zip
25
26 pacman --needed --noconfirm --disable-download-timeout -S mingw-w64-x86_64-dfu-util
27}
28
29pushd "$download_dir"
30
31install_avr
32
33if [ ! -d "$armtools" ]; then
34 echo
35 echo "The ARM toolchain is not installed."
36 echo "This is needed for building ARM based keyboards."
37 install_arm
38else
39 while true; do
40 echo
41 echo "The ARM toolchain is already installed"
42 read -p "Do you want to reinstall? (Y/N) " res
43 case $res in
44 [Yy]* ) install_arm; break;;
45 [Nn]* ) break;;
46 * ) echo "Invalid answer";;
47 esac
48 done
49fi
50popd
51
52pip3 install -r "${util_dir}/../requirements.txt" 17pip3 install -r "${util_dir}/../requirements.txt"
53 18
54cp -f "$dir/activate_msys2.sh" "$download_dir/" 19cp -f "$dir/activate_msys2.sh" "$download_dir/"