diff options
author | Ryan <fauxpark@gmail.com> | 2020-10-01 04:10:02 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-01 04:10:02 +1000 |
commit | 482c9fbbf28c7e871145cacd01f22c9edf7d1ddf (patch) | |
tree | 9c20cfeb1608326cf9e7f689d4e21ebf75d8216b /util | |
parent | 5ecb1b2d39f5424979a1325e2642ac73db828c03 (diff) | |
download | qmk_firmware-482c9fbbf28c7e871145cacd01f22c9edf7d1ddf.tar.gz qmk_firmware-482c9fbbf28c7e871145cacd01f22c9edf7d1ddf.zip |
MSYS2: Switch to arm-none-eabi-gcc package (#10421)
Diffstat (limited to 'util')
-rwxr-xr-x | util/activate_msys2.sh | 1 | ||||
-rwxr-xr-x | util/msys2_install.sh | 47 |
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 @@ | |||
3 | function export_variables { | 3 | function 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 | ||
9 | export_variables | 8 | export_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 | ||
3 | dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) | 3 | dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) |
4 | download_dir=~/qmk_utils | 4 | download_dir=~/qmk_utils |
5 | armtools=gcc-arm-none-eabi | ||
6 | util_dir=$(dirname "$0") | 5 | util_dir=$(dirname "$0") |
7 | 6 | ||
8 | echo "Installing dependencies needed for the installation" | 7 | echo "Installing dependencies needed for the installation" |
9 | pacman --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 | 8 | pacman --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 | ||
11 | source "$dir/win_shared_install.sh" | 15 | source "$dir/win_shared_install.sh" |
12 | 16 | ||
13 | function 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 | |||
19 | function 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 | |||
29 | pushd "$download_dir" | ||
30 | |||
31 | install_avr | ||
32 | |||
33 | if [ ! -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 | ||
38 | else | ||
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 | ||
49 | fi | ||
50 | popd | ||
51 | |||
52 | pip3 install -r "${util_dir}/../requirements.txt" | 17 | pip3 install -r "${util_dir}/../requirements.txt" |
53 | 18 | ||
54 | cp -f "$dir/activate_msys2.sh" "$download_dir/" | 19 | cp -f "$dir/activate_msys2.sh" "$download_dir/" |