-
Notifications
You must be signed in to change notification settings - Fork 14
Conversation
Use the build property to decide whether the CAF platform shall be used. On android 5 the regular android platform is used on CAF devices.
|
||
#ifdef ANDROID_CAF | ||
// LAZY HACK to check for qcom hardware | ||
if (strcmp(hw_module->author, "CodeAurora Forum") == 0) | ||
return static_cast<mg::PlatformPriority>(mg::PlatformPriority::best + 1); | ||
auto version = get_android_version(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be good to add a try block here? so if we cant for some reason run property_get?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like dlopen and dlsym property_get? So far we link against the library and I think the implementation does not throw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, will try tomorrow on and see if any of the devices break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added small comment, other then that it LGTM 👍
Do you think we need a prop to override the decision logic - Are there CAF + 7.1 devices without the ABI change? |
@APokorny yeah a prop would be nice. I would assume nexus/pixel devices would run into trouble since they are the only one i know thats not using caf. |
This adds code to override the default decision when ro.build.hwc.vanilla and ro.build.hwc.qti_bsp is set
fixed in version 1.x of mir, so no need to fix on this old version
This worked on my Nexus 7, which was the only device which wasn't working before the change. Good from me! |
808: Fix Mir unit tests r=AlanGriffiths a=wmww With `std::list`, Mir unit tests segfaults with the following stack trace. Don't have enough motivation at the moment (or enough understanding of `std::list`) to figure out why. It seems likely there is a root cause I haven't actually addressed, so if you have ideas on what it may be or how to debug it, I'm all ears. ``` GNU gdb (Ubuntu 8.2.91.20190405-0ubuntu3) 8.2.91.20190405-git Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./bin/mir_unit_tests... (gdb) r Starting program: /home/wmww/code/mir/build/bin/mir_unit_tests MIR_CLIENT_PLATFORM_PATH=/home/wmww/code/mir/build/bin/../lib/client-modules/ MIR_SERVER_PLATFORM_PATH=/home/wmww/code/mir/build/bin/../lib/server-modules/ LD_LIBRARY_PATH=:/usr/local/lib:/usr/local/lib:/home/wmww/code/mir/build/bin/../lib exec=/home/wmww/code/mir/build/bin/mir_unit_tests.bin process 3530 is executing new program: /home/wmww/code/mir/build/bin/mir_unit_tests.bin [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Program received signal SIGSEGV, Segmentation fault. 0x0000555557873374 in std::_Function_base::_M_empty (this=0x10) at /usr/include/c++/8/bits/std_function.h:260 260 bool _M_empty() const { return !_M_manager; } (gdb) bt #0 0x0000555557873374 in std::_Function_base::_M_empty() const (this=0x10) at /usr/include/c++/8/bits/std_function.h:260 #1 0x00005555588889bd in std::function<std::experimental::fundamentals_v1::optional<int> (char const*, int, unsigned int)>::operator()(char const*, int, unsigned int) const (this=0x10, __args#0=0x5555597a6af0 "/home/wmww/code/mir/build/bin/mir_unit_tests.bin", __args#1=524288, __args#2=0) at /usr/include/c++/8/bits/std_function.h:685 #2 0x00005555588882b9 in (anonymous namespace)::run_handlers(char const*, int, mode_t) (path=0x5555597a6af0 "/home/wmww/code/mir/build/bin/mir_unit_tests.bin", flags=524288, mode=0) at /home/wmww/code/mir/tests/mir_test_framework/open_wrapper.cpp:58 #3 0x000055555888841a in open(char const*, int, mode_t) (path=0x5555597a6af0 "/home/wmww/code/mir/build/bin/mir_unit_tests.bin", flags=524288, mode=0) at /home/wmww/code/mir/tests/mir_test_framework/open_wrapper.cpp:78 #4 0x00007ffff7784262 in lttng_ust_elf_create () at /usr/lib/x86_64-linux-gnu/liblttng-ust.so.0 #5 0x00007ffff7785e5e in () at /usr/lib/x86_64-linux-gnu/liblttng-ust.so.0 #6 0x00007ffff737b557 in __GI___dl_iterate_phdr (callback=0x7ffff7785fd0, data=0x7fffffffdb90) at dl-iteratephdr.c:75 #7 0x00007ffff77864eb in lttng_ust_dl_update () at /usr/lib/x86_64-linux-gnu/liblttng-ust.so.0 #8 0x00007ffff77662e9 in () at /usr/lib/x86_64-linux-gnu/liblttng-ust.so.0 #9 0x00007ffff7fe295a in call_init (l=<optimized out>, argc=argc@entry=1, argv=argv@entry=0x7fffffffe0e8, env=env@entry=0x7fffffffe0f8) at dl-init.c:72 #10 0x00007ffff7fe2a59 in call_init (env=0x7fffffffe0f8, argv=0x7fffffffe0e8, argc=1, l=<optimized out>) at dl-init.c:30 #11 0x00007ffff7fe2a59 in _dl_init (main_map=0x7ffff7ffe190, argc=1, argv=0x7fffffffe0e8, env=0x7fffffffe0f8) at dl-init.c:119 #12 0x00007ffff7fd30ca in _dl_start_user () at /lib64/ld-linux-x86-64.so.2 #13 0x0000000000000001 in () #14 0x00007fffffffe3b8 in () #15 0x0000000000000000 in () ``` Co-authored-by: William Wold <[email protected]>
Use the build property to decide whether the CAF platform shall be
used. On android 5 the regular android platform is used on CAF devices.
It checks the android build property - if it is >= 7.1.0 it will use CAF, and prohibit it otherwise.
This should resolve issues ubports/ubuntu-touch#494