aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/newbs_getting_started.md9
-rwxr-xr-xutil/freebsd_install.sh39
-rwxr-xr-xutil/install/arch.sh16
-rwxr-xr-xutil/install/debian.sh22
-rwxr-xr-xutil/install/fedora.sh15
-rwxr-xr-xutil/install/freebsd.sh18
-rwxr-xr-xutil/install/gentoo.sh33
-rwxr-xr-xutil/install/linux_shared.sh13
-rwxr-xr-xutil/install/macos.sh26
-rwxr-xr-xutil/install/msys2.sh36
-rwxr-xr-xutil/install/opensuse.sh31
-rwxr-xr-xutil/install/sabayon.sh15
-rwxr-xr-xutil/install/slackware.sh25
-rwxr-xr-xutil/install/solus.sh19
-rwxr-xr-xutil/install/void.sh15
-rwxr-xr-xutil/linux_install.sh251
-rwxr-xr-xutil/macos_install.sh31
-rwxr-xr-xutil/msys2_install.sh22
-rwxr-xr-xutil/qmk_install.sh93
19 files changed, 360 insertions, 369 deletions
diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md
index dfb2d54fc..eee087e4c 100644
--- a/docs/newbs_getting_started.md
+++ b/docs/newbs_getting_started.md
@@ -60,9 +60,12 @@ After Homebrew is installed run this command:
60 60
61You will need to install Git and Python. It's very likely that you already have both, but if not, one of the following commands should install them: 61You will need to install Git and Python. It's very likely that you already have both, but if not, one of the following commands should install them:
62 62
63* Debian / Ubuntu / Devuan: `sudo apt install git python3 python3-pip` 63* Debian / Ubuntu / Devuan: `sudo apt install -y git python3-pip`
64* Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip` 64* Fedora / Red Hat / CentOS: `sudo yum -y install git python3-pip`
65* Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi` 65* Arch / Manjaro: `sudo pacman --needed --noconfirm -S git python-pip libffi`
66* Void: `sudo xbps-install -y git python3-pip`
67* Solus: `sudo eopkg -y install git python3`
68* Sabayon: `sudo equo install dev-vcs/git dev-python/pip`
66 69
67Install the global CLI to bootstrap your system: 70Install the global CLI to bootstrap your system:
68 71
diff --git a/util/freebsd_install.sh b/util/freebsd_install.sh
deleted file mode 100755
index f5c78b556..000000000
--- a/util/freebsd_install.sh
+++ /dev/null
@@ -1,39 +0,0 @@
1#!/bin/sh
2packages=$(cat <<EOF
3 git \
4 wget \
5 gmake \
6 gcc \
7 zip \
8 unzip \
9 avr-binutils \
10 avr-gcc \
11 avr-libc \
12 dfu-programmer \
13 dfu-util \
14 avrdude \
15 arm-none-eabi-gcc \
16 arm-none-eabi-binutils \
17 arm-none-eabi-newlib \
18 diffutils \
19 python3
20EOF
21)
22util_dir=$(dirname "$0")
23if [ $(id -u) = 0 ]; then
24 pkg update
25 pkg install -y ${packages}
26 echo ""
27 echo "Re-run the setup as your normal user to install the qmk python dependencies"
28 exit 1
29else
30 if command -v sudo > /dev/null 2>&1; then
31 sudo pkg update
32 sudo pkg install -y ${packages}
33 else
34 echo "Make sure you run setup as root first to install base OS dependencies..."
35 echo ""
36 fi
37
38 python3 -m pip install --user -r ${util_dir}/../requirements.txt
39fi
diff --git a/util/install/arch.sh b/util/install/arch.sh
new file mode 100755
index 000000000..7442e2f13
--- /dev/null
+++ b/util/install/arch.sh
@@ -0,0 +1,16 @@
1#!/bin/bash
2
3_qmk_install() {
4 echo "Installing dependencies"
5
6 sudo pacman --needed --noconfirm -S \
7 base-devel clang diffutils gcc git unzip wget zip \
8 python-pip \
9 avr-binutils \
10 arm-none-eabi-binutils arm-none-eabi-gcc arm-none-eabi-newlib \
11 avrdude dfu-programmer dfu-util
12 sudo pacman --needed --noconfirm -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz
13 sudo pacman --needed --noconfirm -S avr-libc # Must be installed after the above, or it will bring in the latest avr-gcc instead
14
15 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
16}
diff --git a/util/install/debian.sh b/util/install/debian.sh
new file mode 100755
index 000000000..e7180c651
--- /dev/null
+++ b/util/install/debian.sh
@@ -0,0 +1,22 @@
1#!/bin/bash
2
3DEBIAN_FRONTEND=noninteractive
4DEBCONF_NONINTERACTIVE_SEEN=true
5export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
6
7_qmk_install_prepare() {
8 sudo apt-get update
9}
10
11_qmk_install() {
12 echo "Installing dependencies"
13
14 sudo apt-get -yq install \
15 build-essential clang-format diffutils gcc git unzip wget zip \
16 python3-pip \
17 binutils-avr gcc-avr avr-libc \
18 binutils-arm-none-eabi gcc-arm-none-eabi libnewlib-arm-none-eabi \
19 avrdude dfu-programmer dfu-util teensy-loader-cli
20
21 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
22}
diff --git a/util/install/fedora.sh b/util/install/fedora.sh
new file mode 100755
index 000000000..250cda662
--- /dev/null
+++ b/util/install/fedora.sh
@@ -0,0 +1,15 @@
1#!/bin/bash
2
3_qmk_install() {
4 echo "Installing dependencies"
5
6 # TODO: Check whether devel/headers packages are really needed
7 sudo dnf -y install \
8 clang diffutils git gcc glibc-headers kernel-devel kernel-headers make unzip wget zip \
9 python3 \
10 avr-binutils avr-gcc avr-libc \
11 arm-none-eabi-binutils-cs arm-none-eabi-gcc-cs arm-none-eabi-newlib \
12 avrdude dfu-programmer dfu-util
13
14 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
15}
diff --git a/util/install/freebsd.sh b/util/install/freebsd.sh
new file mode 100755
index 000000000..353c52d64
--- /dev/null
+++ b/util/install/freebsd.sh
@@ -0,0 +1,18 @@
1#!/bin/bash
2
3_qmk_install_prepare() {
4 sudo pkg update
5}
6
7_qmk_install() {
8 echo "Installing dependencies"
9
10 sudo pkg install -y \
11 git wget gmake gcc zip unzip diffutils \
12 python3 \
13 avr-binutils avr-gcc avr-libc \
14 arm-none-eabi-binutils arm-none-eabi-gcc arm-none-eabi-newlib \
15 avrdude dfu-programmer dfu-util
16
17 sudo python3 -m pip install -r $QMK_FIRMWARE_DIR/requirements.txt
18}
diff --git a/util/install/gentoo.sh b/util/install/gentoo.sh
new file mode 100755
index 000000000..d4284e9a9
--- /dev/null
+++ b/util/install/gentoo.sh
@@ -0,0 +1,33 @@
1#!/bin/bash
2
3_qmk_install_prepare() {
4 echo "This script will make a USE change in order to ensure that that QMK works on your system."
5 echo "All changes will be sent to the file /etc/portage/package.use/qmkfirmware -- please review it, and read Portage's output carefully before installing any packages on your system."
6 echo "You will also need to ensure that your kernel is compiled with support for the microcontroller that you are using (e.g. enable Arduino for the Pro Micro). Further information can be found on the Gentoo wiki."
7
8 read -p "Proceed? [y/N] " res
9 case $res in
10 [Yy]*)
11 return 0;;
12 *)
13 return 1;;
14 esac
15}
16
17_qmk_install() {
18 echo "Installing dependencies"
19
20 sudo touch /etc/portage/package.use/qmkfirmware
21 # tee is used here since sudo doesn't apply to >>
22 echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware >/dev/null
23 sudo emerge -auN sys-devel/gcc
24 sudo emerge -au --noreplace \
25 app-arch/unzip app-arch/zip net-misc/wget sys-devel/clang sys-devel/crossdev \
26 \>=dev-lang/python-3.6 \
27 dev-embedded/avrdude dev-embedded/dfu-programmer app-mobilephone/dfu-util
28
29 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr
30 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi
31
32 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
33}
diff --git a/util/install/linux_shared.sh b/util/install/linux_shared.sh
new file mode 100755
index 000000000..cb81e8611
--- /dev/null
+++ b/util/install/linux_shared.sh
@@ -0,0 +1,13 @@
1#!/bin/bash
2
3# For those distros that do not package bootloadHID
4_qmk_install_bootloadhid() {
5 if ! command -v bootloadHID > /dev/null; then
6 wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp
7 pushd /tmp/bootloadHID.2012-12-08/commandline/ > /dev/null
8 if make; then
9 sudo cp bootloadHID /usr/local/bin
10 fi
11 popd > /dev/null
12 fi
13}
diff --git a/util/install/macos.sh b/util/install/macos.sh
new file mode 100755
index 000000000..93fda9121
--- /dev/null
+++ b/util/install/macos.sh
@@ -0,0 +1,26 @@
1#!/bin/bash
2
3_qmk_install_prepare() {
4 echo "Checking Homebrew installation"
5
6 if ! brew --version >/dev/null 2>&1; then
7 echo "Error! Homebrew is broken or not installed."
8 echo "Please run \`brew doctor\` or follow the installation instructions at https://brew.sh/, then re-run this script."
9 return 1
10 fi
11
12 brew update && brew upgrade
13}
14
15_qmk_install() {
16 echo "Installing dependencies"
17
18 # All macOS dependencies are managed in the Homebrew package:
19 # https://github.com/qmk/homebrew-qmk
20 brew install qmk/qmk/qmk
21
22 brew link --force avr-gcc@8
23 brew link --force arm-gcc-bin@8
24
25 python3 -m pip install -r $QMK_FIRMWARE_DIR/requirements.txt
26}
diff --git a/util/install/msys2.sh b/util/install/msys2.sh
new file mode 100755
index 000000000..c8598a60f
--- /dev/null
+++ b/util/install/msys2.sh
@@ -0,0 +1,36 @@
1#!/bin/bash
2
3_qmk_install_prepare() {
4 pacman -Syu
5}
6
7_qmk_install() {
8 echo "Installing dependencies"
9
10 pacman --needed --noconfirm --disable-download-timeout -S pactoys-git
11 pacboy sync --needed --noconfirm --disable-download-timeout \
12 base-devel: toolchain:x clang:x git: unzip: \
13 python3-pip:x \
14 avr-binutils:x avr-gcc:x avr-libc:x \
15 arm-none-eabi-binutils:x arm-none-eabi-gcc:x arm-none-eabi-newlib:x \
16 avrdude:x bootloadhid:x dfu-programmer:x dfu-util:x teensy-loader-cli:x
17
18 _qmk_install_drivers
19
20 python3 -m pip install -r "$QMK_FIRMWARE_DIR/requirements.txt"
21}
22
23_qmk_install_drivers() {
24 echo "Installing drivers"
25
26 tmpdir=$(mktemp -d)
27 cp "$QMK_FIRMWARE_UTIL_DIR/drivers.txt" $tmpdir
28 pushd $tmpdir > /dev/null
29
30 wget "https://github.com/qmk/qmk_driver_installer/releases/download/v1.01/qmk_driver_installer.exe"
31
32 cmd.exe //c "qmk_driver_installer.exe --all --force drivers.txt"
33
34 popd > /dev/null
35 rm -r $tmpdir
36}
diff --git a/util/install/opensuse.sh b/util/install/opensuse.sh
new file mode 100755
index 000000000..47b44ae36
--- /dev/null
+++ b/util/install/opensuse.sh
@@ -0,0 +1,31 @@
1#!/bin/bash
2
3_qmk_install_prepare() {
4 case $(grep ID /etc/os-release) in
5 *15.1*)
6 REPO_RELEASE=Leap_15.1;;
7 *15.2*)
8 REPO_RELEASE=Leap_15.2;;
9 *)
10 #REPO_RELEASE=Tumbleweed;;
11 echo "ERROR: Tumbleweed is currently not supported."
12 exit 1
13 esac
14
15 sudo zypper addrepo https://download.opensuse.org/repositories/devel:gcc/openSUSE_$REPO_RELEASE/devel:gcc.repo
16 sudo zypper addrepo https://download.opensuse.org/repositories/hardware/openSUSE_$REPO_RELEASE/hardware.repo
17 sudo zypper --gpg-auto-import-keys refresh
18}
19
20_qmk_install() {
21 echo "Installing dependencies"
22
23 sudo zypper install -y \
24 make clang gcc unzip wget zip \
25 python3-pip \
26 cross-avr-binutils cross-avr-gcc8 avr-libc \
27 cross-arm-binutils cross-arm-none-gcc8 cross-arm-none-newlib-devel \
28 avrdude dfu-programmer dfu-util
29
30 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
31}
diff --git a/util/install/sabayon.sh b/util/install/sabayon.sh
new file mode 100755
index 000000000..fd4f4d8df
--- /dev/null
+++ b/util/install/sabayon.sh
@@ -0,0 +1,15 @@
1#!/bin/bash
2
3_qmk_install() {
4 echo "Installing dependencies"
5
6 sudo equo install \
7 app-arch/unzip app-arch/zip net-misc/wget dev-vcs/git sys-devel/clang sys-devel/gcc sys-devel/crossdev \
8 dev-python/pip \
9 dev-embedded/avrdude dev-embedded/dfu-programmer app-mobilephone/dfu-util
10
11 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr
12 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi
13
14 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
15}
diff --git a/util/install/slackware.sh b/util/install/slackware.sh
new file mode 100755
index 000000000..d73303159
--- /dev/null
+++ b/util/install/slackware.sh
@@ -0,0 +1,25 @@
1#!/bin/bash
2
3_qmk_install_prepare() {
4 echo "Before you continue, please ensure that your user is added to sudoers and that sboinstall is configured."
5 read -p "Proceed? [y/N] " res
6
7 case $res in
8 [Yy]*)
9 ;;
10 *)
11 return 1;;
12 esac
13}
14
15_qmk_install() {
16 echo "Installing dependencies"
17
18 sudo sboinstall \
19 avr-binutils avr-gcc avr-libc \
20 arm-binutils arm-gcc newlib \
21 python3 \
22 avrdude dfu-programmer dfu-util teensy_loader_cli
23
24 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
25}
diff --git a/util/install/solus.sh b/util/install/solus.sh
new file mode 100755
index 000000000..5633f7039
--- /dev/null
+++ b/util/install/solus.sh
@@ -0,0 +1,19 @@
1#!/bin/bash
2
3_qmk_install_prepare() {
4 sudo eopkg -y update-repo
5 sudo eopkg -y upgrade
6}
7
8_qmk_install() {
9 echo "Installing dependencies"
10
11 sudo eopkg -y install \
12 -c system.devel git wget zip unzip \
13 python3 \
14 avr-binutils avr-gcc avr-libc \
15 arm-none-eabi-binutils arm-none-eabi-gcc arm-none-eabi-newlib \
16 avrdude dfu-programmer dfu-util
17
18 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
19}
diff --git a/util/install/void.sh b/util/install/void.sh
new file mode 100755
index 000000000..9ec7019e5
--- /dev/null
+++ b/util/install/void.sh
@@ -0,0 +1,15 @@
1#!/bin/bash
2
3_qmk_install() {
4 echo "Installing dependencies"
5
6 sudo xbps-install \
7 gcc git make wget unzip zip \
8 python3-pip \
9 avr-binutils avr-gcc avr-libc \
10 cross-arm-none-eabi-binutils cross-arm-none-eabi-gcc cross-arm-none-eabi-newlib \
11 avrdude dfu-programmer dfu-util teensy_loader_cli \
12 libusb-compat-devel
13
14 python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
15}
diff --git a/util/linux_install.sh b/util/linux_install.sh
deleted file mode 100755
index fb8968386..000000000
--- a/util/linux_install.sh
+++ /dev/null
@@ -1,251 +0,0 @@
1#!/bin/sh
2
3# Note: This file uses tabs to indent. Please don't mix tabs and spaces.
4
5GENTOO_WARNING="This script will make a USE change in order to ensure that that QMK works on your system. All changes will be sent to the the file /etc/portage/package.use/qmkfirmware -- please review it, and read Portage's output carefully before installing any packages on your system. You will also need to ensure that your kernel is compiled with support for the keyboard chip that you are using (e.g. enable Arduino for the Pro Micro). Further information can be found on the Gentoo wiki."
6
7SLACKWARE_WARNING="You will need the following packages from slackbuilds.org:\n\tarm-binutils\n\tarm-gcc\n\tavr-binutils\n\tavr-gcc\n\tavr-libc\n\tavrdude\n\tdfu-programmer\n\tdfu-util\n\tnewlib\nThese packages will be installed with sudo and sboinstall, so ensure that your user is added to sudoers and that sboinstall is configured."
8
9SOLUS_INFO="Your tools are now installed. To start using them, open new terminal or source these scripts:\n\t/usr/share/defaults/etc/profile.d/50-arm-toolchain-path.sh\n\t/usr/share/defaults/etc/profile.d/50-avr-toolchain-path.sh"
10
11util_dir=$(dirname "$0")
12
13# For those distros that do not package bootloadHID
14install_bootloadhid() {
15 if ! command -v bootloadHID >/dev/null; then
16 wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp
17 cd /tmp/bootloadHID.2012-12-08/commandline/
18 if make; then
19 sudo cp bootloadHID /usr/local/bin
20 fi
21 cd -
22 fi
23}
24
25if grep ID /etc/os-release | grep -qE "fedora"; then
26 sudo dnf install \
27 arm-none-eabi-binutils-cs \
28 arm-none-eabi-gcc-cs \
29 arm-none-eabi-newlib \
30 avr-binutils \
31 avr-gcc \
32 avr-libc \
33 binutils-avr32-linux-gnu \
34 clang \
35 avrdude \
36 dfu-util \
37 dfu-programmer \
38 diffutils \
39 git \
40 gcc \
41 glibc-headers \
42 kernel-devel \
43 kernel-headers \
44 libusb-devel \
45 make \
46 perl \
47 python3 \
48 unzip \
49 wget \
50 zip
51
52elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then
53 DEBIAN_FRONTEND=noninteractive
54 DEBCONF_NONINTERACTIVE_SEEN=true
55 export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN
56 sudo apt-get update
57 sudo apt-get -yq install \
58 build-essential \
59 avr-libc \
60 binutils-arm-none-eabi \
61 binutils-avr \
62 clang-format \
63 dfu-programmer \
64 dfu-util \
65 diffutils \
66 gcc \
67 gcc-arm-none-eabi \
68 gcc-avr \
69 git \
70 libnewlib-arm-none-eabi \
71 avrdude \
72 libusb-dev \
73 python3 \
74 python3-pip \
75 unzip \
76 wget \
77 zip
78
79elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then
80 sudo pacman --needed -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz
81 sudo pacman -S --needed \
82 arm-none-eabi-binutils \
83 arm-none-eabi-gcc \
84 arm-none-eabi-newlib \
85 avrdude \
86 avr-binutils \
87 avr-libc \
88 base-devel \
89 clang \
90 dfu-programmer \
91 dfu-util \
92 diffutils \
93 gcc \
94 git \
95 libusb-compat \
96 python \
97 python-pip \
98 unzip \
99 wget \
100 zip
101
102elif grep ID /etc/os-release | grep -q gentoo; then
103 echo "$GENTOO_WARNING" | fmt
104 printf "\nProceed (y/N)? "
105 read -r answer
106 if echo "$answer" | grep -iq "^y"; then
107 sudo touch /etc/portage/package.use/qmkfirmware
108 # tee is used here since sudo doesn't apply to >>
109 echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware >/dev/null
110 sudo emerge -auN sys-devel/gcc
111 sudo emerge -au --noreplace \
112 app-arch/unzip \
113 app-arch/zip \
114 app-mobilephone/dfu-util \
115 dev-embedded/dfu-programmer \
116 dev-embedded/avrdude \
117 net-misc/wget \
118 sys-devel/clang \
119 sys-devel/crossdev
120 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr
121 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi
122 echo "Done!"
123 else
124 echo "Quitting..."
125 fi
126
127elif grep ID /etc/os-release | grep -q sabayon; then
128 sudo equo install \
129 app-arch/unzip \
130 app-arch/zip \
131 app-mobilephone/dfu-util \
132 dev-embedded/dfu-programmer \
133 dev-embedded/avrdude \
134 dev-lang/python \
135 net-misc/wget \
136 sys-devel/clang \
137 sys-devel/gcc \
138 sys-devel/crossdev
139 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr
140 sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi
141 echo "Done!"
142
143elif grep ID /etc/os-release | grep -qE "opensuse|tumbleweed"; then
144 CROSS_AVR_GCC=cross-avr-gcc8
145 CROSS_ARM_GCC=cross-arm-none-gcc8
146 if grep ID /etc/os-release | grep -q "15."; then
147 CROSS_AVR_GCC=cross-avr-gcc7
148 CROSS_ARM_GCC=cross-arm-none-gcc7
149 fi
150 sudo zypper install \
151 avr-libc \
152 clang \
153 $CROSS_AVR_GCC \
154 $CROSS_ARM_GCC \
155 cross-avr-binutils \
156 cross-arm-none-newlib-devel \
157 cross-arm-binutils cross-arm-none-newlib-devel \
158 avrdude \
159 dfu-util \
160 dfu-programmer \
161 gcc \
162 libusb-devel \
163 python3 \
164 unzip \
165 wget \
166 zip
167
168elif grep ID /etc/os-release | grep -q slackware; then
169 printf "$SLACKWARE_WARNING\n"
170 printf "\nProceed (y/N)? "
171 read -r answer
172 if echo "$answer" | grep -iq "^y" ;then
173 sudo sboinstall \
174 avr-binutils \
175 avr-gcc \
176 avr-libc \
177 avrdude \
178 dfu-programmer \
179 dfu-util \
180 arm-binutils \
181 arm-gcc \
182 newlib \
183 python3
184 echo "Done!"
185 else
186 echo "Quitting..."
187 fi
188
189elif grep ID /etc/os-release | grep -q solus; then
190 sudo eopkg ur
191 sudo eopkg it \
192 -c system.devel \
193 arm-none-eabi-gcc \
194 arm-none-eabi-binutils \
195 arm-none-eabi-newlib \
196 avr-libc \
197 avr-binutils \
198 avr-gcc \
199 avrdude \
200 dfu-util \
201 dfu-programmer \
202 libusb-devel \
203 python3 \
204 git \
205 wget \
206 zip \
207 unzip
208 printf "\n$SOLUS_INFO\n"
209
210elif grep ID /etc/os-release | grep -q void; then
211 sudo xbps-install \
212 avr-binutils \
213 avr-gcc \
214 avr-libc \
215 cross-arm-none-eabi-binutils \
216 cross-arm-none-eabi-gcc \
217 cross-arm-none-eabi-newlib \
218 avrdude \
219 dfu-programmer \
220 dfu-util \
221 gcc \
222 git \
223 libusb-compat-devel \
224 make \
225 wget \
226 unzip \
227 zip
228
229else
230 echo "Sorry, we don't recognize your OS. Help us by contributing support!"
231 echo
232 echo "https://docs.qmk.fm/#/contributing"
233fi
234
235# Global install tasks
236install_bootloadhid
237pip3 install --user -r ${util_dir}/../requirements.txt
238
239if uname -a | grep -qi microsoft; then
240 echo "********************************************************************************"
241 echo "* Detected Windows Subsystem for Linux. *"
242 echo "* Currently, WSL has no access to USB devices and so flashing from within the *"
243 echo "* WSL terminal will not work. *"
244 echo "* *"
245 echo "* Please install the QMK Toolbox instead: *"
246 echo "* https://github.com/qmk/qmk_toolbox/releases *"
247 echo "* Then, map your WSL filesystem as a network drive: *"
248 echo "* \\\\\\\\wsl$\\<distro> *"
249 echo "********************************************************************************"
250 echo
251fi
diff --git a/util/macos_install.sh b/util/macos_install.sh
deleted file mode 100755
index 9c19aeac2..000000000
--- a/util/macos_install.sh
+++ /dev/null
@@ -1,31 +0,0 @@
1#!/bin/bash
2
3util_dir=$(dirname "$0")
4
5if ! brew --version >/dev/null 2>&1; then
6 echo "Error! Homebrew not installed or broken!"
7 echo -n "Would you like to install homebrew now? [y/n] "
8 while read -r ANSWER; do
9 case $ANSWER in
10 y | Y)
11 /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
12 break
13 ;;
14 n | N)
15 exit 1
16 ;;
17 *)
18 echo -n "Would you like to install homebrew now? [y/n] "
19 ;;
20 esac
21 done
22fi
23
24# All macOS dependencies are managed in the homebrew package:
25# https://github.com/qmk/homebrew-qmk
26brew update
27brew install qmk/qmk/qmk
28brew link --force avr-gcc@8
29brew link --force arm-gcc-bin@8
30
31pip3 install -r "${util_dir}/../requirements.txt"
diff --git a/util/msys2_install.sh b/util/msys2_install.sh
deleted file mode 100755
index 5abe4a597..000000000
--- a/util/msys2_install.sh
+++ /dev/null
@@ -1,22 +0,0 @@
1#!/bin/bash
2
3util_dir=$(dirname "$0")
4
5echo "Installing dependencies needed for the installation"
6pacman --needed --noconfirm --disable-download-timeout -Sy \
7 base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-clang git unzip \
8 mingw-w64-x86_64-python-pip \
9 mingw-w64-x86_64-avr-binutils mingw-w64-x86_64-avr-gcc mingw-w64-x86_64-avr-libc \
10 mingw-w64-x86_64-arm-none-eabi-binutils mingw-w64-x86_64-arm-none-eabi-gcc mingw-w64-x86_64-arm-none-eabi-newlib \
11 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
12
13echo "Installing drivers"
14tmpdir=$(mktemp -d)
15cp "${util_dir}/drivers.txt" $tmpdir
16pushd $tmpdir > /dev/null
17wget "https://github.com/qmk/qmk_driver_installer/releases/download/v1.01/qmk_driver_installer.exe"
18cmd.exe //c "qmk_driver_installer.exe --all --force drivers.txt"
19popd > /dev/null
20rm -r $tmpdir
21
22pip3 install -r "${util_dir}/../requirements.txt"
diff --git a/util/qmk_install.sh b/util/qmk_install.sh
index 714ee9144..5076e980a 100755
--- a/util/qmk_install.sh
+++ b/util/qmk_install.sh
@@ -1,27 +1,74 @@
1#!/bin/sh 1#!/bin/bash
2# Pick the correct install script based on the current OS
3 2
4util_dir=$(dirname "$0") 3QMK_FIRMWARE_DIR=$(cd -P -- "$(dirname -- "$0")/.." && pwd -P)
4QMK_FIRMWARE_UTIL_DIR=$QMK_FIRMWARE_DIR/util
5 5
6case $(uname -a) in 6case $(uname -a) in
7 *Darwin*) 7 *Darwin*)
8 exec "${util_dir}/macos_install.sh" 8 . "$QMK_FIRMWARE_UTIL_DIR/install/macos.sh";;
9 ;; 9 *FreeBSD*)
10 *FreeBSD*) 10 . "$QMK_FIRMWARE_UTIL_DIR/install/freebsd.sh";;
11 exec "${util_dir}/freebsd_install.sh" 11 *MINGW64_NT*)
12 ;; 12 . "$QMK_FIRMWARE_UTIL_DIR/install/msys2.sh";;
13 *Linux*) 13 *MSYS_NT*|*MINGW32_NT*)
14 exec "${util_dir}/linux_install.sh" 14 echo "Please open a MinGW64 terminal window and re-run this script."
15 ;; 15 exit 1;;
16 MINGW64_NT*) 16 *Linux*)
17 exec "${util_dir}/msys2_install.sh" 17 . "$QMK_FIRMWARE_UTIL_DIR/install/linux_shared.sh"
18 ;; 18
19 MSYS_NT*|MINGW32_NT*) 19 case $(grep ID /etc/os-release) in
20 echo "Please open a MinGW 64-bit terminal window and re-run this script." 20 *arch*|*manjaro*)
21 exit 1 21 . "$QMK_FIRMWARE_UTIL_DIR/install/arch.sh";;
22 ;; 22 *debian*|*ubuntu*)
23 *) 23 . "$QMK_FIRMWARE_UTIL_DIR/install/debian.sh";;
24 echo "Environment not supported. Please see https://docs.qmk.fm for details on how to configure the QMK Firmware build tools manually." 24 *fedora*)
25 exit 1 25 . "$QMK_FIRMWARE_UTIL_DIR/install/fedora.sh";;
26 ;; 26 *gentoo*)
27 . "$QMK_FIRMWARE_UTIL_DIR/install/gentoo.sh";;
28 *opensuse*|*tumbleweed*)
29 . "$QMK_FIRMWARE_UTIL_DIR/install/opensuse.sh";;
30 *sabayon*)
31 . "$QMK_FIRMWARE_UTIL_DIR/install/sabayon.sh";;
32 *slackware*)
33 . "$QMK_FIRMWARE_UTIL_DIR/install/slackware.sh";;
34 *solus*)
35 . "$QMK_FIRMWARE_UTIL_DIR/install/solus.sh";;
36 *void*)
37 . "$QMK_FIRMWARE_UTIL_DIR/install/void.sh";;
38 *)
39 echo "Sorry, we don't recognize your distribution. Help us by contributing support!"
40 echo
41 echo "https://docs.qmk.fm/#/contributing"
42 exit 1;;
43 esac
44
45 if uname -a | grep -qi microsoft; then
46 echo "********************************************************************************"
47 echo "* Detected Windows Subsystem for Linux. *"
48 echo "* Currently, WSL has no access to USB devices and so flashing from within the *"
49 echo "* WSL terminal will not work. *"
50 echo "* *"
51 echo "* Please install the QMK Toolbox instead: *"
52 echo "* https://github.com/qmk/qmk_toolbox/releases *"
53 echo "* Then, map your WSL filesystem as a network drive: *"
54 echo "* \\\\\\\\wsl$\\<distro> *"
55 echo "********************************************************************************"
56 echo
57 fi
58 ;;
59 *)
60 echo "Sorry, we don't recognize your environment. Help us by contributing support!"
61 echo
62 echo "https://docs.qmk.fm/#/contributing"
63 exit 1;;
27esac 64esac
65
66if type _qmk_install_prepare &>/dev/null; then
67 _qmk_install_prepare || exit 1
68fi
69
70_qmk_install
71
72if type _qmk_install_bootloadhid &>/dev/null; then
73 _qmk_install_bootloadhid
74fi