summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rwxr-xr-xutil/activate_msys2.sh2
-rwxr-xr-xutil/chibios-upgrader.sh6
-rwxr-xr-xutil/msys2_install.sh72
-rwxr-xr-xutil/travis_compiled_push.sh2
4 files changed, 13 insertions, 69 deletions
diff --git a/util/activate_msys2.sh b/util/activate_msys2.sh
index b003c1a787..b37bee8597 100755
--- a/util/activate_msys2.sh
+++ b/util/activate_msys2.sh
@@ -3,8 +3,6 @@
function export_variables {
local util_dir=~/qmk_utils
export PATH=$PATH:$util_dir
- export PATH=$PATH:$util_dir/avr8-gnu-toolchain/bin
- export PATH=$PATH:$util_dir/gcc-arm-none-eabi/bin
}
export_variables
diff --git a/util/chibios-upgrader.sh b/util/chibios-upgrader.sh
index 2174da3cf1..ebc12abe7d 100755
--- a/util/chibios-upgrader.sh
+++ b/util/chibios-upgrader.sh
@@ -38,7 +38,11 @@ find_chibi_files() {
local search_path="$1"
shift
local conditions=( "$@" )
- find -L "$search_path" -not -path '*/lib/chibios*' -and -not -path '*/lib/ugfx*' -and -not -path '*/util/*' -and \( "${conditions[@]}" \) | sort
+ for file in $(find -L "$search_path" -not -path '*/lib/chibios*' -and -not -path '*/lib/ugfx*' -and -not -path '*/util/*' -and \( "${conditions[@]}" \) | sort) ; do
+ if [ -z "$(grep 'include_next' "$file")" ] ; then
+ echo $file
+ fi
+ done
}
revert_chibi_files() {
diff --git a/util/msys2_install.sh b/util/msys2_install.sh
index 1351aa5d73..c223e52fae 100755
--- a/util/msys2_install.sh
+++ b/util/msys2_install.sh
@@ -2,76 +2,18 @@
dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
download_dir=~/qmk_utils
-avrtools=avr8-gnu-toolchain
-armtools=gcc-arm-none-eabi
util_dir=$(dirname "$0")
-echo "Installing dependencies needed for the installation (quazip)"
-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
+echo "Installing dependencies needed for the installation"
+pacman --needed --noconfirm --disable-download-timeout -Sy \
+ base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git unzip \
+ mingw-w64-x86_64-python-pip \
+ mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \
+ mingw-w64-x86_64-arm-none-eabi-binutils mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-arm-none-eabi-newlib \
+ 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
source "$dir/win_shared_install.sh"
-function install_avr {
- rm -f -r "$avrtools"
- wget "https://blog.zakkemble.net/download/avr-gcc-8.3.0-x86-mingw.zip"
- echo "Extracting AVR toolchain..."
- 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 --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
-}
-
-function install_arm {
- 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
-
- pacman --needed --noconfirm --disable-download-timeout -S mingw-w64-x86_64-dfu-util
-}
-
-pushd "$download_dir"
-
-if [ ! -d "$avrtools" ]; then
- echo
- echo "The AVR toolchain is not installed."
- echo "This is needed for building AVR based keyboards."
- install_avr
-else
- while true; do
- echo
- echo "The AVR toolchain is already installed"
- read -p "Do you want to reinstall? (Y/N) " res
- case $res in
- [Yy]* ) install_avr; break;;
- [Nn]* ) break;;
- * ) echo "Invalid answer";;
- esac
- done
-fi
-
-if [ ! -d "$armtools" ]; then
- echo
- echo "The ARM toolchain is not installed."
- echo "This is needed for building ARM based keyboards."
- install_arm
-else
- while true; do
- echo
- echo "The ARM toolchain is already installed"
- read -p "Do you want to reinstall? (Y/N) " res
- case $res in
- [Yy]* ) install_arm; break;;
- [Nn]* ) break;;
- * ) echo "Invalid answer";;
- esac
- done
-fi
-popd
-
pip3 install -r "${util_dir}/../requirements.txt"
cp -f "$dir/activate_msys2.sh" "$download_dir/"
diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh
index 68f6d5c114..195a87208b 100755
--- a/util/travis_compiled_push.sh
+++ b/util/travis_compiled_push.sh
@@ -13,7 +13,7 @@ if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; the
# fix formatting
git checkout master
git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 dos2unix
-git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} '*.c' '*.h' '*.cpp' | grep -z -e '^drivers' -e '^quantum' -e '^tests' -e '^tmk_core' | grep -zv -e 'quantum/template' -e 'tmk_core/protocol/usb_hid' | xargs -0 clang-format-7 -i
+git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} '*.c' '*.h' '*.cpp' | grep -z -e '^drivers' -e '^quantum' -e '^tests' -e '^tmk_core' | grep -zv -e 'quantum/template' -e 'tmk_core/protocol/usb_hid' -e 'platforms/chibios' | xargs -0 clang-format-7 -i
git diff --diff-filter=AM --name-only -n 1 -z ${TRAVIS_COMMIT_RANGE} | xargs -0 git add
git commit -m "format code according to conventions [skip ci]" && git push git@github.com:qmk/qmk_firmware.git master