qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

gentoo.sh (1527B)


      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\ncross-arm-none-eabi/newlib nano" | 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 llvm-core/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 }