Commit Graph

8 Commits

Author SHA1 Message Date
Jose Quaresma
204d908861 kernel-module-split add systemd modulesloaddir and modprobedir config
Because busybox doesn't support other path than /etc [1] we can't
change the default path unconditionally so change it only for systemd.

The modules-load.d [2] - Configure kernel modules to load at boot
should install their configuration files in /usr/lib/modules-load.d.

The modprobe.d [3] - Configuration directory for modprobe
should install their configuration files in /lib/modprobe.d

[1] https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
[2] https://man7.org/linux/man-pages/man5/modules-load.d.5.html
[3] https://man7.org/linux/man-pages/man5/modprobe.d.5.html

[YOCTO #12212] https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212

(From OE-Core rev: 174b446b7c8167934b13ec679407093924d324e3)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 075c309bd28bc8e19a82569a2e75da14fa5795dd)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-01 06:17:28 -10:00
Jose Quaresma
4c02657a44 kernel-module-split: make autoload and probeconf distribution specific
The modules-load.d [1] - Configure kernel modules to load at boot
should install their configuration files in /usr/lib/modules-load.d.

The modprobe.d [2] - Configuration directory for modprobe
should install their configuration files in /lib/modprobe.d

[1] https://man7.org/linux/man-pages/man5/modules-load.d.5.html
[2] https://man7.org/linux/man-pages/man5/modprobe.d.5.html

[YOCTO #12212] https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212

CC: Ola x Nilsson <Ola.x.Nilsson@axis.com>
CC: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
(From OE-Core rev: 6725922eadd093e8ee6a41898b596b5563eab0f3)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 347830e67c5ad72b4da165d644e3add69c20acb8)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-20 12:10:40 -10:00
Jose Quaresma
fcd67ff9cd kernel-module-split: use context manager to open files
(From OE-Core rev: 8fbf05a91667a054083b45632c1f8afb6b8e1367)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit fc9c9471952042395bb405e7f6cf507bb2b72f31)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-20 12:10:40 -10:00
Jose Quaresma
4baf7c63c5 kernel-module-split: install config modules directories only when they are needed
Instaed of allways create the directories and removing it at the if they are
not used, we can just do it when there are modules configuration to be created.
So the best thing to do is install the directories only when necessary.

(From OE-Core rev: 455baf41550431c22047fe718c8eaae71924b23f)

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 71460993f350bca3d5a22115fd5551696f955c9f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-07-20 12:10:40 -10:00
Peter Kjellerstedt
d5668a7fd4 recipes, classes: Avoid adding extra whitespace to PACKAGESPLITFUNCS
This is a follow-up to commit 846ff49465 to remove the extra whitespace
that is no longer needed after converting :append and :prepend to += and
=+.

(From OE-Core rev: 5a38be49e451c9f9d973b10a33c3972507f7b18a)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-12 23:08:58 +00:00
Richard Purdie
d32dc08a77 recipes/classes: Drop prepend/append usage with PACKAGESPLITFUNCS
As far as I can tell, none of these uses of PACKAGESPLITFUNCS need append/prepend
operators, the standard += and =+ can work just fine. Since OE-Core is copied a lot,
use the preferred syntax which is also simpler to parse and change.

(From OE-Core rev: 846ff49465337dddd75a83161f41f48117f6571c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-05 11:52:50 +00:00
Andrei Gherzan
475639ba49 kernel-module-split.bbclass: Pass the kernel package name to depmodwrapper
This makes sure that the postrm script it using the right kernel paths.

(From OE-Core rev: f7b191f80d4da740089a301062e7ac0b82d1d242)

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-09-13 10:36:50 +01:00
Richard Purdie
fd1517e2b5 classes: Update classes to match new bitbake class scope functionality
Move classes to classes-global or classes-recipe as appropriate to take
advantage of new bitbake functionality to check class scope/usage.

(From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 15:27:17 +01:00