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

Split hybris stuff out into a separate layer #183

Open
casept opened this issue Jan 30, 2024 · 2 comments
Open

Split hybris stuff out into a separate layer #183

casept opened this issue Jan 30, 2024 · 2 comments

Comments

@casept
Copy link
Contributor

casept commented Jan 30, 2024

I'm currently trying to port the Gear 2, based on my mainline kernel fork.

With the current project structure, I have to manually remove all the hybris-related patches in my device layer that don't make sense for my watch (e.g. the mesa dependency removal in qtbase, OpenGL removal in SDL2, the addition of pulseaudio-modules-droid to pulseaudio etc. Finding all these spots is a lot of effort and would have to be repeated if any new mainline-based devices were to be introduced in future.

I think the following split might make sense:

meta-asteroid: Recipes for shared components; HAL-neutral
meta-mainline: Recipes and patches for watches running mainline; inert on hybris-based watches
meta-hybris: Recipes and patches for watches running libhybris; inert on mainline-based watches

I'd be willing to the work if this looks OK to you.

@FlorentRevest
Copy link
Member

Thank you for opening this and sorry it took me so long to get to it

I'm currently trying to port the Gear 2, based on my mainline kernel fork.

Nice!

With the current project structure, I have to manually remove all the hybris-related patches in my device layer that don't make sense for my watch (e.g. the mesa dependency removal in qtbase, OpenGL removal in SDL2, the addition of pulseaudio-modules-droid to pulseaudio etc. Finding all these spots is a lot of effort and would have to be repeated if any new mainline-based devices were to be introduced in future.

You cite three precise examples, let's have a look:

I think the following split might make sense:

meta-asteroid: Recipes for shared components; HAL-neutral

This is indeed what it is supposed to be. The layer might contain recipes which are useful for HAL stuff, (like pulseaudio-modules-droid, it's perfectly fine to have it there) but it should not build anything hybris by default. All layers for hybris ports should have bbappends to enable hybris things conditionally.

meta-mainline: Recipes and patches for watches running mainline; inert on hybris-based watches
meta-hybris: Recipes and patches for watches running libhybris; inert on mainline-based watches

We have meta-smartwatch and it contains a directory per watch. But there can be two MACHINEs for a given watch. For example meta-sparrow defines sparrow and sparrow-mainline. The hybris stuff are only built when building the sparrow (hybris port) MACHINE. When building sparrow-mainline almost nothing changes. AsteroidOS/meta-smartwatch@dff36f6 Notice also the last paragraph of that commit description which points out that pulseaudio shouldn't have had dependencies to pulseaudio-modules-droid by default, but fixing this was left as an exercise for the reader. ;)

@casept
Copy link
Contributor Author

casept commented Feb 11, 2024

Thank you for the feedback!

This was posted before we had our discussion on how to approach this properly, I just forgot to close the issue afterwards.

Making the remaining accidental hybris dependencies in the manner we discussed in the Matrix channel is nearly finished now, with the changes living in https://github.com/casept/meta-asteroid/tree/optional-hybris. I need to track down why asteroid-launcher segfaults with them applied on my catfish, then I'll submit a PR.

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

No branches or pull requests

2 participants