summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-11-21 23:09:02 -0800
committerfauxpark <fauxpark@gmail.com>2019-11-22 18:09:02 +1100
commit66d473437110508af747b6ca09517bfad6c50d0b (patch)
tree0f5b5184b483f56e1b6eaaf5a91ed03d554780e9 /util
parent6cf574396adfb08f7fe7fe6f7ce68387fd474018 (diff)
downloadqmk_firmware-66d473437110508af747b6ca09517bfad6c50d0b.tar.gz
qmk_firmware-66d473437110508af747b6ca09517bfad6c50d0b.zip
Improve and streamline MSYS2 installation (#7232)
* Make MSYS force install * Cleanup msys script * Update to gcc 8.3 for arm and avr And cleanup install scripts for both * Fix path and scripts * Fix links * No confirmation for msys * Tweak arm function since file structure changed * Fix spacing and wording Co-Authored-By: fauxpark <fauxpark@gmail.com> * Only use MSYS2's make binary Co-Authored-By: fauxpark <fauxpark@gmail.com> * Some wordsmithing Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Add "disable download timeout" for download issues in MSYS Co-Authored-By: Mikkel Jeppesen <2756925+Duckle29@users.noreply.github.com> * Clean up URL for arm gcc download Co-Authored-By: Joel Challis <git@zvecr.com> * add pip Co-Authored-By: fauxpark <fauxpark@gmail.com>
Diffstat (limited to 'util')
-rwxr-xr-xutil/msys2_install.sh66
1 files changed, 23 insertions, 43 deletions
diff --git a/util/msys2_install.sh b/util/msys2_install.sh
index 58397c7a3f..d1e24ca6d0 100755
--- a/util/msys2_install.sh
+++ b/util/msys2_install.sh
@@ -8,25 +8,27 @@ installflip=false
util_dir=$(dirname "$0")
echo "Installing dependencies needed for the installation (quazip)"
-pacman --needed -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang msys/git msys/p7zip msys/python3 msys/unzip
+pacman --needed --noconfirm --disable-download-timeout -Sy base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang msys/git msys/p7zip mingw-w64-x86_64-python3-pip msys/unzip
source "$dir/win_shared_install.sh"
function install_avr {
rm -f -r "$avrtools"
- wget "http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.6.1.1752-win32.any.x86.zip"
+ wget "https://blog.zakkemble.net/download/avr-gcc-8.3.0-x86-mingw.zip"
echo "Extracting AVR toolchain..."
- unzip -q avr8-gnu-toolchain-3.6.1.1752-win32.any.x86.zip
- mv avr8-gnu-toolchain-win32_x86/ avr8-gnu-toolchain
- rm __MACOSX -R
- rm avr8-gnu-toolchain-3.6.1.1752-win32.any.x86.zip
- pacman --needed -S mingw-w64-x86_64-avrdude
+ unzip -q -d . avr-gcc-8.3.0-x86-mingw.zip
+ mv avr-gcc-8.3.0-x86-mingw avr8-gnu-toolchain
+ rm avr8-gnu-toolchain/bin/make.exe
+ rm avr-gcc-8.3.0-x86-mingw.zip
+ pacman --needed --disable-download-timeout -S mingw-w64-x86_64-avrdude
}
function install_arm {
- wget -O gcc-arm-none-eabi.zip "https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-win32.zip?product=GNU%20ARM%20Embedded%20Toolchain,ZIP,,Windows,6-2017-q2-update"
- unzip -d gcc-arm-none-eabi gcc-arm-none-eabi.zip
- rm gcc-arm-none-eabi.zip
+ rm -f -r "$armtools"
+ 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"
+ echo "Extracting ARM toolchain..."
+ unzip -q -d gcc-arm-none-eabi gcc-arm-none-eabi-8-2019-q3-update-win32.zip
+ rm gcc-arm-none-eabi-8-2019-q3-update-win32.zip
}
function extract_flip {
@@ -43,17 +45,10 @@ if [ -f "FlipInstaller.exe" ]; then
fi
if [ ! -d "$avrtools" ]; then
- while true; do
- echo
- echo "The AVR toolchain is not installed."
- echo "This is needed for building AVR based keboards."
- read -p "Do you want to install it? (Y/N) " res
- case $res in
- [Yy]* ) install_avr; break;;
- [Nn]* ) break;;
- * ) echo "Invalid answer";;
- esac
- done
+ echo
+ echo "The AVR toolchain is not installed."
+ echo "This is needed for building AVR based keyboards."
+ install_avr
else
while true; do
echo
@@ -68,17 +63,10 @@ else
fi
if [ ! -d "$armtools" ]; then
- while true; do
- echo
- echo "The ARM toolchain is not installed."
- echo "This is needed for building ARM based keyboards."
- read -p "Do you want to install it? (Y/N) " res
- case $res in
- [Yy]* ) install_arm; break;;
- [Nn]* ) break;;
- * ) echo "Invalid answer";;
- esac
- done
+ echo
+ echo "The ARM toolchain is not installed."
+ echo "This is needed for building ARM based keyboards."
+ install_arm
else
while true; do
echo
@@ -103,18 +91,10 @@ then
echo "The line source ~/qmk_utils/activate_msys2.sh is already added to your /.bashrc"
echo "Not adding it twice!"
else
- while true; do
echo
- echo "Do you want to add 'source ~/qmk_utils/activate_msys2.sh' to the end of your"
- echo ".bashrc file? Without this make won't find the needed utils, so if you don't"
- echo "want to do it automatically, then you have to do it manually later."
- read -p "(Y/N)? " res
- case $res in
- [Yy]* ) echo "source ~/qmk_utils/activate_msys2.sh" >> ~/.bashrc; break;;
- [Nn]* ) break;;
- * ) echo "Invalid answer";;
- esac
- done
+ echo "Adding 'source ~/qmk_utils/activate_msys2.sh' to the end of your"
+ echo ".bashrc file. Without this make won't find the needed utils."
+ echo "source ~/qmk_utils/activate_msys2.sh" >> ~/.bashrc;
fi
echo