2023-10-16 18:14:44 +00:00
|
|
|
# Building PiKVM OS
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
The assembly of PiKVM OS is carried out using a special build environment.
|
|
|
|
Here the minimum required for its use, imposed on the build machine:
|
2021-10-12 18:45:00 +00:00
|
|
|
|
|
|
|
* kernel >= 5.8
|
|
|
|
* glibc >= 2.33
|
|
|
|
* docker >= 19.03.13
|
2023-10-16 18:14:44 +00:00
|
|
|
* git
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
Docker must work in privileged mode.
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
1. When starting with a clean OS you need to install and configure Docker. An example for Ubuntu:
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
```console
|
2021-10-12 18:45:00 +00:00
|
|
|
[user@localhost ~]$ sudo apt-get install git make curl binutils -y
|
2023-01-23 16:47:50 +00:00
|
|
|
[user@localhost ~]$ sudo apt-get install docker.io
|
2021-10-12 18:45:00 +00:00
|
|
|
[user@localhost ~]$ sudo usermod -aG docker $USER
|
|
|
|
```
|
|
|
|
|
|
|
|
Re-login to apply the changes.
|
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
2. Checkout the build environment:
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
```console
|
2021-10-12 18:45:00 +00:00
|
|
|
[user@localhost ~]$ git clone --depth=1 https://github.com/pikvm/os
|
|
|
|
[user@localhost ~]$ cd os
|
|
|
|
```
|
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
3. Determine the target board and platform:
|
|
|
|
|
|
|
|
* Choose the board:
|
|
|
|
* `BOARD=rpi4` for Raspberry Pi 4.
|
|
|
|
* `BOARD=zero2w`
|
|
|
|
* `BOARD=rpi3`
|
|
|
|
* `BOARD=rpi2`
|
2021-10-12 18:45:00 +00:00
|
|
|
|
|
|
|
* Choose the platform:
|
2023-04-14 00:36:21 +00:00
|
|
|
* `PLATFORM=v4mini-hdmi` for PiKVM V4 Mini.
|
|
|
|
* `PLATFORM=v4plus-hdmi` for PiKVM V4 Plus.
|
|
|
|
* `PLATFORM=v3-hdmi` for RPi4 and PiKVM V3 HAT.
|
2022-08-24 17:25:55 +00:00
|
|
|
* `PLATFORM=v2-hdmi` for RPi3a+/RPi4 or Zero2W with HDMI-CSI bridge.
|
2021-10-12 18:45:00 +00:00
|
|
|
* `PLATFORM=v2-hdmiusb` for RPi4 with HDMI-USB dongle.
|
2023-12-02 01:56:22 +00:00
|
|
|
* `PLATFORM=v1-hdmi` for RPi2 or 3b+ with HDMI-CSI bridge and the Pico HID.
|
|
|
|
* `PLATFORM=v1-hdmiusb` for RPi2 or 3b+ with HDMI-USB dongle and the Pico HID.
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
4. Create the build config file `config.mk` for the target system and and the `BOARD` and `PLATFORM` variables.
|
|
|
|
You can also set some other parameters as you wish (see below).
|
|
|
|
Please note: if your password contains the # character, you must escape it using a backslash like `ROOT_PASSWD = pass\#word`.
|
2023-03-25 18:50:04 +00:00
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
```bash
|
|
|
|
# Base board
|
2021-10-12 18:45:00 +00:00
|
|
|
BOARD = rpi4
|
2023-10-16 18:14:44 +00:00
|
|
|
|
2021-10-12 18:45:00 +00:00
|
|
|
# Hardware configuration
|
|
|
|
PLATFORM = v2-hdmi
|
2023-10-16 18:14:44 +00:00
|
|
|
|
2021-10-12 18:45:00 +00:00
|
|
|
# Target hostname
|
|
|
|
HOSTNAME = pikvm
|
2023-10-16 18:14:44 +00:00
|
|
|
|
2021-10-12 18:45:00 +00:00
|
|
|
# ru_RU, etc. UTF-8 only
|
|
|
|
LOCALE = en_US
|
2023-10-16 18:14:44 +00:00
|
|
|
|
2021-10-12 18:45:00 +00:00
|
|
|
# See /usr/share/zoneinfo
|
2023-10-16 18:14:44 +00:00
|
|
|
TIMEZONE = Europe/Nicosia
|
|
|
|
|
2021-10-12 18:45:00 +00:00
|
|
|
# For SSH root user
|
2023-10-16 18:14:44 +00:00
|
|
|
ROOT_PASSWD = rootpass
|
|
|
|
|
|
|
|
# Web UI credentials: user=admin, password=adminpass
|
|
|
|
WEBUI_ADMIN_PASSWD = adminpass
|
|
|
|
|
|
|
|
# IPMI credentials: user=admin, password=adminpass
|
|
|
|
IPMI_ADMIN_PASSWD = adminpass
|
2021-10-12 18:45:00 +00:00
|
|
|
```
|
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
4. Build the OS. It may take about one hour depending on the Internet connection:
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
```console
|
2021-10-12 18:45:00 +00:00
|
|
|
[user@localhost os]$ make os
|
|
|
|
```
|
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
!!! tip
|
|
|
|
If you get an error about failing to retrieving a file, please edit the Makefile and remove `de3.` from the repo URL.
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
5. Create an image. It will be stored in the `images` directory as a file with `*.img` extension:
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
```console
|
|
|
|
[user@localhost os]$ make image
|
|
|
|
```
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-10-16 18:14:44 +00:00
|
|
|
6. [Flash the result image to SD card](flashing_os.md#flashing-the-image).
|