summaryrefslogtreecommitdiffstats
path: root/util/install
diff options
context:
space:
mode:
Diffstat (limited to 'util/install')
-rwxr-xr-xutil/install/debian.sh14
1 files changed, 10 insertions, 4 deletions
diff --git a/util/install/debian.sh b/util/install/debian.sh
index 2a188334b6..3e02919bdd 100755
--- a/util/install/debian.sh
+++ b/util/install/debian.sh
@@ -11,12 +11,18 @@ _qmk_install_prepare() {
_qmk_install() {
echo "Installing dependencies"
- sudo apt-get -yq install \
+ sudo apt-get --quiet --yes install \
build-essential clang-format diffutils gcc git unzip wget zip \
python3-pip binutils-avr gcc-avr avr-libc binutils-arm-none-eabi \
gcc-arm-none-eabi libnewlib-arm-none-eabi avrdude dfu-programmer \
- dfu-util teensy-loader-cli libhidapi-hidraw0 libusb-dev \
- picolibc-riscv64-unknown-elf gcc-riscv64-unknown-elf binutils-riscv64-unknown-elf
+ dfu-util teensy-loader-cli libhidapi-hidraw0 libusb-dev
- python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt
+ # RISC-V toolchains with picolibc support are only available for distributions based on Debian 11+.
+ 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
+ sudo apt-get --quiet --yes install picolibc-riscv64-unknown-elf \
+ gcc-riscv64-unknown-elf \
+ binutils-riscv64-unknown-elf
+ fi
+
+ python3 -m pip install --user -r "$QMK_FIRMWARE_DIR"/requirements.txt
}