diff options
Diffstat (limited to 'util/install')
-rwxr-xr-x | util/install/arch.sh | 17 | ||||
-rwxr-xr-x | util/install/debian.sh | 28 | ||||
-rwxr-xr-x | util/install/fedora.sh | 14 | ||||
-rwxr-xr-x | util/install/freebsd.sh | 18 | ||||
-rwxr-xr-x | util/install/gentoo.sh | 34 | ||||
-rwxr-xr-x | util/install/linux_shared.sh | 13 | ||||
-rwxr-xr-x | util/install/macos.sh | 26 | ||||
-rwxr-xr-x | util/install/msys2.sh | 35 | ||||
-rwxr-xr-x | util/install/slackware.sh | 25 | ||||
-rwxr-xr-x | util/install/solus.sh | 19 | ||||
-rwxr-xr-x | util/install/void.sh | 15 |
11 files changed, 244 insertions, 0 deletions
diff --git a/util/install/arch.sh b/util/install/arch.sh new file mode 100755 index 000000000..33c39212d --- /dev/null +++ b/util/install/arch.sh | |||
@@ -0,0 +1,17 @@ | |||
1 | #!/usr/bin/env 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 python-pip \ | ||
8 | avr-binutils arm-none-eabi-binutils arm-none-eabi-gcc \ | ||
9 | arm-none-eabi-newlib avrdude dfu-programmer dfu-util \ | ||
10 | riscv64-elf-binutils riscv64-elf-gcc riscv64-elf-newlib | ||
11 | sudo pacman --needed --noconfirm -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz | ||
12 | sudo pacman --needed --noconfirm -S avr-libc # Must be installed after the above, or it will bring in the latest avr-gcc instead | ||
13 | |||
14 | sudo pacman --needed --noconfirm -S hidapi # This will fail if the community repo isn't enabled | ||
15 | |||
16 | python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt | ||
17 | } | ||
diff --git a/util/install/debian.sh b/util/install/debian.sh new file mode 100755 index 000000000..3e02919bd --- /dev/null +++ b/util/install/debian.sh | |||
@@ -0,0 +1,28 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | DEBIAN_FRONTEND=noninteractive | ||
4 | DEBCONF_NONINTERACTIVE_SEEN=true | ||
5 | export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN | ||
6 | |||
7 | _qmk_install_prepare() { | ||
8 | sudo apt-get update $SKIP_PROMPT | ||
9 | } | ||
10 | |||
11 | _qmk_install() { | ||
12 | echo "Installing dependencies" | ||
13 | |||
14 | sudo apt-get --quiet --yes install \ | ||
15 | build-essential clang-format diffutils gcc git unzip wget zip \ | ||
16 | python3-pip binutils-avr gcc-avr avr-libc binutils-arm-none-eabi \ | ||
17 | gcc-arm-none-eabi libnewlib-arm-none-eabi avrdude dfu-programmer \ | ||
18 | dfu-util teensy-loader-cli libhidapi-hidraw0 libusb-dev | ||
19 | |||
20 | # RISC-V toolchains with picolibc support are only available for distributions based on Debian 11+. | ||
21 | if sudo apt-get install --simulate --quiet --yes picolibc-riscv64-unknown-elf gcc-riscv64-unknown-elf binutils-riscv64-unknown-elf > /dev/null 2>&1; then | ||
22 | sudo apt-get --quiet --yes install picolibc-riscv64-unknown-elf \ | ||
23 | gcc-riscv64-unknown-elf \ | ||
24 | binutils-riscv64-unknown-elf | ||
25 | fi | ||
26 | |||
27 | python3 -m pip install --user -r "$QMK_FIRMWARE_DIR"/requirements.txt | ||
28 | } | ||
diff --git a/util/install/fedora.sh b/util/install/fedora.sh new file mode 100755 index 000000000..e123447d3 --- /dev/null +++ b/util/install/fedora.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | _qmk_install() { | ||
4 | echo "Installing dependencies" | ||
5 | |||
6 | # TODO: Check whether devel/headers packages are really needed | ||
7 | sudo dnf $SKIP_PROMPT install \ | ||
8 | clang diffutils git gcc glibc-headers kernel-devel kernel-headers \ | ||
9 | make unzip wget zip python3 avr-binutils avr-gcc avr-libc \ | ||
10 | arm-none-eabi-binutils-cs arm-none-eabi-gcc-cs arm-none-eabi-newlib \ | ||
11 | avrdude dfu-programmer dfu-util hidapi | ||
12 | |||
13 | python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt | ||
14 | } | ||
diff --git a/util/install/freebsd.sh b/util/install/freebsd.sh new file mode 100755 index 000000000..595911969 --- /dev/null +++ b/util/install/freebsd.sh | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | _qmk_install_prepare() { | ||
4 | sudo pkg update $SKIP_PROMPT | ||
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..b031fc762 --- /dev/null +++ b/util/install/gentoo.sh | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/usr/bin/env 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 \ | ||
26 | sys-devel/crossdev \>=dev-lang/python-3.7 dev-embedded/avrdude \ | ||
27 | dev-embedded/dfu-programmer app-mobilephone/dfu-util sys-apps/hwloc \ | ||
28 | dev-libs/hidapi | ||
29 | |||
30 | sudo crossdev -s4 --stable --g \<9 --portage --verbose --target avr | ||
31 | sudo crossdev -s4 --stable --g \<9 --portage --verbose --target arm-none-eabi | ||
32 | |||
33 | python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt | ||
34 | } | ||
diff --git a/util/install/linux_shared.sh b/util/install/linux_shared.sh new file mode 100755 index 000000000..e060f425f --- /dev/null +++ b/util/install/linux_shared.sh | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/usr/bin/env 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..870b4bec9 --- /dev/null +++ b/util/install/macos.sh | |||
@@ -0,0 +1,26 @@ | |||
1 | #!/usr/bin/env 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 --formulae --ignore-pinned | ||
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..203f8eff0 --- /dev/null +++ b/util/install/msys2.sh | |||
@@ -0,0 +1,35 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | _qmk_install_prepare() { | ||
4 | pacman -Syu $MSYS2_CONFIRM | ||
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: python3-pip:x \ | ||
13 | avr-binutils:x avr-gcc:x avr-libc:x arm-none-eabi-binutils:x \ | ||
14 | arm-none-eabi-gcc:x arm-none-eabi-newlib:x avrdude:x bootloadhid:x \ | ||
15 | dfu-programmer:x dfu-util:x teensy-loader-cli:x hidapi:x | ||
16 | |||
17 | _qmk_install_drivers | ||
18 | |||
19 | python3 -m pip install -r "$QMK_FIRMWARE_DIR/requirements.txt" | ||
20 | } | ||
21 | |||
22 | _qmk_install_drivers() { | ||
23 | echo "Installing drivers" | ||
24 | |||
25 | tmpdir=$(mktemp -d) | ||
26 | cp "$QMK_FIRMWARE_UTIL_DIR/drivers.txt" $tmpdir | ||
27 | pushd $tmpdir > /dev/null | ||
28 | |||
29 | wget "https://github.com/qmk/qmk_driver_installer/releases/download/v1.01/qmk_driver_installer.exe" | ||
30 | |||
31 | cmd.exe //c "qmk_driver_installer.exe --all --force drivers.txt" | ||
32 | |||
33 | popd > /dev/null | ||
34 | rm -r $tmpdir | ||
35 | } | ||
diff --git a/util/install/slackware.sh b/util/install/slackware.sh new file mode 100755 index 000000000..df4d073e7 --- /dev/null +++ b/util/install/slackware.sh | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/usr/bin/env 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..fad0605cf --- /dev/null +++ b/util/install/solus.sh | |||
@@ -0,0 +1,19 @@ | |||
1 | #!/usr/bin/env 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..6aeb8e00a --- /dev/null +++ b/util/install/void.sh | |||
@@ -0,0 +1,15 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | _qmk_install() { | ||
4 | echo "Installing dependencies" | ||
5 | |||
6 | sudo xbps-install $SKIP_PROMPT \ | ||
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 | } | ||