[Quartz64a] Linux Kernel Headers?

Hi DietPi community,

I am looking for Linux headers for the Quart64a board. The kernel is part of the firmware-quartz64a package and I was looking for the headers, so I can build a dkms module, but I could not find them.

The kernel binary is located here: https://dietpi.com/downloads/binaries/firmware-quartz64a.deb
I am looking for the kernel headers for that kernel.

Kind regards,

@MichaIng something we need your support :slight_smile:

I think I’ve managed, but now I have other issues - module is incompatible with this kernel. Nonetheless, here is what I’ve done:

Building header files for a specific stable version:

  1. Pick a folder where the packages will be built.
  2. sudo apt install git build-essential bc kmod cpio flex libncurses5-dev libelf-dev libssl-dev dwarves bison debhelper
  3. git clone --depth 1 --branch v6.5.8 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.5.8
    (you might need to change the version, check uname -a).
  4. cd linux-6.5.8
  5. zcat /proc/config.gz > .config
  6. nice make -j$(nproc) deb-pkg
  7. change directory to the initial, where are a lot of .deb files, including linux-headers-6.5.8_6.5.8-3_arm64.deb
  8. sudo dpkg -i linux-headers-6.5.8_6.5.8-3_arm64.deb

Trying to get ZFS on Quart64A

$ sudo dpkg-reconfigure zfs-dkms
Loading new zfs-2.1.11 DKMS files...                                                                                          
Building for 6.5.8
Building initial module for 6.5.8

configure: error:  
        *** None of the expected "bops->release()" interfaces were detected.
        *** This may be because your kernel version is newer than what is
        *** supported, or you are using a patched custom kernel with
        *** incompatible modifications.
        *** ZFS Version: zfs-2.1.11-1
        *** Compatible Kernels: 3.10 - 6.2

Sadly, I do need a zfs-2.2.x that is compatible with Linux kernel 6.5.

Ok, just to let you know, I’ve managed to build OpenZFS 2.2.0 on Quartz64A using the headers built with the instructions above. There is a problem with the license, but after replacing it in META and a few more places and then running autogen, configure, make native-deb, everything worked out and the module got loaded.

Though, the system hanged at some point while I was deleting 200GB of data, but I haven’t hooked a monitor to check if the kernel would log anything. I could ping the SBC, but the SSH session froze and I could not establish a new one.

I would actually love to create header packages manually, not using make deb-pkg, since this would double efforts for the build runner. We also create the actual kernel package from the compiler kernel image, modules and dtb manually, to apply some customisations, adding the bootloader, extlinux config and such that way. But I could not find a way to create the headers package only or which files actually need to be contained in a headers package. This seems to be quite a complicated composition of some source and some compiled files from various directories.

If anyone knows which files need to be copied together, that would be great. Otherwise, I guess we need to bite into the apple with deb-pkg and the hence doubled kernel build in our workflow, or find a way to hack Makefile resp. the Linux build scripts to build the header package only.


I’m also trying to install ZFS on quartz64A. I figure that openZFS 2.1.13 should support linux 6.5 (Release zfs-2.1.13 · openzfs/zfs · GitHub) and openZFS 2.1.13 is available in bookworm-backport.

However i’m struggling with the kernel headers too.
Found that this might be of interest : https://www.kernel.org/doc/Documentation/kbuild/headers_install.txt
Running make headers and make headers_install INSTALL_HDR_PATH=/usr seems to install headers at the right place, but while installing ZFS 2.1.13 i see this log :

root@DietPi:/home/dietpi/linux-6.5.11# apt install --reinstall zfs-dkms=2.1.13-1~bpo12+1
Loading new zfs-2.1.13 DKMS files...
Building for 6.5.11
Module build for kernel 6.5.11 was skipped since the
kernel headers for this kernel do not seem to be installed.

Maybe a totaly dont get the purpose of make headers_install or i misuse it, but i thought it could avoid me to build the whole kernel just for the headers …

1 Like

Did you create a symlink from the modules path to the headers?

ln -s /usr/scr/linux-headers-6.5.11 /lib/modules/6.5.11/build

Check and in case adjust the path to the headers, this is just a guess.

I tried to set INSTALL_DIR_HDR_PATH=/lib/modules/6.5.11/build but had other issue going this way, so i end up building the whole kernel and installed it as mention by metala.

Thanks for that btw.