Table of Contents

THIS WIKI HAS MOVED!

ACTUAL LOCATION:

2025/01/21 11:53 · torte

https://torte71.github.io/InsideSovolKlipperScreen/rebuilding.html

.








2025/01/21 11:53 · torte

Sovol KlipperScreen (Makerbase MKS KLIPAD50)

Rebuilding

Sovol's KlipperScreen is running on debian buster, which is outdated now, meaning you can no longer update system packages like ssh, etc.

The default armbian kernels do not work, e.g. the screen will stay black (no /dev/spidev*.* gets created).

There are recent images provided by Maxim Medvedev (redrathnure) on github, which can be used as a base:
https://github.com/redrathnure/armbian-mkspi
These images do not support the KLIPAD50's internal wifi out of the box, so you would either have to replace a devicetree file (see bottom of the page) or use external USB-wifi(*) or USB-ethernet adapters. But the screen is working and spidev is available. It's spidev0.2 instead of spidev0.0, so adjust your printer.cfg accordingly.
(*) These adapters may require additional firmwares. You can try to install them with sudo apt update ; sudo apt install firmware-misc-nonfree if yours is not detected automatically. On the other hand, this specific firmware package can break the internal wifi, even with the replaced dtb file.

Steps to set up:

Base system

  1. Reboot the device and connect a keyboard (or use an USB-cable for a serial connection)
  2. Create root password
    • freely choose your own
  3. Choose default system command shell
    • if unsure, choose “1” (bash)
  4. Please provide a username
    • use “mks” if you want to stay compatible with makerbase services
  5. Create user (mks) password
    • freely choose your own
  6. Set user language based on your location?
    • if unsure, choose “Y”
    • otherwise, choose the setting according to your location/needs

Klipper

  1. Log into device using ssh, putty or serial connection
  2. cd into home dir:
    cd
  3. install KIAUH:
    git clone https://github.com/dw-0/kiauh
  4. start KIAUH:
    cd kiauh ; ./kiauh.sh
  5. install klipper components (that's mostly pressing “1” or <ENTER>):
  6. choose “Install” (1)
  7. enter your password
  8. choose “Klipper” (1)
    1. choose “Python 3.x” (1)
    2. choose number of instances (1)
    3. wait for install to finish
  9. choose “Moonraker” (2)
    1. confirm with “Y” or <ENTER>
    2. wait for install to finish
  10. choose “Mainsail” (3)
    1. when asked “Download recommended macros”: confirm with “Y” or <ENTER>
    2. wait for install to finish
  11. choose “Fluidd” (4)
    1. when asked “Please enter a new Port”: enter “81”
    2. when asked “Download recommended macros”: confirm with “Y” or <ENTER>
    3. wait for install to finish
  12. choose “KlipperScreen” (5)
    1. wait for install to finish (will take quite a while)
    2. when asked “Install as a service?”: confirm with “Y” or <ENTER>
  13. choose “Crowsnest” (12)
    1. wait for install to finish
    2. when asked “Do you want to add 'update manager'”: confirm with “Y” or <ENTER>
    3. when asked “Reboot NOW? [y/N]”: answer “N” or <ENTER>
  14. choose “Back” (B)
  15. choose “Advanced” (4)
    1. choose “G-Code Shell Command” (8)
    2. when asked “Do you want to continue?”: confirm with “Y” or <ENTER>
    3. when asked “Create an example shell command?”: confirm with “Y” or <ENTER>
  16. choose “Quit” (Q)
  17. Set up secondary mcu: (see https://www.klipper3d.org/RPi_microcontroller.html)
    cd ~/klipper ; make menuconfig
    1. select “Micro-controller Architecture” (press <ENTER>)
    2. select “Linux process” (press <ENTER>)
    3. press “Q” and “Y” to quit and save
    4. sudo make flash
    5. sudo cp ./scripts/klipper-mcu.service /etc/systemd/system/
    6. sudo systemctl enable klipper-mcu.service
    7. sudo service klipper restart
  18. Fix screen rotation:
    sudo nano /etc/X11/xorg.conf.d/01-armbian-defaults.conf
    1. copy this text:
      Section "Device"
              Identifier "default"
              Driver "fbdev"
              Option "Rotate" "CW"
      EndSection
      Section "InputClass"
              Identifier "libinput touchscreen catchall"
              MatchIsTouchscreen "on"
              MatchDevicePath "/dev/input/event*"
              Driver "libinput"
              Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
      EndSection
    2. press <CTRL-X> to quit
    3. press “Y” to save
    4. press <ENTER> to confirm filename
    5. restart KlipperScreen:
      sudo service KlipperScreen restart
  19. Freeze the kernel
    1. sudo armbian-config
    2. select “System”
    3. select “Freeze”

Now you should have a working (and recent) klipper installation on the Sovol KlipperScreen.

Copy your old printer.cfg - or take one of Sovol's files for your device: https://github.com/Sovol3d/SOVOL_KLIPAD50_SYSTEM/tree/main/klipper_configuration

You will probably have to change “spidev0.0” to “spidev0.2” inside your “printer.cfg”
(unless you've installed the wifi-enabled dtb below - in that case, it will be spidev0.0 again).

Sovol mods

Modifications from Sovol useful for this image:
(See sovol_mods for details about the packages)

Internal wifi + spidev

Replacing the dtb from the redrathnure image with Sovol's version of rk3328-roc-cc.dtb enables the internal wifi of the KLIPAD50 board, but does not create the spi device. With the following change, /dev/spidev0.0 will be created as well.

--- rk3328-roc-cc-org.dts	Sat Mar 09 16:36:40 2024
+++ rk3328-roc-cc-new.dts	Sat Mar 09 17:33:57 2024
@@ -860,7 +860,7 @@
 
 		spi_for_cs2@0 {
 			reg = <0x00>;
-			compatible = "rockchip,spi_test_bus1_cs2";
+			compatible = "armbian,spi-dev";
 			pinctrl-names = "default";
 			pinctrl-0 = <0x35>;
 			spi-max-frequency = <0x4c4b40>;

Source of Sovol's rk3328-roc-cc.dtb from 5.16.20 kernel rk3328-roc-cc_dts

Successfully tested with these images:
0.3.2-24.2.0-trunk: Armbian-unofficial_24.2.0-trunk_Mkspi_bookworm_current_6.1.76.img.xz
0.3.4-24.2.0-trunk: Armbian-unofficial_24.2.0-trunk_Mkspi_bookworm_current_6.6.17.img.xz
0.3.4-24.2.0-trunk: Armbian-unofficial_24.2.0-trunk_Mkspi_bookworm_edge_6.7.5.img.xz

Additional notes:

Here is a compiled version of the devicetree file: rk3328-roc-cc.dtb

Download and replace /boot/dtb/rockchip/rk3328-roc-cc.dtb with this version and reboot.

crowsnest / camera streaming


Back to start