diff options
Diffstat (limited to 'util/linux_install.sh')
-rwxr-xr-x | util/linux_install.sh | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/util/linux_install.sh b/util/linux_install.sh index 4731ec0156..c54a806234 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -8,6 +8,8 @@ SLACKWARE_WARNING="You will need the following packages from slackbuilds.org:\n\ SOLUS_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" +util_dir=$(dirname "$0") + if grep ID /etc/os-release | grep -qE "fedora"; then sudo dnf install \ arm-none-eabi-binutils-cs \ @@ -17,6 +19,7 @@ if grep ID /etc/os-release | grep -qE "fedora"; then avr-gcc \ avr-libc \ binutils-avr32-linux-gnu \ + clang \ dfu-util \ dfu-programmer \ diffutils \ @@ -42,6 +45,7 @@ elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then avr-libc \ binutils-arm-none-eabi \ binutils-avr \ + clang-format \ dfu-programmer \ dfu-util \ diffutils \ @@ -57,7 +61,7 @@ elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then sudo pacman -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz - sudo pacman -S \ + sudo pacman -S --needed \ arm-none-eabi-binutils \ arm-none-eabi-gcc \ arm-none-eabi-newlib \ @@ -66,18 +70,17 @@ elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then avr-libc \ avr-gcc \ base-devel \ + clang \ + dfu-programmer \ dfu-util \ diffutils \ gcc \ git \ python \ + python-pip \ unzip \ wget \ zip - git clone https://aur.archlinux.org/dfu-programmer.git /tmp/dfu-programmer - cd /tmp/dfu-programmer || exit 1 - makepkg -sic - rm -rf /tmp/dfu-programmer/ elif grep ID /etc/os-release | grep -q gentoo; then echo "$GENTOO_WARNING" | fmt @@ -94,6 +97,7 @@ elif grep ID /etc/os-release | grep -q gentoo; then dev-embedded/avrdude \ dev-lang/python:3.5 \ net-misc/wget \ + sys-devel/clang \ sys-devel/gcc \ sys-devel/crossdev sudo crossdev -s4 --stable --g =4.9.4 --portage --verbose --target avr @@ -110,6 +114,7 @@ elif grep ID /etc/os-release | grep -q sabayon; then dev-embedded/avrdude \ dev-lang/python \ net-misc/wget \ + sys-devel/clang \ sys-devel/gcc \ sys-devel/crossdev sudo crossdev -s4 --stable --g =4.9.4 --portage --verbose --target avr @@ -124,6 +129,7 @@ elif grep ID /etc/os-release | grep -qE "opensuse|tumbleweed"; then fi sudo zypper install \ avr-libc \ + clang \ $CROSS_AVR_GCC \ $CROSS_ARM_GCC \ cross-avr-binutils \ @@ -178,8 +184,34 @@ elif grep ID /etc/os-release | grep -q solus; then unzip printf "\n$SOLUS_INFO\n" +elif grep ID /etc/os-release | grep -q void; then + # musl Void systems don't have glibc cross compilers avaliable in their repos. + # glibc Void systems do have musl cross compilers though, for some reason. + # So, default to musl, and switch to glibc if it is installed. + CROSS_ARM=cross-arm-linux-musleabi + if xbps-query glibc > /dev/null; then # Check is glibc if installed + CROSS_ARM=cross-arm-linux-gnueabi + fi + + sudo xbps-install \ + avr-binutils \ + avr-gcc \ + avr-libc \ + $CROSS_ARM \ + dfu-programmer \ + dfu-util \ + gcc \ + git \ + make \ + wget \ + unzip \ + zip + else echo "Sorry, we don't recognize your OS. Help us by contributing support!" echo echo "https://docs.qmk.fm/#/contributing" fi + +# Global install tasks +pip3 install --user -r ${util_dir}/../requirements.txt |