andrum99
Posts: 932
Joined: Fri Jul 20, 2012 2:41 pm

kernel headers for current Raspbian 64-bit kernel

Tue Oct 29, 2019 7:20 pm

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?

Kendek
Posts: 128
Joined: Thu Jul 25, 2019 4:39 pm
Location: Kaposvár, Hungary

Re: kernel headers for current Raspbian 64-bit kernel

Tue Oct 29, 2019 9:08 pm

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

Return to “Advanced users”