[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Package for development of out-of-tree kernel modules written in Rust



On 13/04/25 13:14, Bastian Blank wrote:
So we can only ship rust source in any way and the
kernel module make stuff needs to rebuild anything for the external
modules.

Yep, this seems to work [1]. The two tests I did are:

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.

This seems to be the way to go, although my limited testing may well be neglecting unknown failure modes.


[1] At least with MODVERSIONS enabled. Not sure what would happen with MODVERSIONS disabled, perhaps nothing, as long as the kernel version remains the same?


Reply to: