AsteroidOS / meta-smartwatch

OpenEmbedded layer that provides support for various smartwatches.
25 stars 18 forks source link

linux-audio-modules-beluga: fix mickledore build #219

Closed argosphil closed 1 year ago

argosphil commented 1 year ago

Avoid using a problematic GNU Make construct to allow building on mickledore.

I don't fully understand how make has changed and how it causes the problem, but there is code in make now that is reached in this specific situation.

Note that asoc/Kbuild includes DEFINES += -DBUILD_TIMESTAMP=\"$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')\", which doesn't have any effect since it should be CDEFINES. Not modified to keep changes to a minimum.

FlorentRevest commented 1 year ago

I'm happy to merge this. I don't think you need to waste energy root causing make changes :) it's a clean change and if it fixes your build I think we should just merge it.

FWIW, I had a quick look at https://android.googlesource.com/kernel/msm-extra/+/refs/heads/android-msm-beluga-4.9-pie-wear-mr2/ipc/ and it doesn't look like any c file refers to that macro so we could probably even remove it but I think your change is fine as is.

Remember to unmark the draft when ready ;)

argosphil commented 1 year ago

Oops, thought I'd responded here. We found what I believe is the root cause: the makefiles contain an unlimited blanket export statement, and that exports recursively-defined variables, which of course overrides their values in child makes and breaks everything. I'm not quite sure why it worked with the old make...

Anyway, it seems we still have sound problems on mickledore/beluga, so I've been meaning to investigate those. At some point I thought it was caused by the modules, but now I'm not so sure; it might be an intermittent problem.

MagneFire commented 1 year ago

Oops, thought I'd responded here. We found what I believe is the root cause: the makefiles contain an unlimited blanket export statement, and that exports recursively-defined variables, which of course overrides their values in child makes and breaks everything. I'm not quite sure why it worked with the old make...

I've processed your findings here as well: https://github.com/MagneFire/meta-smartwatch-1/commits/update-to-mickledore. Depending on what you want we can apply the changes here or in https://github.com/AsteroidOS/meta-smartwatch/pull/186.

MagneFire commented 1 year ago

Anyway, it seems we still have sound problems on mickledore/beluga, so I've been meaning to investigate those. At some point I thought it was caused by the modules, but now I'm not so sure; it might be an intermittent problem.

For what it's worth, I've tested your changes on kirkstone and it all works fine (quake and gpsp work correctly).

argosphil commented 1 year ago

For what it's worth, I've tested your changes on kirkstone and it all works fine (quake and gpsp work correctly).

Thank you!

Let's apply them to the kirkstone branch, then! That should make transition easier.

argosphil commented 1 year ago

superseded by #226