From: Claudius Heine <ch@denx.de>
To: "Kanagarajan, Vijaikumar" <vijaikumar.kanagarajan@siemens.com>,
"isar-users@googlegroups.com" <isar-users@googlegroups.com>,
"Vijaikumar_Kanagarajan@mentor.com"
<Vijaikumar_Kanagarajan@mentor.com>
Subject: Re: [RFC PATCH 1/1] linux-module: append local files path to FILSPATH
Date: Tue, 4 Jul 2023 09:51:24 +0200 [thread overview]
Message-ID: <7a618f39-d59d-a60f-ba69-ef4af43369bd@denx.de> (raw)
In-Reply-To: <PUZPR06MB545058AAC52C72C48D00D389992AA@PUZPR06MB5450.apcprd06.prod.outlook.com>
Hi Vijai,
On 2023-06-30 13:36, 'Kanagarajan, Vijaikumar' via isar-users wrote:
> On 2023-06-29 15:21, Claudius Heine wrote:
>> FILESEXTRAPATHS is meant to allow bbappend files to overwrite files
>> from their recipe. For this reason the 'normal' patter in bbappend
>> files is to prepend the local file path to FILESEXTRAPATHS, which
>> results in files from the local file path to be preferred over files
>> from the original recipe, or other, lower prioritized bbappend files.
>>
>> The `module.inc` file is meant to be included by other recipes (`.bb`)
>> files. So it should still allow the recipe to overwrite files its
>> files that where added via the normal recipes `FILESPATH` search path.
>>
>> If `module.inc` uses `FILESEXTRAPATHS:prepend` to add its local file
>> path to `FILESPATH`, then the recipe, that includes the `module.inc`
>> would have to use `FILESEXTRAPATHS:prepend` as well, after including
>> the `module.inc` file in order to overwrite the files from the
>> `module.inc` file. However this is a workaround of the issue.
>>
>> `module.inc` should append its local file search path to `FILESPATH`,
>> so that it allows other recipes to overwrite any file from it, without
>> requiring an additional workaround.
>
> I don't see a better way than this.
> We have an inc file which exposes a default dir. When we build a recipe the default FILESPATH is populated and now we have no mechanism to override those unless we do another FILESEXTRAPATHS:prepend after the include.
> I assume this should be the case with other includes as well.
>
> Acked-by: Vijai Kumar K <vijaikumar.kanagarajan@siemens.com>
>
> Also wondering what kind of limitation was there in the current debian/ contents that you must override?
Thanks for the ack. I will prepare a patchset that uses this scheme for
the other FILESEXTRAPATHS in .inc files.
The issue with the debian files of modules.inc (and the split in isar
between bitbake recipes and debian source packages) is that it contains
the 'rules' file, which specifies how the Makefile of the project is
executed. That means if the developer of the kernel module uses a
different interface than `make -C $KDIR M=$(pwd) modules` to build the
modules, then the `rules` file needs to be changed. This cannot be done
by just appending to the recipe.
Sure, it would be possible to apply a patch to the source modules first,
so that the same `rules` file can be used, but depending on how complex
the build process of the out-of-tree kernel module is, this might be
more complex, and less-maintainable than just replacing the `rules` file.
In my case it was about the out-of-tree nvidia tegra kernel modules. In
some cases, they have creative ideas on how to do things.
regards,
Claudius
>
> Thanks,
> Vijai Kumar K
prev parent reply other threads:[~2023-07-04 7:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 13:21 [RFC PATCH 0/1] FILESEXTRAPATHS in .inc files Claudius Heine
2023-06-29 13:21 ` [RFC PATCH 1/1] linux-module: append local files path to FILSPATH Claudius Heine
2023-06-29 13:43 ` Claudius Heine
2023-06-30 11:36 ` Kanagarajan, Vijaikumar
2023-07-04 7:51 ` Claudius Heine [this message]
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=7a618f39-d59d-a60f-ba69-ef4af43369bd@denx.de \
--to=ch@denx.de \
--cc=Vijaikumar_Kanagarajan@mentor.com \
--cc=isar-users@googlegroups.com \
--cc=vijaikumar.kanagarajan@siemens.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox