Bug 12212 - Path for modprobe.d and modconf.d should be set through variables.
Summary: Path for modprobe.d and modconf.d should be set through variables.
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: configuration (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Ola Nilsson
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-10-10 09:41 UTC by Ola Nilsson
Modified: 2023-07-10 16:40 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ola Nilsson 2017-10-10 09:41:50 UTC
The paths used for modprobe.d and modconf.d in kernel-modules-split.bbclass
are hardcoded.  They should use variables like all other paths.
This matters both for files generated by the recipe/class and by the package makefile.
Comment 1 Richard Purdie 2017-10-12 14:59:19 UTC
I have no objection to this in principle however I do wonder what assumptions the underlying software has about these paths. Its one thing to make it configurable, its another whether all of the software using the paths responds to the configuration options.

I won't want to do this if it meant carrying a lot of patches to software with no hope of upstreaming them as I don't see this as an important enough issue based on the information here.
Comment 2 Ola Nilsson 2017-10-13 08:02:04 UTC
systemd loads modules according to files in 

/etc/modules-load.d/*.conf
/run/modules-load.d/*.conf
/usr/lib/modules-load.d/*.conf

according to 'man modules-load.d'

modprobe uses conf files in 

/lib/modprobe.d/*.conf
/etc/modprobe.d/*.conf
/run/modprobe.d/*.conf

according to 'man modprobe.d'.

I'm not sure what other software you are thinking about.

We put our files in /usr and /lib (read-only on our products) and it is possible to handle that with the current kernel.bbclass and kernel-modules.bbclass.  But when we want to use the usrmerge feature it requires a rather ugly hack to split_module_packages.
Comment 3 Randy MacLeod 2019-10-10 15:10:12 UTC
Ola, Are you able to send a patch?
Comment 4 Ola Nilsson 2019-10-11 10:38:04 UTC
I guess it's too late for the zeus release, so there is no hurry?
Then yes, I can prepare a patch. Eventually :)
Comment 5 Randy MacLeod 2019-10-11 13:52:26 UTC
Thanks Ola. It's possible that the change could be backported to zeus if it's not too disruptive or risky.
Comment 6 Randy MacLeod 2021-10-14 15:12:59 UTC
Any update Ola?
Comment 7 Ola Nilsson 2021-10-15 10:57:35 UTC
Sorry, there is always something more pressing to do...
I still want to add this functionality.
Comment 8 Jose Quaresma 2023-06-20 08:41:58 UTC
I have submit a patch for this [2] but because it looks like busybox don't support other path than /etc [1] so the implementation only relocate the default /etc location when systemd is enabled [3].

[1] https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
[2] https://lists.openembedded.org/g/openembedded-core/message/177186
[3] https://lists.openembedded.org/g/openembedded-core/message/183123
Comment 9 Jose Quaresma 2023-07-04 10:43:01 UTC
This bug should be fixed with [1] and [2] also adds systemd configurations.

[1] https://git.yoctoproject.org/poky/commit/?id=303421dce02fec67daab0dc86d85e11963d5741f

[2] https://lists.openembedded.org/g/openembedded-core/message/183823
Comment 10 Jose Quaresma 2023-07-10 16:40:44 UTC
This bug should be fixed with [1] and [2] also adds systemd configurations.

[1] https://git.yoctoproject.org/poky/commit/?id=303421dce02fec67daab0dc86d85e11963d5741f

[2] https://git.yoctoproject.org/poky/commit/?id=6704606b351c4d570cce96ee9afb38c565829790