Re: Package for development of out-of-tree kernel modules written in Rust
On Sun, Apr 13, 2025 at 5:36 PM NoisyCoil <noisycoil@disroot.org> wrote:
>
> 1. Native build on arm64. Installed the build on amd64, replaced the
> Rust files (rmeta and libmacros) with ones obtained by cross-compiling
> the same kernel with the same config on amd64. Pointing KDIR to the
> natively-built /usr/src/linux-headers with the replaced Rust files
> correctly builds the OOT module, and the module correctly loads on arm64.
>
> 2. Cross-build on amd64. Installed the build on arm64, replaced the Rust
> files with those from the twin native build. Same as above, the module
> builds and correctly loads on arm64.
I am not sure I am following correctly the tests, but are you
referring to rebuilding all the Rust artifacts (and not just the host
ones)?
I think that would still be not generally supported by the kernel,
since you still used a different host/target pair (i.e. different
toolchains/binaries) -- if I understand correctly, your out-of-tree
module ends up using `.rmeta`s that are different than those used for
the main kernel since they come from a different build, even if they
are all accepted by the Rust compiler since it built them all.
Nice to hear that worked here, though :)
Thanks a lot for all the tests you performed! I really appreciate it.
Cheers,
Miguel
Reply to: