Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific

2023-06-19 Thread Jose Quaresma
Peter Kjellerstedt  escreveu no dia sexta,
16/06/2023 à(s) 17:03:

> Did anything ever become of this? This is a change that at least we would
> appreciate.
>

Hi Pete,

V2 send with your suggestions:
https://lists.openembedded.org/g/openembedded-core/message/183123

Thanks for the remainder

Jose


>
>
> //Peter
>
>
>
> *From:* Jose Quaresma 
> *Sent:* den 17 februari 2023 17:53
> *To:* Peter Kjellerstedt 
> *Cc:* Ola x Nilsson ; Otavio Salvador <
> otavio.salva...@ossystems.com.br>; Jose Quaresma <
> jose.quare...@foundries.io>; openembedded-core@lists.openembedded.org
> *Subject:* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload
> and probeconf distribution specific
>
>
>
> Hi Peter,
>
>
>
> Peter Kjellerstedt  escreveu no dia sexta,
> 17/02/2023 à(s) 10:52:
>
> Wouldn’t the easiest solution be to define two variables:
>
> modulesloaddir ??= "${sysconfdir}/modules-load.d "
> modprobedir ??= "${sysconfdir}/modprobe.d "
>
> then in init-manager-systemd.inc you could change them to:
>
> modulesloaddir ?= "${nonarch_libdir}/modules-load.d"
> modprobedir ?= "${nonarch_base_libdir}/modprobe.d"
>
> Using a single prefix variable doesn’t really work since they need
> different paths in the latter case.
>
>
> I was thinking of something similar to what you suggest but only on the
> class:
>
> modulesloaddir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
> '${nonarch_libdir}', '${sysconfdir}', d)}"
> modprobedir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
> '${nonarch_base_libdir}', '${sysconfdir}', d)}"
>
>
>
> Anyway your approach looks good to me too so i'll use yours, hope I can
> test it next week.
>
>
>
> Jose
>
>
>
>
>
> //Peter
>
>
>
> *From:* openembedded-core@lists.openembedded.org <
> openembedded-core@lists.openembedded.org> *On Behalf Of *Jose Quaresma
> *Sent:* den 16 februari 2023 12:08
> *To:* Ola x Nilsson 
> *Cc:* Otavio Salvador ; Jose Quaresma <
> jose.quare...@foundries.io>; openembedded-core@lists.openembedded.org
> *Subject:* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload
> and probeconf distribution specific
>
>
>
>
>
> Ola x Nilsson  escreveu no dia quinta, 16/02/2023
> à(s) 08:22:
>
>
> On Wed, Feb 15 2023, Jose Quaresma wrote:
>
> > Hi Octavio,
> >
> > Otavio Salvador  otavio.salva...@ossystems.com.br>> escreveu no dia quarta, 15/02/2023
> à(s) 13:25:
> > Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> > mailto:quaresma.j...@gmail.com>> escreveu:
> >>
> >> 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://www.freedesktop.org/software/systemd/man/modules-load.d.html
> >> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
> <https://www.man7.org/linux/man-pages/man5/modprobe.d.5.html>
> >>
> >> Signed-off-by: Jose Quaresma  jose.quare...@foundries.io>>
> >
> >
> > Did you validate this using busybox only? Using sysv and busybox need
> > to be validated as well.
> >
> > Please drop this patch series because it doesn work with busybox.
> >
> > Looks like busybox don't support other path than /etc:
> >
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
> >
> > So I need to implement this in another way, maybe relocating the files
> from /etc only when systemd is enabled.
> >
> > Thanks for raising the issue.
> >
> > Jose
> >
>
> Hi,
>
> Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
> as well.
>
> --
> Ola x Nilsson
>
>
> Hi Ola,
>
> We use usermerge too but I think the weird issue here is we need to have
> this distribution specified only for systemd
>
> excluding busybox and sysint as pointed out by Octavio.
>
> The other solution is adding support on busybox and sysint if needed.
>
> My idea is add a prefix variable with path "/etc" by default but
> conditioned by systemd DISTRO_FEATURES
>
> Thanks for the bug hint.
>
> --
>
> Best regards,
>
>
> José Quaresma
>
>
>
>
> --
>
> Best regards,
>
>
> José Quaresma
>


-- 
Best regards,

