If you need to compile modules for the Orange Pi Zero 2, using the official Ubuntu image, you can find a linux-headers deb package here.
If using an Creality Ender 3 V2 Neo with OctoPrint, you probably can use the built in driver. Just don’t cancel printing on the screen, use OctoPrint.
If you look at cmd.txt at the link above, you can see how I made the kernel, the kernel was downloaded from kernel.org. If you want to compile the scripts for ARM64, good luck finding instructions to cross compile those. I just used Lima, which uses QEMU and nerdctl.
If running OctoPrint in Podman, below is the run command from my .service file.
/usr/bin/podman run --cidfile=%t/%n.ctr-id --cgroups=no-conmon --rm --sdnotify=conmon --replace --network host --device /dev/ttyUSB0:/dev/ttyUSB0 --group-add keep-groups -d --name octoprint -v /home/orangepi/octoprint:/octoprint --label io.containers.autoupdate=registry docker.io/octoprint/octoprint
If not running using systemctl, perhaps remove –cidfile=%t/%n.ctr-id and maybe the autoupdate part. That’s probably the fastest way to install OctoPrint. And auto updates are easy.
And the driver doesn’t matter, I just froze it by running bed leveling with a plugin. Guess that plugin freezes it, or you have to reboot printer before using with OctoPrint.
You need crun installed for OctoPrint to work as non root. And you need printer connected when starting OctoPrint. You may need to change /dev/ttyUSB0. You can turn printer off and unplug it, after OctoPrint starts.
It may freeze every time with the driver included with the kernel, at least 5.16.17, when bed leveling it. And you can’t set the offset with the plugin to -2.55, but you can on the printer.
If all else fails, try Klipper, you can probably put official firmware back on it. Assuming you don’t brick it.
There’s no need to share the kernel I compiled, as I doubt it’ll boot, it doesn’t have the device tree for the Orange Pi Zero 2, the headers allowed me to compile a CH341/CH340 driver though, different ones as well. Looks like this driver is more stable then built in one, as now I can’t even print, with that plugin enabled. Can I without it? No idea, but the printer freezes. Going to try this driver though. Is that the same as the one from Chinese site? Might be, same README file.
If using the second driver link, it will be /dev/ttyCH341USB0, but OctoPrint can’t find that, so keep the second one as ttyUSB0.
WireGuard works just fine on it, just as expected, the server is running on a Raspberry Pi 4 8GB, which isn’t very fast CPU wise.
It’s connecting a security camera to my WireGuard VPN on my isolated wired network as well. I don’t want the camera connected directly by WiFi.