You are not logged in.
Pages: 1
I've been using ABS to build a patched Linux kernel. There's one module that I need to tinker with quite a bit, but I don't want to recompile the entire kernel every time I make a one-line change. Is there a way I can either compile a single module or only build out-of-date files with ABS? I tried bypassing ABS and just using make without any lucky. I'd like to keep as close to the official Arch kernel as possible, so I'd rather not get in the habit of building without ABS. Right now I'm using 4.3.3-2 from the testing repo with a few patches for hardware compatibility.
On a related note, if I modify a module, is reloading is sufficient (modprobe -r and modprobe), or should I perform a reboot?
Offline
Which module are you building? Which patch are you applying?
Offline
Offline
Run make help. A single module can be built with make xxx/yyy/zzz.ko or something like that.
Reloading the module should be sufficient, unless it does really weird things like leaving some hardware in such state that the module itself won't know how to handle it after reload ![]()
And the fastest way to reload is rmmod zzz ; insmod xxx/yyy/zzz.ko. You don't need to install anything if you only want to test some quick change.
EDIT: And yes, this all means "don't use ABS". Unpack source corresponding to your running kernel somewhere and run these commands there. It will save you lots of time and typing.
Last edited by mich41 (2015-12-26 12:49:27)
Offline
EDIT: And yes, this all means "don't use ABS". Unpack source corresponding to your running kernel somewhere and run these commands there. It will save you lots of time and typing.
Or better yet, create a PKGBUILD that just applies the patch and builds/installs the single module you require.
Offline
On Arch, graysky's suggestion is the ideal form. But, as an old Gentoo guy, I am comfortable building kernels and moving files around by hand.
If you compile the kernel once using make, then change a single source file, then when you run make again it does not need to recompile everything. It will just compile what it needs.
This works well for me -- In addition to the Arch stock kernel I generally keep a kernel around with all my required modules built in so I don't need an initrd. As such there is always a kernel tree compiled in my "build" directory. When I need a new module, it is simple to run a make config to turn modules on and compile them.
Last edited by ewaller (2015-12-27 16:05:28)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
As others said, get confortable with kernel config and make command if you already aren't. Also watch aout not to mess things up, like blindly running scripts in kernel build directory. Otherwise, I think mitch41's suggestion is the best.
Offline
Thanks for the help. I'm pretty familiar with GNU make, so I settled on make something.ko. I hadn't tried that originally because I figured it couldn't possibly that simple, but it works great.
Now I have a bug report: https://bugzilla.kernel.org/show_bug.cgi?id=110021
And a pull request/patch: https://github.com/torvalds/linux/pull/236
What's the process for attracting some attention to these? From what I've seen, patches are typically communicated via mailing lists and such rather than pull requests, so I'm not sure if I need to do something else to get noticed. It's a single-character patch that fixes a pretty obvious regression on some laptops, so I figured it'd be a good first contribution.
Offline
Does Linus accept pull requests via github? Unlikely.
uname == latest pf-kernel
Offline
See Documentation/SubmittingPatches and scripts/get_maintainer.pl.
Offline
Does Linus accept pull requests via github? Unlikely.
They do not. I submitted one anyway. Their mailing list is rejecting my emails.
Offline
Pages: 1