José Quaresma

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183124): 
https://lists.openembedded.org/g/openembedded-core/message/183124
Mute This Topic: https://lists.openembedded.org/mt/96981851/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific

2023-06-16 Thread Peter Kjellerstedt
Did anything ever become of this? This is a change that at least we would 
appreciate.

//Peter

From: Jose Quaresma 
Sent: den 17 februari 2023 17:53
To: Peter Kjellerstedt 
Cc: Ola x Nilsson ; Otavio Salvador 
; Jose Quaresma ; 
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and 
probeconf distribution specific

Hi Peter,

Peter Kjellerstedt 
mailto:peter.kjellerst...@axis.com>> escreveu no 
dia sexta, 17/02/2023 à(s) 10:52:
Wouldn’t the easiest solution be to define two variables:
modulesloaddir ??= "${sysconfdir}/modules-load.d "
modprobedir ??= "${sysconfdir}/modprobe.d "
then in init-manager-systemd.inc you could change them to:
modulesloaddir ?= "${nonarch_libdir}/modules-load.d"
modprobedir ?= "${nonarch_base_libdir}/modprobe.d"
Using a single prefix variable doesn’t really work since they need different 
paths in the latter case.

I was thinking of something similar to what you suggest but only on the class:

modulesloaddir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 
'${nonarch_libdir}', '${sysconfdir}', 
d)}<mailto:$%7b@bb.utils.contains('DISTRO_FEATURES',%20'systemd',%20'$%7bnonarch_libdir%7d',%20'$%7bsysconfdir%7d',%20d)%7d>"
modprobedir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 
'${nonarch_base_libdir}', '${sysconfdir}', 
d)}<mailto:$%7b@bb.utils.contains('DISTRO_FEATURES',%20'systemd',%20'$%7bnonarch_base_libdir%7d',%20'$%7bsysconfdir%7d',%20d)%7d>"

Anyway your approach looks good to me too so i'll use yours, hope I can test it 
next week.

Jose


//Peter

From: 
openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>
 
mailto:openembedded-core@lists.openembedded.org>>
 On Behalf Of Jose Quaresma
Sent: den 16 februari 2023 12:08
To: Ola x Nilsson mailto:ola.x.nils...@axis.com>>
Cc: Otavio Salvador 
mailto:otavio.salva...@ossystems.com.br>>; 
Jose Quaresma mailto:jose.quare...@foundries.io>>; 
openembedded-core@lists.openembedded.org<mailto:openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and 
probeconf distribution specific


Ola x Nilsson mailto:ola.x.nils...@axis.com>> escreveu 
no dia quinta, 16/02/2023 à(s) 08:22:

On Wed, Feb 15 2023, Jose Quaresma wrote:

> Hi Octavio,
>
> Otavio Salvador 
> mailto:otavio.salva...@ossystems.com.br><mailto:otavio.salva...@ossystems.com.br<mailto:otavio.salva...@ossystems.com.br>>>
>  escreveu no dia quarta, 15/02/2023 à(s) 13:25:
> Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> mailto:quaresma.j...@gmail.com><mailto:quaresma.j...@gmail.com<mailto:quaresma.j...@gmail.com>>>
>  escreveu:
>>
>> 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://www.freedesktop.org/software/systemd/man/modules-load.d.html
>> [2] 
>> https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html<https://www.man7.org/linux/man-pages/man5/modprobe.d.5.html>
>>
>> Signed-off-by: Jose Quaresma 
>> mailto:jose.quare...@foundries.io><mailto:jose.quare...@foundries.io<mailto:jose.quare...@foundries.io>>>
>
>
> Did you validate this using busybox only? Using sysv and busybox need
> to be validated as well.
>
> Please drop this patch series because it doesn work with busybox.
>
> Looks like busybox don't support other path than /etc:
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
>
> So I need to implement this in another way, maybe relocating the files from 
> /etc only when systemd is enabled.
>
> Thanks for raising the issue.
>
> Jose
>

Hi,

Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
as well.

--
Ola x Nilsson

Hi Ola,

We use usermerge too but I think the weird issue here is we need to have this 
distribution specified only for systemd
excluding busybox and sysint as pointed out by Octavio.
The other solution is adding support on busybox and sysint if needed.

My idea is add a prefix variable with path "/etc" by default but conditioned by 
systemd DISTRO_FEATURES

Thanks for the bug hint.
--
Best regards,

José Quaresma


--
Best regards,

José Quaresma

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183047): 
https://lists.openembedded.org/g/openembedded-core/message/183047
Mute This Topic: https://lists.openembedded.org/mt/96981851/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific

2023-02-17 Thread Jose Quaresma
Hi Peter,

Peter Kjellerstedt  escreveu no dia sexta,
17/02/2023 à(s) 10:52:

> Wouldn’t the easiest solution be to define two variables:
>
>
>
> modulesloaddir ??= "${sysconfdir}/modules-load.d "
>
> modprobedir ??= "${sysconfdir}/modprobe.d "
>
>
>
> then in init-manager-systemd.inc you could change them to:
>
>
>
> modulesloaddir ?= "${nonarch_libdir}/modules-load.d"
>
> modprobedir ?= "${nonarch_base_libdir}/modprobe.d"
>
>
>
> Using a single prefix variable doesn’t really work since they need
> different paths in the latter case.
>

I was thinking of something similar to what you suggest but only on the
class:

modulesloaddir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
'${nonarch_libdir}', '${sysconfdir}', d)}"
modprobedir ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd',
'${nonarch_base_libdir}', '${sysconfdir}', d)}"

Anyway your approach looks good to me too so i'll use yours, hope I can
test it next week.

Jose


>
>
> //Peter
>
>
>
> *From:* openembedded-core@lists.openembedded.org <
> openembedded-core@lists.openembedded.org> *On Behalf Of *Jose Quaresma
> *Sent:* den 16 februari 2023 12:08
> *To:* Ola x Nilsson 
> *Cc:* Otavio Salvador ; Jose Quaresma <
> jose.quare...@foundries.io>; openembedded-core@lists.openembedded.org
> *Subject:* Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload
> and probeconf distribution specific
>
>
>
>
>
> Ola x Nilsson  escreveu no dia quinta, 16/02/2023
> à(s) 08:22:
>
>
> On Wed, Feb 15 2023, Jose Quaresma wrote:
>
> > Hi Octavio,
> >
> > Otavio Salvador  otavio.salva...@ossystems.com.br>> escreveu no dia quarta, 15/02/2023
> à(s) 13:25:
> > Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> > mailto:quaresma.j...@gmail.com>> escreveu:
> >>
> >> 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://www.freedesktop.org/software/systemd/man/modules-load.d.html
> >> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
> <https://www.man7.org/linux/man-pages/man5/modprobe.d.5.html>
> >>
> >> Signed-off-by: Jose Quaresma  jose.quare...@foundries.io>>
> >
> >
> > Did you validate this using busybox only? Using sysv and busybox need
> > to be validated as well.
> >
> > Please drop this patch series because it doesn work with busybox.
> >
> > Looks like busybox don't support other path than /etc:
> >
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
> >
> > So I need to implement this in another way, maybe relocating the files
> from /etc only when systemd is enabled.
> >
> > Thanks for raising the issue.
> >
> > Jose
> >
>
> Hi,
>
> Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
> as well.
>
> --
> Ola x Nilsson
>
>
> Hi Ola,
>
> We use usermerge too but I think the weird issue here is we need to have
> this distribution specified only for systemd
>
> excluding busybox and sysint as pointed out by Octavio.
>
> The other solution is adding support on busybox and sysint if needed.
>
> My idea is add a prefix variable with path "/etc" by default but
> conditioned by systemd DISTRO_FEATURES
>
> Thanks for the bug hint.
>
> --
>
> Best regards,
>
>
> José Quaresma
>


-- 
Best regards,

José Quaresma

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177312): 
https://lists.openembedded.org/g/openembedded-core/message/177312
Mute This Topic: https://lists.openembedded.org/mt/96981851/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific

2023-02-17 Thread Peter Kjellerstedt
Wouldn’t the easiest solution be to define two variables:

modulesloaddir ??= "${sysconfdir}/modules-load.d "
modprobedir ??= "${sysconfdir}/modprobe.d "

then in init-manager-systemd.inc you could change them to:

modulesloaddir ?= "${nonarch_libdir}/modules-load.d"
modprobedir ?= "${nonarch_base_libdir}/modprobe.d"

