-
-
Save shantur/71e4931438f61ab6386e7672f6a2cf50 to your computer and use it in GitHub Desktop.
# 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 |
PiKVM uses Linux kernel USB Gadget framework for acting as a usb device.
You can find some info here https://www.kernel.org/doc/Documentation/usb/gadget_configfs.txt and on google.
Hi
Thank you for your response.
I am looking on it and got that point.
PiKVM uses Linux kernel USB Gadget framework for acting as a usb device.
My confusin is here,
As all mouse or keyboard event is sent from " local pc " to piKVM via some network or web interface. not sure which method are being used.
how respective data is converted at piKVM end point, after that conversion they send it over OTG Gadget framework to server.
how to manage forth & back communication between piKVM & local pc ?
if you have any idea about this, can you share it here please?
Thanks
The communication flow is
Web Interface (Browser) -> Web Socket -> PiKVM (kvmd) -> Linux Kernel Gadget -> USB -> Remote Server.
If you are porting it to iMX8, then you don't need to worry about this but
- Make sure Linux Kernel for iMX8 and iMX8 has USB Gadget ( OTG ) support
- Enable Linux USB Device Mode for iMX8
- Install arch linux based distro
- Install pikvm using my script.
Rest all will be taken care of.
Once you reach this point then, you can start thinking of hardware accelerated encoding on iMX8 for ustreamer
Hi
As per your suggestions I have tried your script for building os for iMX8 board, got some error affter running your script and working on resolving the error.
Also,
I am working on to creating software architecture of piKVM. I have made a basic skeleton for architecture, would you please have a look into it and help me for better understanding it.
Could you please suggest If I missed anything in this.
My script is quite old so might not be compatible with recent changes.
As far as my undertstanding goes the diagram looks ok to me.
I would suggest you jump onto PiKVM Discord and discuss there. You would find many people who can answer your queries.
rror: failed retrieving file 'pikvm.db' from pikvm.org : The requested URL returned error: 404
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
Hi,
I am working on piKVM porting and trying to findout how piKVM works.
for that I am looking for software arcitechure of piKVM to get clear view of how they actually transferring the OTG Event(Keybaord, mouse etc) from local system server that is attached with piKVM.
if you have any idea on how actual it work, could you please help me to understand. it will be very helpfull for me to start. Actualy i am porting it for another hardware IMX8.
I also try to get help from piKVM DISCORD channel.
Thanks
Ashvin Makwana