Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imx95: install mali firmware (mali_csffw.bin) in the rootfs #220

Draft
wants to merge 1 commit into
base: scarthgap-7.x.y
Choose a base branch
from

Conversation

leonheldattoradex
Copy link
Contributor

@leonheldattoradex leonheldattoradex commented Feb 3, 2025

We need the firmware as the kernel module expects it in specific places of the
root filesystem, so it cannot be dynamically deployed from containers as the
rest of the graphical stack is.

On the imx8 and am62 for example the firmware is installed via 'driver' recipes
(kernel-module-imx-gpu-viv and ti-img-rogue-installer), on the imx95, however,
it comes from userspace portion, thus we need the bbappend to only install the
firmware, nothing else (no libEGL, libGLES etc...).

This follows the same logic as commits a7ec4b0 and b40b911.

Note that I haven't 100% tested this commit besides a build as I need to actually build the graphical userspace to trigger the kernel module to load the firmware, but having it in lib/firmware is, from my understanding, enough.

Of course, the rest of the graphical stack belongs inside one of these: https://github.com/torizon/torizon-containers.

@leonheldattoradex leonheldattoradex force-pushed the scarthgap-7.x.y branch 2 times, most recently from 264d24d to 08b43fa Compare February 3, 2025 01:43
@leonheldattoradex leonheldattoradex changed the title imx95: install mali firmware in the rootfs imx95: install mali firmware (mali_csffw.bin) in the rootfs Feb 3, 2025
We need the firmware as the kernel module expects it in specific places of the
root filesystem, so it cannot be dynamically deployed from containers as the
rest of the graphical stack is.

On the imx8 and am62 for example the firmware is installed via 'driver' recipes
(kernel-module-imx-gpu-viv and ti-img-rogue-installer), on the imx95, however,
it comes from userspace portion, thus we need the bbappend to only install the
firmware, nothing else (no libEGL, libGLES etc...).

This follows the same logic as commits a7ec4b0 and b40b911.

Related-to: TCCP-879

Signed-off-by: Leonardo Held <[email protected]>
Copy link
Collaborator

Choose a reason for hiding this comment

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

@leonheldattoradex, this seems to be an .bbappend for the meta-imx-bsp layer, right? I believe it would be better if we added this .bbappend into dynamic-layers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's for meta-freescale, I'm assuming we're building from that, right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Both layers have this recipe, don't know now from which layer we're actually getting it. Probably an easy way to check would be to run bitbake mali-imx -c devshell and comparing the checkout hash with the recipes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay maybe I did something extremely wrong, was there supposed to be a meta-imx in the layers? I just repo sync, set the machine, distro and bitbake, no meta-imx on sight.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yup, there's no manifest for common-machines yet, so there's no way to repo sync iMX95. 😀
If you want to sync and have a local build for this just let me know and I can share with you the steps.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of changing torizon-base.inc, I think would be better organized adding the CORE_IMAGE_BASE_INSTALL:append directly into the machine file conf/machine/include/imx95-19x19-verdin.inc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I move the other configs too (I'm just doing what has been done before for the other machines)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No.
It's just that when we talk about common machines, I think i'ts best if any things needed don't spill into core Torizon stuff.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha. I'm thinking that eventually we'll have smarc95 (and others) as a machine which will be COMPATIBLE with mx95-nxp-bsp. ie, the am62 fix for this same issue works for all am62 models, not only for an specific machine. What you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, that makes sense. We can keep this in torizon-base.inc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:catjam:

@leonheldattoradex
Copy link
Contributor Author

Alright drafting for a bit as I wasn't building it correctly.

@leonheldattoradex leonheldattoradex marked this pull request as draft February 3, 2025 12:01
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.

2 participants