Open uudiin opened 3 weeks ago
@uudiin This is too little information for me to tell you something concrete.
One thing that comes to my mind is maybe a kernel version mismatch. This repo works only with v6.5.7
(git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --depth 1 -b v6.5.7).
So if you're using different version with different syscalls it might be the problem.
Also, the syscall numbers differ between arm and x86, so you might have to adapt your code accordingly.
I compiled on master branch, it is 5be63fc19fcaa4c236b307420483578a56986a37 ("Linux 6.11-rc5"), mac_patch_6-5-7.patch was applied succeed, the build environment is Mac Book Pro 2023 with Apple Silicon M3 Pro, macOS Sonoma 14.6.1.
It seems that the asm-generic/unistd.h
header file is not included correctly, and all syscall definitions like _NR are wrong.
I've looked at the changes briefly and as I feared, a lot has changed between 6.5.7
and 6.11-rc5
.
mac_patch_6-5-7.patch
applies successfully, probably because the files it changes are still there, but now there are some new files one would have to patch to get the kernel to build on macOS. :|
If you need 6.11-rc5
it would probably be easier to use linux
(or you can hunt for all the new patches by debugging the build process — which tbh is very tedious).
If not, you can try the old kernel version from:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git --depth 1 -b v6.5.7
(Full tutorial here)
@mastermakrela I want to develop some new features, so I have to compile based on master. Thanks for your suggestion. I will see if I can solve it by debugging the build system.
Looks like all syscall number definition are not found.