Closed Bug 1212943 Opened 7 years ago Closed 7 years ago
Build bluetoothd on Cyanogen
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36 Steps to reproduce: I've started the port to CM again from scratch. I've switched fw/av fw/base fw/native and hw/libhardware to those from CM I think this is due to different headers in hardware/libhardware, I'm going to remove bluetoothd for now and continue the port, but here is the new bug and compiler error, as requested in Bug 1080483 Actual results: target thumb C: bluetoothd <= system/bluetoothd/src/bt-av-io.c target thumb C: bluetoothd <= system/bluetoothd/src/bt-core-io.c target thumb C: bluetoothd <= system/bluetoothd/src/bt-hf-io.c system/bluetoothd/src/bt-core-io.c: In function 'register_bt_core': system/bluetoothd/src/bt-core-io.c:1507:5: error: initialization from incompatible pointer type [-Werror] .pin_request_cb = pin_request_cb, ^ system/bluetoothd/src/bt-core-io.c:1507:5: error: (near initialization for 'bt_callbacks.pin_request_cb') [-Werror] cc1: all warnings being treated as errors build/core/binary.mk:699: recipe for target '/home/adfad666/CMB2G/out/target/product/sirius/obj/EXECUTABLES/bluetoothd_intermediates/bt-core-io.o' failed make: *** [/home/adfad666/CMB2G/out/target/product/sirius/obj/EXECUTABLES/bluetoothd_intermediates/bt-core-io.o] Error 1 make: *** Waiting for unfinished jobs....
I should also mention I'm using stable/cm-12.1-YOG4P branch.
Hi, here's a patch to fix the API incompatibility. Can we distinguish CM from AOSP at build time? Is there a C preprocessor define?
Attachment #8671769 - Flags: feedback?(adam)
Patch seems to have worked (it built), I'll test it later. Gecko uses a lot of #if ANDROID_VERSION >= ## and there's an equivalent CM_VERSION which we can probably use too.
OK I was able to test sooner than I expected, It seems fine, nothing funny in logcat, I was able to pair my sirius to my Xperia Z5 running stock Android.
Comment on attachment 8671769 [details] [diff] [review] 0001-WIP-Fix-CM-build.patch Review of attachment 8671769 [details] [diff] [review]: ----------------------------------------------------------------- Bluetooth is working on all devices I can test.
Attachment #8671769 - Flags: feedback?(adam) → feedback+
Cool! I think about how to integrate this into upstream. Can you point me to where CM_VERSION is defined? Or how does the value look like?
For CM upstream it is used here: https://github.com/CyanogenMod/android_vendor_cm/blob/cm-12.1/config/common.mk#L297 but this value is complicated and only used as the name of the final ROM zip. However that repo is full of useless things (for us on B2G) so I've created a vendor_cm-fake repo with just the parts we need, including a simple value for CM_VERSION: https://github.com/cm-b2g/platform_vendor_cm-fake/blob/b2g/cm-12.1-YOG4P/config/common.mk#L61 You could do something like: ifneq ($(filter 12%,$(CM_VERSION)),) LOCAL_CFLAGS += -DCM_BLUETOOTH endif
Fixed by Bug 1236841 https://github.com/mozilla-b2g/platform_system_bluetoothd/commit/03506a656a1e21ea04edc4f9ac55103f2fc4ab05
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Oh, I didn't notice that both APIs are actually the same. Thanks, Adam.
You need to log in before you can comment on or make changes to this bug.