Using a single prefix variable doesn’t really work since they need different 
paths in the latter case.

//Peter

From: openembedded-core@lists.openembedded.org 
 On Behalf Of Jose Quaresma
Sent: den 16 februari 2023 12:08
To: Ola x Nilsson 
Cc: Otavio Salvador ; Jose Quaresma 
; openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and 
probeconf distribution specific


Ola x Nilsson mailto:ola.x.nils...@axis.com>> escreveu 
no dia quinta, 16/02/2023 à(s) 08:22:

On Wed, Feb 15 2023, Jose Quaresma wrote:

> Hi Octavio,
>
> Otavio Salvador 
> mailto:otavio.salva...@ossystems.com.br><mailto:otavio.salva...@ossystems.com.br<mailto:otavio.salva...@ossystems.com.br>>>
>  escreveu no dia quarta, 15/02/2023 à(s) 13:25:
> Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> mailto:quaresma.j...@gmail.com><mailto:quaresma.j...@gmail.com<mailto:quaresma.j...@gmail.com>>>
>  escreveu:
>>
>> 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://www.freedesktop.org/software/systemd/man/modules-load.d.html
>> [2] 
>> https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html<https://www.man7.org/linux/man-pages/man5/modprobe.d.5.html>
>>
>> Signed-off-by: Jose Quaresma 
>> mailto:jose.quare...@foundries.io><mailto:jose.quare...@foundries.io<mailto:jose.quare...@foundries.io>>>
>
>
> Did you validate this using busybox only? Using sysv and busybox need
> to be validated as well.
>
> Please drop this patch series because it doesn work with busybox.
>
> Looks like busybox don't support other path than /etc:
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
>
> So I need to implement this in another way, maybe relocating the files from 
> /etc only when systemd is enabled.
>
> Thanks for raising the issue.
>
> Jose
>

Hi,

Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
as well.

--
Ola x Nilsson

Hi Ola,

We use usermerge too but I think the weird issue here is we need to have this 
distribution specified only for systemd
excluding busybox and sysint as pointed out by Octavio.
The other solution is adding support on busybox and sysint if needed.

My idea is add a prefix variable with path "/etc" by default but conditioned by 
systemd DISTRO_FEATURES

Thanks for the bug hint.
--
Best regards,

José Quaresma

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177308): 
https://lists.openembedded.org/g/openembedded-core/message/177308
Mute This Topic: https://lists.openembedded.org/mt/96981851/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific

2023-02-16 Thread Jose Quaresma
Ola x Nilsson  escreveu no dia quinta, 16/02/2023
à(s) 08:22:

>
> On Wed, Feb 15 2023, Jose Quaresma wrote:
>
> > Hi Octavio,
> >
> > Otavio Salvador  otavio.salva...@ossystems.com.br>> escreveu no dia quarta, 15/02/2023
> à(s) 13:25:
> > Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> > mailto:quaresma.j...@gmail.com>> escreveu:
> >>
> >> 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://www.freedesktop.org/software/systemd/man/modules-load.d.html
> >> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
> >>
> >> Signed-off-by: Jose Quaresma  jose.quare...@foundries.io>>
> >
> >
> > Did you validate this using busybox only? Using sysv and busybox need
> > to be validated as well.
> >
> > Please drop this patch series because it doesn work with busybox.
> >
> > Looks like busybox don't support other path than /etc:
> >
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
> >
> > So I need to implement this in another way, maybe relocating the files
> from /etc only when systemd is enabled.
> >
> > Thanks for raising the issue.
> >
> > Jose
> >
>
> Hi,
>
> Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
> as well.
>
> --
> Ola x Nilsson
>

Hi Ola,

We use usermerge too but I think the weird issue here is we need to have
this distribution specified only for systemd
excluding busybox and sysint as pointed out by Octavio.
The other solution is adding support on busybox and sysint if needed.

My idea is add a prefix variable with path "/etc" by default but
conditioned by systemd DISTRO_FEATURES

Thanks for the bug hint.

-- 
Best regards,

José Quaresma

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177283): 
https://lists.openembedded.org/g/openembedded-core/message/177283
Mute This Topic: https://lists.openembedded.org/mt/96981851/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific

