From: Quentin Schulz <quentin.schulz@cherry.de>
To: yishai1999@gmail.com, yocto@lists.yoctoproject.org
Subject: Re: [yocto] Out-of-tree Kernel Modules
Date: Wed, 30 Oct 2024 16:01:20 +0100 [thread overview]
Message-ID: <b91237f1-539c-42cd-8223-5ac4ef471f9b@cherry.de> (raw)
In-Reply-To: <21197.1730300069131332219@lists.yoctoproject.org>
Hi Yishai,
On 10/30/24 3:54 PM, Yishai Jaffe via Lists.Yoctoproject.Org wrote:
> You don't often get email from yishai1999=gmail.com@lists.yoctoproject.org. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
> Thanks Quentin,
> Changing the include to uapi/linux/sched/types.h solved the issue.
> But just so I'm clear on this - Can you explain when I should use uapi headers vs when to use the regular linux/xxx headers?
>
You should include the header where the structure is defined.
The "issue" in Yocto is that the headers aren't coming from your kernel
sources but from a generic linux kernel header recipe, and this is made
on purpose. The generic linux kernel header recipe is at 6.6 in
Scarthgap. Styhead has 6.10. The structure is defined in a different
header in 6.6 and in 6.7+ (including 6.10), so your out-of-tree module
needs the path from 6.6 in order to compile in Scarthgap, but will need
another path from 6.7+ in order to compile in Styhead.
You can handle that via #if in your code, if you need the exact same
source code to build on different Yocto/kernel versions. That is the
cross to bear when one develops out of tree kernel modules sadly.
Cheers,
Quentin
next prev parent reply other threads:[~2024-10-30 15:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 12:58 Out-of-tree Kernel Modules Yishai Jaffe
2024-10-30 13:25 ` [yocto] " Quentin Schulz
2024-10-30 14:54 ` Yishai Jaffe
2024-10-30 15:01 ` Quentin Schulz [this message]
2024-10-30 19:01 ` Yishai Jaffe
2024-10-31 7:33 ` Yoann Congal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b91237f1-539c-42cd-8223-5ac4ef471f9b@cherry.de \
--to=quentin.schulz@cherry.de \
--cc=yishai1999@gmail.com \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.