aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/newbs_getting_started.md21
-rwxr-xr-xutil/freebsd_install.sh26
2 files changed, 41 insertions, 6 deletions
diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md
index 13b25bf86..83df2f305 100644
--- a/docs/newbs_getting_started.md
+++ b/docs/newbs_getting_started.md
@@ -69,10 +69,21 @@ You will need to install Git and Python. It's very likely that you already have
69* Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip` 69* Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip`
70* Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi` 70* Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi`
71 71
72
73Install the global CLI to bootstrap your system: 72Install the global CLI to bootstrap your system:
74 73
75 `python3 -m pip install --user qmk` (on Arch-based distros you can also try the `qmk` package from AUR (**note**: it's maintained by a community member): `yay -S qmk`) 74`python3 -m pip install --user qmk` (on Arch-based distros you can also try the `qmk` package from AUR (**note**: it's maintained by a community member): `yay -S qmk`)
75
76### FreeBSD
77
78You will need to install Git and Python. It's possible that you already have both, but if not, run the following commands to install them:
79
80 pkg install git python3
81
82Make sure that `$HOME/.local/bin` is added to your `$PATH` so that locally install Python packages are available.
83
84Once installed, you can install QMK CLI:
85
86 python3 -m pip install --user qmk
76 87
77## 3. Run QMK Setup :id=set-up-qmk 88## 3. Run QMK Setup :id=set-up-qmk
78 89
@@ -88,6 +99,12 @@ This is due to a [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155)
88Sadly, Ubuntu reitroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562). 99Sadly, Ubuntu reitroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562).
89Luckily, the fix is easy. Run this as your user: `echo "PATH=$HOME/.local/bin:$PATH" >> $HOME/.bashrc && source $HOME/.bashrc` 100Luckily, the fix is easy. Run this as your user: `echo "PATH=$HOME/.local/bin:$PATH" >> $HOME/.bashrc && source $HOME/.bashrc`
90 101
102?>**Note on FreeBSD**:
103It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your
104base system using `pkg`. However the installation will probably fail when run as an unprivileged user.
105To manually install the base dependencies, run `./util/qmk_install.sh` either as `root`, or with `sudo`.
106Once that completes, re-run `qmk setup` to complete the setup and checks.
107
91?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message. 108?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message.
92 109
93## 4. Test Your Build Environment 110## 4. Test Your Build Environment
diff --git a/util/freebsd_install.sh b/util/freebsd_install.sh
index 815759203..09669024c 100755
--- a/util/freebsd_install.sh
+++ b/util/freebsd_install.sh
@@ -1,7 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2util_dir=$(dirname "$0") 2packages=$(cat <<EOF
3pkg update
4pkg install -y \
5 git \ 3 git \
6 wget \ 4 wget \
7 gmake \ 5 gmake \
@@ -13,9 +11,29 @@ pkg install -y \
13 avr-libc \ 11 avr-libc \
14 dfu-programmer \ 12 dfu-programmer \
15 dfu-util \ 13 dfu-util \
14 avrdude \
16 arm-none-eabi-gcc \ 15 arm-none-eabi-gcc \
17 arm-none-eabi-binutils \ 16 arm-none-eabi-binutils \
18 arm-none-eabi-newlib \ 17 arm-none-eabi-newlib \
19 diffutils \ 18 diffutils \
20 python3 19 python3
21pip3 install -r ${util_dir}/../requirements.txt 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 sudp 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