asteroid icon indicating copy to clipboard operation
asteroid copied to clipboard

Update from scarthgap to styhead

Open MagneFire opened this issue 1 year ago • 5 comments

Yocto Styhead has been released in October, we should consider updating to this version.

See:

  • https://wiki.yoctoproject.org/wiki/Releases
  • https://docs.yoctoproject.org/dev/migration-guides/release-5.1.html

Currently tracking changes via:

  • https://github.com/MagneFire/asteroid/tree/f/styhead
  • https://github.com/MagneFire/meta-asteroid-community/tree/f/styhead
  • https://github.com/MagneFire/meta-asteroid/tree/f/styhead
  • https://github.com/MagneFire/meta-smartwatch-1/tree/f/styhead

MagneFire avatar Dec 15 '24 15:12 MagneFire

meta-openembedded needed a patch in order to actually package. A PR is open here: https://github.com/openembedded/meta-openembedded/pull/915 (merged :tada:, but only on the master branch)

Current state:

  • Audio: Works
  • Vibration motor: Works
  • Touch: Works
  • Bluetooth: Works (hostname patch needs work, looking into proper solution)
  • Compositor: Works
  • GPS: To be tested

There currently appears to be an odd issue where touch interaction causes any AsteroidOS app (settings, alarm, etc) to segfault. Tried:

  • Removing mapplauncherd, instead compiling asteroid-settings as a regular binary.
  • Testing a non-Qt application (gpsp)
    • This doesn't even show a window, also resulting in a segfault. Downgrading libhybris, but that just results in a different error.
  • Downgrading GCC to 13.3.
  • Removing many bump patches (GCC14 fixes).
  • Testing qmlscene
    • Using a .qml without any drag-able list (ListView) doesn't cause it to crash, adding a ListView causes the crash again.
      • Maybe it has something to do with mouse grabbing (maybe a bug in lipstick or asteroid-launcher?)
  • Using WAYLAND_DEBUG=1
[2811263.704] {Default Queue} wl_touch#14.frame()
[2811271.205] {Display Queue} wl_display#1.delete_id(29)
[2811273.179] {Default Queue} wl_keyboard#9.modifiers(10, 0, 0, 0, 0)
[2811273.722] {Default Queue} wl_pointer#3.enter(10, wl_surface#17, 184.00000000, 355.00000000)
[2811274.896] wl_callback#29.done(330553)
invoker: error: Can't send signal 11 to application [1443]: No such process 
  • Downgrading glibc
  • Testing nemomobile lipstick
  • Adding debug logs in asteroid-launcher

Now seeing wl_global_create: implemented version for 'wl_shm' higher than interface version (2 > 1). Analysing further. After downgrading the wayland folder in openembedded-core, swiping works again! ~~gpsp still seems broken.~~ was launching incorrectly, works via gpsp-menu. Fix is included in this commit: https://github.com/MagneFire/meta-asteroid/commit/382791894d07cca3cdaa86b4ba3e90862a5f148a

MagneFire avatar Jan 05 '25 20:01 MagneFire

Currently our recipes and the ones provided by others (mainly meta-qt5) cause build failures if we keep failing on buildpaths (default in styhead, only warning in scarthgap).

This results in in package x contains reference to TMPDIR [buildpaths] in the build log.

To workaround it I've reverted this back to warning in the asteroid.conf:

ERROR_QA:remove = "buildpaths"
WARN_QA:append = " buildpaths"

It will take quite a lot of effort to get all recipes to not include references to the TMPDIR. Hence I'd like to propose actually applying said change in asteroid.conf. Though this does risk us not actually fixing these warnings, as we haven't done so previously either.

A similar thing is currently applied for lack of upstream status in patch files:

ERROR_QA:remove = "patch-status"
WARN_QA:append = " patch-status"

But in this case it's trivial to add a patch status to every patch file.

MagneFire avatar Jan 20 '25 20:01 MagneFire

sturgeon seems to fail at booting. The kernel image works fine, but it just hangs at the bootlogo.

ADB does not become available, meaning that this may be potentially harder to debug.

MagneFire avatar Jan 26 '25 16:01 MagneFire

It will take quite a lot of effort to get all recipes to not include references to the TMPDIR. Hence I'd like to propose actually applying said change in asteroid.conf. Though this does risk us not actually fixing these warnings, as we haven't done so previously either.

If, as you propose, we keep it as a warning, it will remain as a visible indicator that more needs to be done. I think this is a reasonable approach.

beroset avatar Jan 27 '25 11:01 beroset

