Using RDEPENDS or RRECOMMENDS inside a kernel module recipe

2 messages, 2 authors, 2021-06-26 · open the first message on its own page

Using RDEPENDS or RRECOMMENDS inside a kernel module recipe

From: Mike Looijmans <hidden>
Date: 2021-06-23 13:22:59

Simple question: How can I make an external kernel module depend on its 
firmware?

Suppose I have a recipe "kernel-module-something.bb"

Now this module needs firmware to work so the recipe basically contains 
this:

inherit module

SRC_URI = "..."

RRECOMMENDS_${PN} += "something-firmware"


What I would expect is that if I add "kernel-module-something" to the 
image, that "something-firmware" also gets installed. This however does 
not happen.

The "something-firmware" package is being built, but not installed, even 
though "kernel-module-something" is present.

I think the reason is that there are two packages created, one meta 
packages called "kernel-module-something" that indeed contains the 
dependency on the "something-firmware" but does not contain the actual 
kernel module.

There's a second package named "kernel-module-something-5.4.0-blabla"  
(where 5.4.0-blabla appears to be the kernel version) that contains the 
actual kernel module, but there's no recommendation in this package at all.


How do I properly make it so that installing "kernel-module-something" 
will also install "something-firmware"?


-- 
Mike Looijmans


Met vriendelijke groet / kind regards,

Mike Looijmans
System Expert


TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: mike.looijmans@topicproducts.com
W: www.topic.nl

Please consider the environment before printing this e-mail

Re: [OE-core] Using RDEPENDS or RRECOMMENDS inside a kernel module recipe

From: Richard Purdie <hidden>
Date: 2021-06-26 14:48:58

On Wed, 2021-06-23 at 15:22 +0200, Mike Looijmans wrote:
Simple question: How can I make an external kernel module depend on its 
firmware?

Suppose I have a recipe "kernel-module-something.bb"

Now this module needs firmware to work so the recipe basically contains 
this:

inherit module

SRC_URI = "..."

RRECOMMENDS_${PN} += "something-firmware"


What I would expect is that if I add "kernel-module-something" to the 
image, that "something-firmware" also gets installed. This however does 
not happen.

The "something-firmware" package is being built, but not installed, even 
though "kernel-module-something" is present.

I think the reason is that there are two packages created, one meta 
packages called "kernel-module-something" that indeed contains the 
dependency on the "something-firmware" but does not contain the actual 
kernel module.

There's a second package named "kernel-module-something-5.4.0-blabla"  
(where 5.4.0-blabla appears to be the kernel version) that contains the 
actual kernel module, but there's no recommendation in this package at all.


How do I properly make it so that installing "kernel-module-something" 
will also install "something-firmware"?
I think there is something broken in the external module code. It should
be renaming the module to include the kernel version (for parallel kernel
installation from memory). It sounds like the rename is only partially
taking effect for external modules for some reason...

Certainly for the kernel itself, the modules created are just of the form
with the version in, the others are not created.

Cheers,

Richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help