Skip to content

Instantly share code, notes, and snippets.

@shantur
Last active December 20, 2023 04:04
Show Gist options
  • Save shantur/71e4931438f61ab6386e7672f6a2cf50 to your computer and use it in GitHub Desktop.
Save shantur/71e4931438f61ab6386e7672f6a2cf50 to your computer and use it in GitHub Desktop.
PiKVM on RockPro installation
# For installing PiKVM on RockPro64 with HDMI-USB Capture device.
# Install Manjaro linux
# Run this script as sudo pikvm-install.sh
# Enable Otg on USB-C Port
pacman -Syu --noconfirm dtc
fdtput -t s /boot/dtbs/rockchip/rk3399-rockpro64.dtb /usb@fe800000/usb@fe800000 dr_mode peripheral
export PIKVM_REPO_KEY=912C773ABBD1B584
export PIKVM_REPO_URL=https://pikvm.org/repos
export BOARD=rpi4
export ARCH=arm
export WEBUI_ADMIN_PASSWD=admin
export IPMI_ADMIN_PASSWD=admin
export PLATFORM=v2-hdmiusb
mkdir -p /etc/gnupg
echo standard-resolver >> /etc/gnupg/dirmngr.conf
pacman-key --keyserver hkps://keyserver.ubuntu.com:443 -r $PIKVM_REPO_KEY \
|| pacman-key --keyserver hkps://keys.gnupg.net:443 -r $PIKVM_REPO_KEY \
|| pacman-key --keyserver hkps://pgp.mit.edu:443 -r $PIKVM_REPO_KEY \
pacman-key --lsign-key $PIKVM_REPO_KEY
echo -e "\n[pikvm]" >> /etc/pacman.conf
echo "Server = $PIKVM_REPO_URL/$BOARD-$ARCH" >> /etc/pacman.conf
echo "SigLevel = Required DatabaseOptional" >> /etc/pacman.conf
pacman -Syu kvmd
systemctl enable kvmd-nginx
curl -o /etc/kvmd/main.yaml https://raw.githubusercontent.com/pikvm/kvmd/master/configs/kvmd/main/v2-hdmiusb-rpi4.yaml
echo libcomposite > /etc/modules-load.d/99-kvmd.conf
modprobe libcomposite
curl -o /etc/sudoers.d/99-kvmd https://raw.githubusercontent.com/pikvm/kvmd/master/configs/os/sudoers/v2-hdmiusb
curl -o /etc/udev/rules.d/99-kvmd.rules https://raw.githubusercontent.com/pikvm/kvmd/master/configs/os/udev/v2-hdmiusb-rpi4.rules
udevadm control -R
udevadm trigger
printf "kvmd:\n msd:\n remount_cmd: /bin/true\n" >> /etc/kvmd/override.yaml
mkdir /var/lib/kvmd/msd/images
mkdir /var/lib/kvmd/msd/meta
chown kvmd:root /var/lib/kvmd/msd/images
chown kvmd:root /var/lib/kvmd/msd/meta
systemctl enable kvmd-otg
sed -i 's/) exit 1;;/) exit 0;;/g' /usr/bin/kvmd-udev-hdmiusb-check
curl -o /opt/vc/bin/vcgencmd https://raw.githubusercontent.com/Yura80/os/master/pikvm/vcgencmd
pacman -S --noconfirm git make gcc libevent libjpeg-turbo libutil-linux libbsd
git clone https://github.com/pikvm/ustreamer.git
cd ustreamer
make
cp ./ustreamer /usr/bin/ustreamer
systemctl enable kvmd
echo "Your system is all set to reboot now"
# Reboot system
@FallenDawn
Copy link

rror: failed retrieving file 'pikvm.db' from pikvm.org : The requested URL returned error: 404

@richardbergen
Copy link

rror: failed retrieving file 'pikvm.db' from pikvm.org : The requested URL returned error: 404

You need to update your pacman pikvm config to the following:
[pikvm]
Server = https://files.pikvm.org/repos/arch/rpi4-arm
SigLevel = Required DatabaseOptional

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment