fishinabarrel / linux-kernel-module-rust

Framework for writing Linux kernel modules in safe Rust
GNU General Public License v2.0
1.34k stars 119 forks source link

[info] ClangBuiltLinux #147

Open nickdesaulniers opened 5 years ago

nickdesaulniers commented 5 years ago

Hello! Neat project, a lot of folks in Android are keeping an eye on it. If you run into any issues with Clang or LLVM for the Linux kernel (or need help with anything else roughly related), please let us know: https://github.com/ClangBuiltLinux/linux/issues.

geofft commented 5 years ago

Thanks! A few things that come to mind:

nickdesaulniers commented 5 years ago

lol, I wrote the kernel patch for bcmp. I highly recommend sticking with the same target triple that the rest of clang and the kernel use, ie. <arch>-linux-gnu. I also backported my patch to stable LTS branches, so those should all work for you (though some distro's have strange non-LTS kernel versions, I assume they manually backport stable...or at least I hope they do).

For CI+QEMU, all of our stuff is here. It's setup to do a basic boot test, then power off the machine cleanly. If the machine doesn't exit cleanly, timeout snaps qemu's neck and the tests fail. Feel free to use our fs images or buildroot scripts or w/e. I'm also happy to help answer any questions. See also: https://nickdesaulniers.github.io/blog/2018/10/24/booting-a-custom-linux-kernel-in-qemu-and-debugging-it-with-gdb/

alex commented 5 years ago

Thanks!