Gotten sturgeon to boot now.

systemd has officially disabled cgroup v1 in systemd version 257 (scarthgap shipped with version 256). To get sturgeon boot one must add the SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE=1 to the kernel command line.

Also see: https://github.com/systemd/systemd/blob/83bf58f39dbe947c1b4f394667f42a0c557fd94c/NEWS#L148

I'll adjust the kernel command line for every affected watch.

Affected watches are

  • mt6580
  • tetra
  • koi
  • mooneye
  • pike
  • anthias
  • bass
  • catshark
  • dory
  • firefish
  • lenok
  • narwhal
  • nemo
  • ray
  • sawshark
  • skipjack
  • smelt
  • sparrow
  • sprat
  • sturgeon
  • swift
  • wren
  • minnow

not affected:

  • beluga
  • triggerfish
  • hoki
  • sparrow-mainline

MagneFire avatar Jan 31 '25 17:01 MagneFire

Yocto Walnascar seems to be released. This issue will now keep track of upgrading to walnascar instead of styhead.

MagneFire avatar Apr 06 '25 18:04 MagneFire

Alright, it seems to work now on at least sturgeon. Here's what I've tested/fixed:

  • Display
    • Launcher
    • AOD
  • Sensors
    • Heart rate sensor
    • Tilt-to-Wake
  • Vibrator
  • Bluetooth
  • USB
    • ADB
    • SSH
  • Audio
    • Speaker

In the coming days I'll test other platforms.

MagneFire avatar Apr 14 '25 20:04 MagneFire

I can test catfish, beluga, hoki and dory if it helps.

beroset avatar Apr 14 '25 20:04 beroset

Of course any help is welcome! But don't feel forced to do it either :D

MagneFire avatar Apr 14 '25 20:04 MagneFire

It turns out that libSDL2 has broken at least gpSP. After some testing it seems that https://github.com/libsdl-org/SDL/commit/0f695adb0392446f36e872e72a828467d5f299f0 broke it resulting in:

/usr/src/debug/wayland/1.23.1/src/wayland-client.c:2460: wl_proxy_set_queue: Assertion `proxy->display == queue->display' failed

It's fixed in gpSP with this commit: https://github.com/MagneFire/gpsp/commit/d74f472b447ddd646c09c929bd7fd2419f1842f7

MagneFire avatar May 14 '25 20:05 MagneFire

For reference this is the plan for testing

  • Try varying devices
    • catfish: Recommended watch, should work (Android 9 base) (uses binder interface)
    • sturgeon: Older watch, still good. May get kernel issues as kernel is old (uses non-binder interface, also custom kernel patches for bt)
    • beluga: Modernish watch, kernel is newer
    • hoki: Even more modern
    • emulator: general usage
    • rinato: mainline
  • Test the following:
    • Display
      • Launcher
        • Do asteroid-* apps launch
        • Does gpsp (SDL2) launch
      • AOD
    • Sensors (also check logcat)
      • Heart rate sensor (app, try twice on sturgeon)
      • Tilt-to-Wake (sleep display, tilt wrist to activate display)
    • Vibrator
    • Bluetooth
    • USB
    • Audio
      • Speaker
        • gst-launch-1.0 filesrc location=input.mp3 ! mpegaudioparse ! mpg123audiodec ! pulsesink
        • as ceres
      • Microphone
        • gst-launch-1.0 pulsesrc ! audioconvert ! wavenc ! filesink location=recording.wav
        • as ceres
    • WiFi
    • Gamecontroller (gpsp)

Then there's the following remaining:

  • Build community packages (✅)
  • Build SDK (✅)
    • Test SDK (✅) (https://wiki.asteroidos.org/index.php/Creating_an_Asteroid_app#Example_project)

MagneFire avatar May 17 '25 15:05 MagneFire

Alright, this has now been tested on all my watches. Everything seems to work as it did before (no more regressions).

I can't test the following watches as I do not own them:

  • anthias
  • bass
  • firefish
  • harmony
  • inharmony
  • koi
  • mooneye
  • nemo
  • skipjack
  • sprat
  • triggerfish
  • wren

Interestingly the tetra and pike broke for unknown reasons, but fixing them was trivial (https://github.com/AsteroidOS/meta-smartwatch/pull/270/commits/8ced1136515ec503ad094ba6326327bf30c60c2c, https://github.com/MagneFire/meta-smartwatch-1/commit/8893e62f4cd28c7abeb1c44de1246f86e4fc6741) as similar patches are also applied to other watches.

MagneFire avatar May 27 '25 21:05 MagneFire