2023-02-16 Thread Ola x Nilsson

On Wed, Feb 15 2023, Jose Quaresma wrote:

> Hi Octavio,
>
> Otavio Salvador 
> mailto:otavio.salva...@ossystems.com.br>> 
> escreveu no dia quarta, 15/02/2023 à(s) 13:25:
> Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
> mailto:quaresma.j...@gmail.com>> escreveu:
>>
>> 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://www.freedesktop.org/software/systemd/man/modules-load.d.html
>> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
>>
>> Signed-off-by: Jose Quaresma 
>> mailto:jose.quare...@foundries.io>>
>
>
> Did you validate this using busybox only? Using sysv and busybox need
> to be validated as well.
>
> Please drop this patch series because it doesn work with busybox.
>
> Looks like busybox don't support other path than /etc:
> https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658
>
> So I need to implement this in another way, maybe relocating the files from 
> /etc only when systemd is enabled.
>
> Thanks for raising the issue.
>
> Jose
>

Hi,

Please consider https://bugzilla.yoctoproject.org/show_bug.cgi?id=12212
as well.

-- 
Ola x Nilsson

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177275): 
https://lists.openembedded.org/g/openembedded-core/message/177275
Mute This Topic: https://lists.openembedded.org/mt/96981851/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific

2023-02-15 Thread Jose Quaresma
Hi Octavio,

Otavio Salvador  escreveu no dia quarta,
15/02/2023 à(s) 13:25:

> Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
>  escreveu:
> >
> > 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://www.freedesktop.org/software/systemd/man/modules-load.d.html
> > [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
> >
> > Signed-off-by: Jose Quaresma 
>
>
> Did you validate this using busybox only? Using sysv and busybox need
> to be validated as well.
>

Please drop this patch series because it doesn work with busybox.

Looks like busybox don't support other path than /etc:
https://git.busybox.net/busybox/tree/modutils/modprobe.c?id=669c40ed8ebf480c95ce36135104e474e361a7e6#n658

So I need to implement this in another way, maybe relocating the files from
/etc only when systemd is enabled.

Thanks for raising the issue.

Jose


> --
> Otavio Salvador O.S. Systems
> http://www.ossystems.com.brhttp://code.ossystems.com.br
> Mobile: +55 (53) 9 9981-7854  Mobile: +1 (347) 903-9750
>


-- 
Best regards,

José Quaresma

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177202): 
https://lists.openembedded.org/g/openembedded-core/message/177202
Mute This Topic: https://lists.openembedded.org/mt/96981851/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific

2023-02-15 Thread Otavio Salvador
Em qua., 15 de fev. de 2023 às 10:01, Jose Quaresma
 escreveu:
