Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3552

Raspberry Pi OS • Re: Raspberry Pi Kernel Source Code for Cross Compiling

$
0
0
I am going to cross-compile the device driver on my machine and test it on my Raspberry Pi 4.
However, the kernel version on Raspberry Pi is 6.12.25+rpt-rpi-v8 and the kernel version that I can found on github - raspberry/linux is 6.12.30-g1ec873f3f18c.
In this way, the kernal object cannot be loaded on my Raspberry Pi. May I know where I can find the correct version of the kernel?
Or are there any alternative ways to solve this issue? Thanks in advance.

You may find Building the Raspberry Pi OS Kernel : Made Easy useful.

Both native and cross-compiling is supported.

Cross-compiling on Windows 11 WSL2 takes less than 5 minutes, but is also possible on a Raspberry Pi (taking longer, of course).
Appreciate it. I have checked the link.
In my current situation, I cannot find the same version of kernel code to match the one already existing on my Pi4.
I just want to build the driver on my machine and run it on the Pi4 later.
I think it is not relevant to compile the kernel.
May I know if it is true that the tool mentioned in the link is useful for kernel compiling?
I am a bit confused. Please feel free to correct me, thanks.

Statistics: Posted by wennnnnnn — Wed May 28, 2025 8:43 am



Viewing all articles
Browse latest Browse all 3552

Trending Articles