Building and installing the excalibur kernel driver on immutable distributions/spins based on Fedora Silverblue
As you may know, immutable distributions are meant to keep the entire system read-only and use overlays/separate partitions to allow writing to specific user-oriented directories. Fedora achieves this on their atomic distributions by storing the entirety of overlayed directories in /var, as can be seen with Bazzite's Bash setup: yachiyo@ward-g770-baz:/var/home/yachiyo
Due to this, you cannot install external modules directly (e.g. by copying them into /usr/lib/modules/$(uname -r)/extra) and you have to package them for use with rpm-ostree instead.
The second file in this Gist is the spec file I wrote to build the Excalibur kernel driver located in thekayrasari/excalibur given you provide the source code in rpmbuild/SOURCES directory as a tarball after setting up your environment. I'll cover everything here.