>
> 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://www.freedesktop.org/software/systemd/man/modules-load.d.html
> [2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html
>
> Signed-off-by: Jose Quaresma 


Did you validate this using busybox only? Using sysv and busybox need
to be validated as well.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854  Mobile: +1 (347) 903-9750

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#177189): 
https://lists.openembedded.org/g/openembedded-core/message/177189
Mute This Topic: https://lists.openembedded.org/mt/96981851/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 1/2] kernel-module-split: make autoload and probeconf distribution specific

2023-02-15 Thread Jose Quaresma
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://www.freedesktop.org/software/systemd/man/modules-load.d.html
[2] https://www.man7.org/linux/man-pages//man5/modprobe.d.5.html

Signed-off-by: Jose Quaresma 
---
 .../kernel-module-split.bbclass   | 30 +--
 1 file changed, 14 insertions(+), 16 deletions(-)

diff --git a/meta/classes-recipe/kernel-module-split.bbclass 
b/meta/classes-recipe/kernel-module-split.bbclass
index 50882c31a7..b70650888a 100644
--- a/meta/classes-recipe/kernel-module-split.bbclass
+++ b/meta/classes-recipe/kernel-module-split.bbclass
@@ -31,7 +31,8 @@ fi
 PACKAGE_WRITE_DEPS += "kmod-native depmodwrapper-cross"
 
 do_install:append() {
-   install -d ${D}${sysconfdir}/modules-load.d/ 
${D}${sysconfdir}/modprobe.d/
+   install -d ${D}${libdir}/modules-load.d
+   install -d ${D}${nonarch_base_libdir}/modprobe.d
 }
 
 KERNEL_SPLIT_MODULES ?= "1"
@@ -93,8 +94,9 @@ python split_kernel_module_packages () {
 
 dvar = d.getVar('PKGD')
 
-# If autoloading is requested, output /etc/modules-load.d/.conf 
and append
+# If autoloading is requested, output 
${libdir}/modules-load.d/.conf and append
 # appropriate modprobe commands to the postinst
+autoloadpath = '%s/modules-load.d/%s.conf' % (d.getVar('libdir'), 
basename)
 autoloadlist = (d.getVar("KERNEL_MODULE_AUTOLOAD") or "").split()
 autoload = d.getVar('module_autoload_%s' % basename)
 if autoload and autoload == basename:
@@ -102,8 +104,7 @@ python split_kernel_module_packages () {
 if autoload and basename not in autoloadlist:
 bb.warn("module_autoload_%s is defined but '%s' isn't included in 
KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename))
 if basename in autoloadlist:
-name = '%s/etc/modules-load.d/%s.conf' % (dvar, basename)
-f = open(name, 'w')
+f = open("%s%s" % (dvar, autoloadpath), 'w')
 if autoload:
 for m in autoload.split():
 f.write('%s\n' % m)
@@ -117,23 +118,19 @@ python split_kernel_module_packages () {
 d.setVar('pkg_postinst:%s' % pkg, postinst)
 
 # Write out any modconf fragment
+modconfpath = '%s/modprobe.d/%s.conf' % 
(d.getVar('nonarch_base_libdir'), basename)
 modconflist = (d.getVar("KERNEL_MODULE_PROBECONF") or "").split()
 modconf = d.getVar('module_conf_%s' % basename)
 if modconf and basename in modconflist:
-name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename)
-f = open(name, 'w')
+f = open("%s%s" % (dvar, modconfpath), 'w')
 f.write("%s\n" % modconf)
 f.close()
 elif modconf:
 bb.error("Please ensure module %s is listed in 
KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename))
 
-files = d.getVar('FILES:%s' % pkg)
-files = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % 
(files, basename, basename)
-d.setVar('FILES:%s' % pkg, files)
-
-conffiles = d.getVar('CONFFILES:%s' % pkg)
-conffiles = "%s /etc/modules-load.d/%s.conf /etc/modprobe.d/%s.conf" % 
(conffiles, basename, basename)
-d.setVar('CONFFILES:%s' % pkg, conffiles)
+appendfiles = " %s %s" % (autoloadpath, modconfpath)
+d.appendVar('FILES:%s' % pkg, appendfiles)
+d.appendVar('CONFFILES:%s' % pkg, appendfiles)
 
 if "description" in vals:
 old_desc = d.getVar('DESCRIPTION:' + pkg) or ""
@@ -167,10 +164,11 @@ python split_kernel_module_packages () {
 splitmods = d.getVar('KERNEL_SPLIT_MODULES')
 postinst = d.getVar('pkg_postinst:modules')
 postrm = d.getVar('pkg_postrm:modules')
+nonarch_base_libdir = d.getVar("nonarch_base_libdir")
+libdir = d.getVar("libdir")
 
 if splitmods != '1':
-etcdir = d.getVar('sysconfdir')
-d.appendVar('FILES:' + metapkg, '%s/modules-load.d/ %s/modprobe.d/ 
%s/modules/' % (etcdir, etcdir, d.getVar("nonarch_base_libdir")))
+d.appendVar('FILES:' + metapkg, '%s/modules-load.d/ %s/modprobe.d/ 
%s/modules/' % (libdir, nonarch_base_libdir, nonarch_base_libdir))
 d.appendVar('pkg_postinst:%s' % metapkg, postinst)
 d.prependVar('pkg_postrm:%s' % metapkg, postrm);
 return
@@ -189,7 +187,7 @@ python split_kernel_module_packages () {
 # avoid warnings. removedirs only raises an OSError if an empty
 # directory cannot be removed.
 dvar = d.getVar('PKGD')
-for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % 
(dvar), "%s/etc" % (dvar)]:
+for dir in ["%s%s/modprobe.d" % (dvar, nonarch_base_libdir), 
"%s%s/modules-load.d" % (dvar,