Page 1 of 1

kernel headers for current Raspbian 64-bit kernel

Posted: Tue Oct 29, 2019 7:20 pm
by andrum99
I'm attempting to build ZFS on Linux by following the instructions at https://wiki.debian.org/ZFS. As expected, they work fine on a test VM running on my 64-bit amd64 laptop. On the Pi, I'm stuck at the step where I need to get the kernel headers for the currently running kernel. I'm attempting to use the official 64-bit kernel provided as part of Raspbian - which is currently 4.19.75-v8+ #1270. The corresponding kernel header package, raspberrypi-kernel-headers, does not contain the 64-bit headers. I understand I therefore need to clone the kernel source from github. How can I select the exact kernel source, which I believe includes the headers I need, from the github repo?

Re: kernel headers for current Raspbian 64-bit kernel

Posted: Tue Oct 29, 2019 9:08 pm
by Kendek
Download the compatible source code zip or tar.gz:

raspberrypi-kernel_1.20190925-1

You can compile the ZFS kernel module under an ARM64 chroot environment.
Just prepare the kernel source:

Code: Select all

make bcm2711_defconfig
make prepare
make scripts