Skip to content

Install Pi-KVM on BliKVM v4 Allwinner.

License

Notifications You must be signed in to change notification settings

jcastro/Bli-PiKVM

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Bli-PiKVM

Install Pi-KVM on BliKVM v4 Allwinner.

Disable BliKVM services

ssh blikvm@BLIKVM_IP

sudo apt update
sudo apt upgrade
sudo systemctl disable --now kvmd-hid kvmd-janus.service kvmd-video.service kvmd-web.service
sudo reboot

NOTE: kvmd-main.service is for LCD and hardware monitoring. Just leave kvmd-main.service enabled.

Install kvmd-armbian

ssh blikvm@BLIKVM_IP

sudo apt install -y git vim make python3-dev gcc
git clone https://github.com/srepac/kvmd-armbian.git
cd kvmd-armbian
sudo ./install.sh
sudo reboot

ssh blikvm@BLIKVM_IP

cd kvmd-armbian
sudo ./install.sh
systemctl daemon-reload

At this point, PiKVM service should work as normal at the BlikVM IP address.

Thanks to kvmd-armbian by @srepac.

Prepare MSD Partition

Create MSD Partition

Before applying the patch, you would need to resize your installation partition on the SD card using GParted and create an additional partition for the msd. Finally, you need to add a mount entry for the new partition to /etc/fstab where /dev/mmcblk0p3 matches the name of the new partition you created.

Run the command below and take note of the name of the /mnt partition; it should be called mmcblk0p3 if you are using the default BliKVM image.

lsblk

Remove all /mnt contents

cd /mnt
sudo rm -rf *

Edit /etc/fstab and add the following line, removing the existing one

/dev/mmcblk0p3 /var/lib/kvmd/msd  ext4  nodev,nosuid,noexec,ro,errors=remount-ro,data=journal,X-kvmd.otgmsd-root=/var/lib/kvmd/msd,X-kvmd.otgmsd-user=kvmd  0 0

Unmount the partition to create a new filesystem

sudo umount /mnt
mkfs.ext4 /dev/mmcblk0p3

Apply kvmd MSD Patch

  1. Download the msd patch and apply it.
cd /usr/lib/python3/dist-packages/kvmd
sudo wget -q https://github.com/RainCat1998/Bli-PiKVM/raw/main/3.291msd.patch -O 3.291msd.patch
sudo patch -p1 < 3.291msd.patch
  1. Remove the following entries from /etc/kvmd/override.yaml.
    msd:
        type: disabled
  1. Reboot & Enjoy

NOTE: This patch is only for kvmd 3.291.

The patch code is ported from fruity-pikvm by @jacobbar.

Configure ATX Controller

  1. Download the latest BliKVM Source and compile kvmd-atx
git clone https://github.com/ThomasVon2021/blikvm
cd blikvm/package/kvmd-atx
make
  1. Copy the compiled atx binary into /usr/bin/ then add sudo premission
sudo cp atx /usr/bin/
sudo nano /etc/sudoers.d/kvmd

kvmd ALL=(ALL) NOPASSWD: ALL
  1. Create the following '/etc/kvmd/override.d/atx.yaml' file
kvmd:
    gpio:
        drivers:
            power_short:
                type: cmd
                cmd: [/usr/bin/sudo, /usr/bin/atx, --v, v4, --c, power_on]
            power_long:
                type: cmd
                cmd: [/usr/bin/sudo, /usr/bin/atx, --v, v4, --c, power_off]
            reset_sw:
                type: cmd
                cmd: [/usr/bin/sudo, /usr/bin/atx, --v, v4, --c, power_reset]

        scheme:
            on-off-button:
                driver: power_short
                pin: 0
                mode: output
                switch: false
            force-off-button:
                driver: power_long
                pin: 0
                mode: output
                switch: false
            reset-button:
                driver: reset_sw
                pin: 0
                mode: output
                switch: false

        view:
            table:
                - []
                - ["#ATX on BliKVM hardware"]
                - []
                - ["on-off-button|On/Off", "force-off-button|Force Off", "reset-button|Reset"]
  1. Reboot & Enjoy

Thanks to @srepac.

About

Install Pi-KVM on BliKVM v4 Allwinner.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published