Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 195128 - linux-mod.eclass: support building modules for all installed kernels
Summary: linux-mod.eclass: support building modules for all installed kernels
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
: 307171 438784 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-08 17:18 UTC by Isakov Alexandr
Modified: 2021-08-31 09:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to linux-mod.eclass (linux-mod.eclass.patch,2.68 KB, patch)
2007-10-08 17:22 UTC, Isakov Alexandr
Details | Diff
Updated version (linux-mod.eclass.diff,5.91 KB, patch)
2008-11-01 18:31 UTC, Isakov Alexandr
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Isakov Alexandr 2007-10-08 17:18:39 UTC
I have patch eclass/linux-mod.eclass to support building kernel modules to all installed into /usr/src kernel sources.

Reproducible: Always

Steps to Reproduce:
1. Make testing overlay
2. Copy original linux-mod.eclass to it
3. Apply path

Actual Results:  
After overlay would be enables in make.conf all ebuilds that use linux-mod begins to build kernel modules to all installed kernels.
Comment 1 Isakov Alexandr 2007-10-08 17:22:19 UTC
Created attachment 132934 [details, diff]
Patch to linux-mod.eclass
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-10-08 19:26:18 UTC
This has nothing to do with portage.
Comment 3 Daniel Drake (RETIRED) gentoo-dev 2008-10-31 22:08:31 UTC
Thanks for the patch!

This should be an option, rather than happening all the time. I'm not sure how you would enable it though.

If you'd like to put it forward for further consideration, please could you post the patch in unified diff format? (diff -u)
Comment 4 Isakov Alexandr 2008-11-01 18:31:21 UTC
Created attachment 170474 [details, diff]
Updated version

Quick and dirty update to the patch. It use "modules-rebuild" FEATURE as trigger. I will improve quality a bit later.

I have a thought about eclass: Create a group of auxiliary functions setup/compile/install which get arguments(module_name and !kernel_source!) that build THAT module for THAT kernel. This would allow to split technical details and "choose kernel" logic. What do you think about it?
Comment 5 Lagu 2015-11-12 10:39:32 UTC
Hi, its posible enable this feature officially on portage? i think its a nice idea, specially when we have multiples kernels and we most compiling all again when we want use other...
Comment 6 SpanKY gentoo-dev 2016-01-26 06:44:32 UTC
*** Bug 307171 has been marked as a duplicate of this bug. ***
Comment 7 SpanKY gentoo-dev 2016-01-26 06:47:27 UTC
*** Bug 438784 has been marked as a duplicate of this bug. ***
Comment 8 Mike Pagano gentoo-dev 2021-08-26 22:25:09 UTC
If there is still interest in this, please consider how an option can be used to enable as requested.
Comment 9 Sergey S. Starikoff 2021-08-30 13:10:34 UTC
(In reply to Mike Pagano from comment #8)
> If there is still interest in this, please consider how an option can be
> used to enable as requested.

Yes, I'm still interested in this option.

One of notable advantages of GNU/Linux OS is boot-time kernel choice.
When I use only built-in kernel modules everything is OK and works as expected.

But when I need to use modules, managed by portage, the model became broken. Only one kernel can be full-functional.

As a solution I suggest to check installed files path against modules path from target of /usr/src/linux symbolic link and skip uninstall phase in mismatch case.
So, rebuilding modules for new kernel will not break pervious.
Comment 10 Rafal Lalik 2021-08-31 09:03:15 UTC
Other option would be use same code like:

eselect kernel list

to determine available kernels.

AFAIR the output of `eselect kernel list` might differ from sources directories in /usr/src