Build hybris with Android 9 support
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
Merge request reports
Activity
added 1 commit
- 2d12cec5 - hybris/xf86-video-hwcomposer: new git snapshot, Android 9 support
By NotKit on 2019-10-06T13:00:20
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- Resolved by Administrator
Wouldn't it be easier to get !666 merged first, and then rebase on top of that, enabling a build against android-headers-9.0?
By NotKit on 2019-10-06T22:02:58
Edited by Ghost User
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
By NotKit on 2019-10-08T14:31:25
Toggle commit list-
2d12cec5...0572e653 - 26 commits from branch
- Resolved by Administrator
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
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
By Alexey Min on 2019-10-08T20:14:57
Edited by Administratoradded 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
By NotKit on 2019-10-10T09:47:24
Toggle commit list-
4b313c6e...dc4af7d3 - 12 commits from branch
added 1 commit
- a2f5db89 - hybris/xf86-video-hwcomposer: new git snapshot, Android 9 support
By NotKit on 2019-10-10T10:02:38
- Resolved by Administrator
The hanging is weird though ... let's see if it builds for me after merging.
By Oliver Smith on 2019-10-21T22:13:46
Edited by Ghost User
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 AdministratorUnfortunately, 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
- Resolved by Administrator
@ollieparanoid for x86_64 or just for x86? x86_64 is not in ARCH list for this package.
By NotKit on 2019-10-13T21:34:27
Edited by Ghost User
@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
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
By NotKit on 2019-10-21T19:20:29
Toggle commit list-
a2f5db89...c6e8a72d - 28 commits from branch
added 20 commits
-
7c0c533e...6e5723a6 - 17 commits from branch
postmarketOS:master
- 24c13b88 - hybris/android-headers-9.0: new package for Android 9.0 headers (!665 (merged))
- 6b6fa02f - hybris/libhybris: new upstream snapshot, compile against Android 9.0 headers (!665 (merged))
- 4158687f - hybris/xf86-video-hwcomposer: new git snapshot, Android 9 support (!665 (merged))
By Oliver Smith on 2019-10-23T21:49:33
Toggle commit list-
7c0c533e...6e5723a6 - 17 commits from branch
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 Administratormentioned in commit 4158687f
By NotKit on 2019-10-30T21:32:15
mentioned in commit 6b6fa02f
By NotKit on 2019-11-04T13:02:39
mentioned in commit 24c13b88
By NotKit on 2019-11-07T18:16:49