ovacikar Posted 13 hours ago Posted 13 hours ago Hi, I need linux kernel source to compile a custom module. The one I downloaded from kernel.org did not work, got module format error, indicating the kernel is different. i did not have this problem compiling the same module for Armbian lepotato (amlogic) Where do I get the kernel source for my Orangepi Zero 2? Linux orangepizero2 6.12.20-current-sunxi64 #1 SMP Sat Mar 22 19:54:28 UTC 2025 aarch64 GNU/Linux linux-headers-current-sunxi64/bookworm,now 25.2.3 arm64 [installed] Armbian Linux current headers 6.12.20-current-sunxi64 linux-image-current-sunxi64/bookworm,now 25.2.3 arm64 [installed] Armbian Linux current kernel image 6.12.20-current-sunxi64 0 Quote
Igor Posted 5 hours ago Posted 5 hours ago 7 hours ago, ovacikar said: Hi, I need linux kernel source to compile a custom module. The one I downloaded from kernel.org did not work, got module format error, indicating the kernel is different. We just figured out we have dropped packing kernel sources at some point. Until we figure out how to re-enable that or if this makes sense, use build framework to add a custom module. It has the ability to do that. 7 hours ago, ovacikar said: i did not have this problem compiling the same module for Armbian lepotato (amlogic) Allwinner kernel is heavily patched, version is not necessarily latest, quite distanced from mainline, while Amlogic, on the other hand, is closer, changed less. 0 Quote
ovacikar Posted 2 hours ago Author Posted 2 hours ago (edited) I set the version in userpatches/lib.config , then executed this: ./compile.sh BOARD=orangepizero2 BRANCH=current kernel-config KERNEL_BTF=no KERNEL_GIT=full and when the kernel menu came up, just exited to shell. Is this the kernel source directory I can point the compiler script of the module ? /build/cache/sources/linux-kernel-worktree/6.12__sunxi64__arm64$ ls arch COPYING defconfig fs io_uring Kconfig LICENSES mm rust security usr block CREDITS Documentation include ipc kernel MAINTAINERS net samples sound virt certs crypto drivers init Kbuild lib Makefile README scripts tools Edited 1 hour ago by ovacikar 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.