Skip to content
Snippets Groups Projects

Build hybris with Android 9 support

Merged Imported Administrator requested to merge hybris-9 into master
All threads resolved!

This PR includes initial changes to make libhybris-based adaptation work for newer Android 8/9 devices. Tested to run Xorg on Fxtec pro1 and Planet Cosmo PDA (separate PRs incoming) with HWComposer 2 API.

Currently, there is no Halium 8/9 builds, so I used mer-hybris Android tree for testing instead. It may be worth discussing on how to package that later, as instead of complete system.img as with Halium, it involves compiling patched Android libs (see https://github.com/gemian/droid-hal-cosmopda-bin) with modified init configuration and overlaying them on top of the stock system partition. It is not very neat compared to Halium, but in this way, it should be possible to utilize existing SailfishOS ports, including Jolla devices.

CC @danct12 @minlexx

Edited by Administrator

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Administrator changed the description · Imported

    changed the description

    By NotKit on 2019-10-06T11:26:51

  • Administrator added 1 commit · Imported

    added 1 commit

    • 2d12cec5 - hybris/xf86-video-hwcomposer: new git snapshot, Android 9 support

    Compare with previous version

    By NotKit on 2019-10-06T13:00:20

  • Author Owner

    First, I was just testing update to libhybris current git master yesterday/today, because my MR ( https://github.com/libhybris/libhybris/pull/424 ) was merged upstream, (along with a bunch of other fixes from Halium), so we no longer need to carry my patch in our tree. It would be great to make this MR and !666 compatible ;)

    Second, I have no questions to android-headers-9.0 package. Maybe it can be split to separate MR and merged quickly while solving situation with libhybris?

    Third, I don't think I can say anything smart about xf86-video-hwcomposer, and I've never used it yet

    By Alexey Min on 2019-10-06T13:38:35

    Edited by Administrator
  • Administrator added 1 deleted label · Imported

    added 1 deleted label

  • Author Owner

    !666 is about to be merged (in a few minutes, CI is somehow slow today). Afterwards, this can be rebased on top :thumbsup:

    Thanks for the MR @NotKit!

    By Oliver Smith on 2019-10-07T22:03:15

  • Administrator added 29 commits · Imported

    added 29 commits

    • 2d12cec5...0572e653 - 26 commits from branch postmarketOS:master
    • 8460bdfc - hybris/android-headers-9.0: new package for Android 9.0 headers
    • ec31b22b - hybris/libhybris: new upstream snapshot, compile against Android 9.0 headers as well
    • 4b313c6e - hybris/xf86-video-hwcomposer: new git snapshot, Android 9 support

    Compare with previous version

    By NotKit on 2019-10-08T14:31:25

  • Author Owner

    The build freezes on CI, each time on different steps, but seem to be related to autotools.

    By NotKit on 2019-10-08T15:15:51

  • Administrator
  • Author Owner

    I wonder why there are so many changes in Make-libhybris-compile-with-musl.patch. I guess I'll just compile it myself some time later today, test on my 7.1 device and hope nothing breaks.

    By Alexey Min on 2019-10-08T15:52:18

  • Author Owner

    It's mostly due to the Oreo linker which never got compiled before on pmOS. Also I regenerated the patch from git, so line numbers changed and some hunks got relocated.

    By NotKit on 2019-10-08T17:22:48

  • Author Owner

    xf86-video-hwcomposer build fails for armv7 with --strict:

    In file included from driver.c:34:
    driver.h:142:5: error: unknown type name 'hwc2_compat_device_t'
      142 |     hwc2_compat_device_t* hwc2Device;
          |     ^~~~~~~~~~~~~~~~~~~~
    driver.h:143:5: error: unknown type name 'hwc2_compat_display_t'
      143 |     hwc2_compat_display_t* hwc2_primary_display;
          |     ^~~~~~~~~~~~~~~~~~~~~
    driver.h:144:5: error: unknown type name 'hwc2_compat_layer_t'
      144 |     hwc2_compat_layer_t* hwc2_primary_layer;
          |     ^~~~~~~~~~~~~~~~~~~
    make[2]: *** [Makefile:502: driver.lo] Error 1
    make[2]: Leaving directory '/home/pmos/build/src/xf86-video-hwcomposer-a3dc3e20595f1e353016ede6e7ccf0d37f815ac4/src'
    make[1]: *** [Makefile:438: all-recursive] Error 1
    make[1]: Leaving directory '/home/pmos/build/src/xf86-video-hwcomposer-a3dc3e20595f1e353016ede6e7ccf0d37f815ac4'
    make: *** [Makefile:370: all] Error 2
    >>> ERROR: xf86-video-hwcomposer: build failed

    specifically building xf86-video-hwcomposer-4.4 variant. 9.0, 7.1, 7.1-caf variants build fine..

    By Alexey Min on 2019-10-08T18:37:21

  • Author Owner

    However, new libhybris works the same way as previosly, I spotted no reggressions.

    +1 on android-headers

    +1 on libhybris

    +100500 after fixing xf86-video-hwcomposer build :wink:

    By Alexey Min on 2019-10-08T20:14:57

    Edited by Administrator
  • Administrator added 1 deleted label · Imported

    added 1 deleted label

  • Administrator added 15 commits · Imported

    added 15 commits

    • 4b313c6e...dc4af7d3 - 12 commits from branch postmarketOS:master
    • 68fac95b - hybris/android-headers-9.0: new package for Android 9.0 headers
    • 5de1d73d - hybris/libhybris: new upstream snapshot, compile against Android 9.0 headers as well
    • b5120d48 - hybris/xf86-video-hwcomposer: new git snapshot, Android 9 support

    Compare with previous version

    By NotKit on 2019-10-10T09:47:24

  • Administrator added 1 commit · Imported

    added 1 commit

    • a2f5db89 - hybris/xf86-video-hwcomposer: new git snapshot, Android 9 support

    Compare with previous version

    By NotKit on 2019-10-10T10:02:38

  • Author Owner

    Now all packages build fine locally with --strict for armv7 and aarch64.

    By Alexey Min on 2019-10-10T17:33:03

  • Administrator approved this merge request · Imported

    approved this merge request

    By Alexey Min on 2019-10-10T17:33:14

  • Administrator resolved all threads · Imported

    resolved all threads

    By NotKit on 2019-10-11T00:03:05

  • Author Owner

    MR looks good to me. Thank you very much @NotKit! Also big thanks to @minlexx for building it and reviewing the patch, very hepful!

    By Oliver Smith on 2019-10-13T18:31:24

  • Author Owner

    Actually, it would be stupid to merge it first and then see if it breaks the binary repository or not. I'll pre-build this on the same pc that builds the binary repository (without making it part of the official binary repo) to make sure that this does not happen, before merging.

    By Oliver Smith on 2019-10-13T18:41:10

    Edited by Administrator
  • Author Owner

    Unfortunately, this fails to build for me for x86_64 with --strict:

    libtool: install: /usr/bin/install -c .libs/libhybris-hwcomposerwindow.lai /home/pmos/build/src/tmpinstall/libhybris-4.4/usr/lib/libhybris-hwcomposerwindow.la
    libtool: warning: remember to run 'libtool --finish /usr/lib'                                            
    /usr/lib/gcc/i586-alpine-linux-musl/9.2.0/../../../../i586-alpine-linux-musl/bin/ld: cannot find -lhybris-hwcomposerwindow          
    collect2: error: ld returned 1 exit status                                                                                                                                                                         
    libtool:   error: error: relink 'eglplatform_hwcomposer.la' with the above command before installing it                                                                                                            
    make[4]: *** [Makefile:478: install-pkglibLTLIBRARIES] Error 1
    make[4]: Leaving directory '/home/pmos/build/src/libhybris-eaa6884ba95a1d5d0303119ffdc48952a098059b/hybris/egl/platforms/hwcomposer'
    make[3]: *** [Makefile:716: install-am] Error 2                                                          
    make[3]: Leaving directory '/home/pmos/build/src/libhybris-eaa6884ba95a1d5d0303119ffdc48952a098059b/hybris/egl/platforms/hwcomposer'                                                                               
    make[2]: *** [Makefile:372: install-recursive] Error 1                                    
    make[2]: Leaving directory '/home/pmos/build/src/libhybris-eaa6884ba95a1d5d0303119ffdc48952a098059b/hybris/egl/platforms'             
    make[1]: *** [Makefile:684: install-recursive] Error 1                                                                                                                                                             
    make[1]: Leaving directory '/home/pmos/build/src/libhybris-eaa6884ba95a1d5d0303119ffdc48952a098059b/hybris/egl'                                                                                                                                                                
    make: *** [Makefile:427: install-recursive] Error 1                
    >>> ERROR: libhybris: build failed   

    By Oliver Smith on 2019-10-13T19:12:55

  • Author Owner

    @ollieparanoid could you try to rerun the build to see if it is a consistent failure? I'm not able to reproduce it with ./pmbootstrap.py build --strict --arch x86 libhybris --force

    By NotKit on 2019-10-16T17:11:05

  • Administrator added 31 commits · Imported

    added 31 commits

    • a2f5db89...c6e8a72d - 28 commits from branch postmarketOS:master
    • 7611a840 - hybris/android-headers-9.0: new package for Android 9.0 headers
    • cd8531b6 - hybris/libhybris: new upstream snapshot, compile against Android 9.0 headers as well
    • 7c0c533e - hybris/xf86-video-hwcomposer: new git snapshot, Android 9 support

    Compare with previous version

    By NotKit on 2019-10-21T19:20:29

  • Administrator resolved all threads · Imported

    resolved all threads

    By Oliver Smith on 2019-10-23T21:47:26

  • Administrator added 20 commits · Imported

    added 20 commits

    Compare with previous version

    By Oliver Smith on 2019-10-23T21:49:33

  • Author Owner

    Unfortunately I don't have time to test it again right now. But it went through in CI, and @minlexx confirmed that it was building for armv7 and aarch64. So it's very likely that it will just build on the builder PC too. Let's merge it.

    Patch looks good, thanks again @NotKit!

    By Oliver Smith on 2019-10-23T21:51:43

    Edited by Administrator
  • Administrator approved this merge request · Imported

    approved this merge request

    By Oliver Smith on 2019-10-23T21:52:01

  • Administrator merged · Imported

    merged

    By Oliver Smith on 2019-10-23T21:52:08

  • Administrator mentioned in commit 4158687f · Imported

    mentioned in commit 4158687f

    By NotKit on 2019-10-30T21:32:15

  • Administrator mentioned in commit 6b6fa02f · Imported

    mentioned in commit 6b6fa02f

    By NotKit on 2019-11-04T13:02:39

  • Administrator mentioned in commit 24c13b88 · Imported

    mentioned in commit 24c13b88

    By NotKit on 2019-11-07T18:16:49

  • Please register or sign in to reply
    Loading