3.9 KiB
Building the OS
The Pi-KVM OS is based on Arch Linux ARM and contains all the required packages and configs for it to work. To build the OS you will need any Linux machine with a recent version of Docker (>= 1:19) with privileged mode enabled. (used for fdisk and some other commands, have a look through our Makefiles if you don't trust us :) )
-
When starting with a clean OS (Like Ubuntu 18) you need to install and configure docker (after adding your user to the docker group you must log out and log back in), as well as git and make.
[user@localhost ~]$ sudo apt-get install git make curl binutils -y [user@localhost ~]$ curl -fsSL https://get.docker.com -o get-docker.sh [user@localhost ~]$ sudo sh get-docker.sh [user@localhost ~]$ sudo usermod -aG docker $USER
Re-login to apply the changes.
-
Git checkout the build toolchain:
[user@localhost ~]$ git clone https://github.com/pikvm/os [user@localhost ~]$ cd os
-
Determine the target hardware configuration (platform):
- Choose the board:
BOARD=rpi4
for Raspberry Pi 4 orBOARD=zerow
,BOARD=rpi2
,BOARD=rpi3
for other options. - Choose the platform:
PLATFORM=v2-hdmi
for RPi4 or ZeroW with HDMI-CSI bridge.PLATFORM=v0-hdmi
for RPi 2 or 3 with HDMI-CSI bridge and Arduino HID.PLATFORM=v2-hdmiusb
for RPi4 with HDMI-USB dongle.PLATFORM=v0-hdmiusb
for RPi 2 or 3 with HDMI-USB dongle and Arduino HID.- Other options are for legacy or specialized Pi-KVM boards (WIP).
-
Create the config file
config.mk
for the target system. You must specify the path to the SD card on your local computer (this will be used to format and install the system) and the version of your Raspberry Pi and platform. You can change other parameters as you wish. Please note: if your password contains the # character, you must escape it using a backslash likeROOT_PASSWD = pass\#word
.[user@localhost os]$ cat config.mk # rpi3 for Raspberry Pi 3; rpi2 for the version 2, zerow for ZeroW BOARD = rpi4 # Hardware configuration PLATFORM = v2-hdmi # Target hostname HOSTNAME = pikvm # ru_RU, etc. UTF-8 only LOCALE = en_US # See /usr/share/zoneinfo TIMEZONE = Europe/Moscow # For SSH root user ROOT_PASSWD = root # Web UI credentials: user=admin, password=<this> WEBUI_ADMIN_PASSWD = admin # IPMI credentials: user=admin, password=<this> IPMI_ADMIN_PASSWD = admin # SD card device CARD = /dev/mmcblk0
If you want to configure wifi (for ZeroW board for example) you must add these lines to
config.mk
:WIFI_ESSID = "my-network" WIFI_PASSWD = "P@$$word"
-
Build the OS. It may take about one hour depending on your Internet connection:
[user@localhost os]$ make os
-
Put SD card into card reader and install OS (you should disable automounting beforehand:
systemctl stop udisk2
or something like that):[user@localhost os]$ make install
-
After installation remove the SD card and insert it into your RPi. Turn on the power. The RPi will try to get an IP address using DHCP on your LAN. It will then be available via SSH.
-
If you can't find the device's address, try using the following command:
[user@localhost os]$ make scan
-
Only for v0: Flash the Arduino HID.
-
Congratulations! Your Pi-KVM will be available via SSH (
ssh root@<addr>
with passwordroot
by default) and HTTPS (try to open in a browser the URLhttps://<IP addr>
, the loginadmin
and passwordadmin
by default). For HTTPS a self-signed certificate is used by default. -
To change root password use command
passwd
via SSH or webterm. To change Pi-KVM web password usekvmd-htpasswd set admin
.
If you have any problems or questions, contact us using Discord: https://discord.gg/bpmXfz5