[PlanetCCRMA] How to rebuild and test individual kernel module

Michal Šmucr msmucr at gmail.com
Mon Oct 21 16:12:51 PDT 2013


Hello,

first of all thank you very much for maintaining and contributing to
CRRMA repository. Recently i've started playing with your packages on
top of Fedora 19 and i really enjoy that.
I would like to ask you one question regarding modification and quick
rebuilding of individual modules from rt-kernel package.
I usually stick with my generic UNIX knowledge, but this is rather
specific to RPM packages system and this particular spec file, which
is quite complex with lot of possible defines.

I tried something like this:
- rebuilded srpms package with custom suffix to distinguish it from
CRRMA version
- installed kernel and boot is
- installed newly generated srpms package
- ran rpmbuild -bp up to extract sources and apply distribution patches
- backup whole source tree (rpmbuild/BUILD/kernel-name) for possible later diffs
...
made few modifications to source of one module and like to try it
...
I recalled from past, i could issue "make path/to/module.ko" at root
of Linux source, and then if running kernel is same, i could load
newly built module with insmod to test my modifications.
In that case, i've built module, but can't load it to running kernel
with invalid version magic. I assumed, it is probably due to
additional things, like stripping and signing of modules, which is
normally applied after %prep stage.
Do you have some hint, how to setup environment or necessary commands
for quick testing of recently built module, without rebuilding of
whole kernel-rt package?

Best regards

Michal



More information about the PlanetCCRMA mailing list