Skip to content

Drop mxm-mwifiex-setup recipe#998

Merged
quaresmajose merged 4 commits intofoundriesio:main-nextfrom
quaresmajose:nxp89xx
Feb 9, 2023
Merged

Drop mxm-mwifiex-setup recipe#998
quaresmajose merged 4 commits intofoundriesio:main-nextfrom
quaresmajose:nxp89xx

Conversation

Copy link
Copy Markdown
Contributor

@MrCry0 MrCry0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Copy link
Copy Markdown
Contributor

@angolini angolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if the KERNEL_MODULE_* variables also deal with firmware?

I think I still prefer to keep this as a MACHINE_FEATURE

Comment on lines +376 to +377
KERNEL_MODULE_AUTOLOAD:imx8mm-lpddr4-evk-ebbr += "moal"
KERNEL_MODULE_PROBECONF:imx8mm-lpddr4-evk-ebbr += "moal"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to add this driver only for the ebbr variation of the board?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, it shouldn't be ebbr specific.

VARIABLE:board += ""

IIRC this will also potentially cause issues with the assignment (var ?=, var:board = ""), which is why we usually just append here instead.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to add this driver only for the ebbr variation of the board?

This replace the previous MACHINE_FEATURES:append:imx8mm-lpddr4-evk = " mxm-mwifiex-load" that uses the imx8mm-lpddr4-evk machine override, a few lines below there is another but now for imx8mp-lpddr4-evk.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this will also potentially cause issues with the assignment (var ?=, var:board = ""), which is why we usually just append here instead.

Changed to use the append

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to add this driver only for the ebbr variation of the board?

This replace the previous MACHINE_FEATURES:append:imx8mm-lpddr4-evk = " mxm-mwifiex-load" that uses the imx8mm-lpddr4-evk machine override, a few lines below there is another but now for imx8mp-lpddr4-evk.

misunderstood this part and ebbr variation is my fault! now fixed

@quaresmajose
Copy link
Copy Markdown
Member Author

Do you know if the KERNEL_MODULE_* variables also deal with firmware?

I think not, this variables is handled on kernel-module-split.bbclass that don't know nothing about firmware.

I think I still prefer to keep this as a MACHINE_FEATURE

Is this configuration to auto load the kernel module still required? Why the moal can't be probed by the kernel and loaded by udev? I don't have any board to test this.

@angolini
Copy link
Copy Markdown
Contributor

angolini commented Jan 5, 2023

As far as I understand, MACHINE_FEATURES describes the hardware. There are firmwares that are only installed when some tag is present in the MACHINE_FEATURES

As far as I understand, moal module is a generic wifi driver, and I would say it is a common dependency for other drivers.

So I understand we can configure the moal driver probe using the OE variable, but I would not remove the MACHINE_FEATURES.

Are you facing some log errors due to changes in some firmware due to the latest meta-freescale bump, @quaresmajose ?

@quaresmajose
Copy link
Copy Markdown
Member Author

quaresmajose commented Jan 5, 2023

As far as I understand, MACHINE_FEATURES describes the hardware. There are firmwares that are only installed when some tag is present in the MACHINE_FEATURES

As far as I understand, moal module is a generic wifi driver, and I would say it is a common dependency for other drivers.

So I understand we can configure the moal driver probe using the OE variable, but I would not remove the MACHINE_FEATURES.

Are you facing some log errors due to changes in some firmware due to the latest meta-freescale bump, @quaresmajose ?

The MACHINE_FEATURES have now all the pieces on meta-freescale and we have our adaptation in #997 so LmP is aligned.

This PR is for auto load the kernel modules in this two machines, I can change it to be done with a MACHINE_FEATURES.
My question is why we need this auto load and modprobe config in LmP and meta-freescale machines works out of the box?

@angolini
Copy link
Copy Markdown
Contributor

angolini commented Jan 5, 2023

I'm not entirely aware of the context of this PR. I thought it was only an enhancement, not a bug fix. I think the suggestion was to have the OE variables ready to load the module instead of something else.

We can discuss this more offline, but I would need to understand what is happening.

@quaresmajose
Copy link
Copy Markdown
Member Author

I'm not entirely aware of the context of this PR. I thought it was only an enhancement, not a bug fix. I think the suggestion was to have the OE variables ready to load the module instead of something else.

We can discuss this more offline, but I would need to understand what is happening.

and you are right, this is a different way of doing the same thing and is not a bug. we can talk offline

@MrCry0
Copy link
Copy Markdown
Contributor

MrCry0 commented Jan 5, 2023

I'm not entirely aware of the context of this PR. I thought it was only an enhancement, not a bug fix. I think the suggestion was to have the OE variables ready to load the module instead of something else.
We can discuss this more offline, but I would need to understand what is happening.

and you are right, this is a different way of doing the same thing and is not a bug. we can talk offline

@angolini has a reason. I agree it would be better to keep a machine feature and mxm-mwifiex-setup_0.1.bb, just replacing the whole recipe with OE variables. And we can drop our conf files and replace the whole recipe mxm-mwifiex-setup with:

KERNEL_MODULE_AUTOLOAD:append = " moal"
KERNEL_MODULE_PROBECONF:append = " moal"
module_conf_moal = "options moal mod_para=nxp/wifi_mod_para.conf drvdbg=0x6"

MACHINE_FEATURES:append:imx8mm-lpddr4-evk = " mxm-mwifiex-load"
KERNEL_MODULE_AUTOLOAD:append:imx8mm-lpddr4-evk = " moal"
KERNEL_MODULE_PROBECONF:append:imx8mm-lpddr4-evk = " moal"
module_conf_moal:imx8mm-lpddr4-evk = "options moal mod_para=nxp/wifi_mod_para.conf drvdbg=0x6"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to confirm indeed if this customization for mod_para is still needed as it seems it is not required anymore by looking at the BSP (maybe the default path it looks now is nxp/wifi_mod_para.conf?).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And also if autoloading is still required as well, @MrCry0 should be able to confirm.

@quaresmajose
Copy link
Copy Markdown
Member Author

Convert this to WIP because the variable KERNEL_MODULE_AUTOLOAD and KERNEL_MODULE_PROBECONF in yocto needs be adapted because they use "/etc" hard-coded in kernel-module-split.bbclass and we need to have this in ${libdir}

@quaresmajose quaresmajose marked this pull request as draft January 5, 2023 18:03
@quaresmajose quaresmajose changed the base branch from main to main-next February 9, 2023 11:52
@quaresmajose
Copy link
Copy Markdown
Member Author

Convert this to WIP because the variable KERNEL_MODULE_AUTOLOAD and KERNEL_MODULE_PROBECONF in yocto needs be adapted because they use "/etc" hard-coded in kernel-module-split.bbclass and we need to have this in ${libdir}

I have a patch prepared for oe-core so i will merge this in main-next to test

@quaresmajose quaresmajose marked this pull request as ready for review February 9, 2023 11:54
@quaresmajose quaresmajose merged commit 3a3ce8c into foundriesio:main-next Feb 9, 2023
@quaresmajose quaresmajose deleted the nxp89xx branch February 9, 2023 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants