Closed
Bug 911038
Opened 12 years ago
Closed 12 years ago
[flatfish]Support bluez in jb 4.2
Categories
(Firefox OS Graveyard :: Bluetooth, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: shawnjohnjr, Assigned: shawnjohnjr)
Details
Attachments
(1 file)
2.36 KB,
text/plain
|
Details |
Need to support bluez bluetooth stack in jb 4.2 for FXOS v1.2.
Assignee | ||
Comment 1•12 years ago
|
||
Add repo git repo in flatfish.xml
<!-- bluez -->
<project name="platform/external/bluetooth/bluez" path="external/bluetooth/bluez" revision="refs/tags/android-4.1.2_r2.1"/>
<project name="platform/external/bluetooth/glib" path="external/bluetooth/glib" revision="refs/tags/android-4.1.2_r2.1"/>
<project name="platform/external/bluetooth/hcidump" path="external/bluetooth/hcidump" revision="refs/tags/android-4.1.2_r2.1"/>
Build breaks:
1. build breaks in glib
bionic/libc/include/string.h:105:33: error: call to '__memcpy_dest_size_error' declared with attribute error: memcpy called with size bigger than destination
bionic/libc/include/string.h:109:32: error: call to '__memcpy_src_size_error' declared with attribute error: memcpy called with size bigger than source
hacky solution:
modify external/bluetooth/glib/glibconfig.h
typedef signed long long gint64;
typedef unsigned long long guint64;
2. break breaks in
make: Entering directory `/home/shawnjohnjr/workspace1/flatfish/a31-b2g'
target thumb C: audio <= external/bluetooth/bluez/audio/a2dp.c
external/bluetooth/bluez/audio/a2dp.c:33:18: fatal error: glib.h: No such file or directory
Because external/bluetooth/bluez/audio/Android.mk, include-path-for, glib is missing in build/core/pathmap.mk
Add pathmap_INCL
glib:external/bluetooth/glib \
3. Remove external/bluetooth/bluedroid (should also remove bluedroid from base-jb.xml)
4. Remove folder device/common/libbt to fix dependecy of bluedroid
Assignee | ||
Comment 2•12 years ago
|
||
After installing necessary files, just try this test steps, BT stack is working on flatfish.
echo 1 > /sys/class/rfkill/rfkill0/state
brcm_patchram_plus --enable_hci --no2bytes --tosleep 200000 --baudrate 115200 --patchram /system/vendor/modules/bcm40183b2.hcd /dev/ttyS2 &
hciconfig hci0 up
hcitool scan
Assignee | ||
Comment 3•12 years ago
|
||
Since flatfish is based on platform 17 instead of platform 18. We need add configuration for platform 17 and set MOZ_B2G_BT=1.
Assignee | ||
Comment 4•12 years ago
|
||
After enabling MOZ_B2G_BT=1, build breaks in
In file included from /home/shawnjohnjr/workspace1/flatfish/a31-b2g/gecko/ipc/ril/Ril.h:11:0,
from /home/shawnjohnjr/workspace1/flatfish/a31-b2g/gecko/ipc/ril/Ril.cpp:22:
../../dist/include/mozilla/ipc/UnixSocket.h:16:33: fatal error: bluetooth/bluetooth.h: No such file or directory
compilation terminated.
Assignee | ||
Comment 5•12 years ago
|
||
It looks like we need to add the line here in gecko/configure.in
17)
GONK_INCLUDES="-I$gonkdir/frameworks/base/opengl/include -I$gonkdir/frameworks/native/include -I$gonkdir/frameworks/base/include -I$gonkdir/frameworks/base/services/camera -I$gonkdir/frameworks/base/include/media/stagefright -I$gonkdir/frameworks/base/include/media/stagefright/openmax -I$gonkdir/frameworks/base/media/libstagefright/rtsp -I$gonkdir/frameworks/base/media/libstagefright/include -I$gonkdir/dalvik/libnativehelper/include/nativehelper"
if test -d "$gonkdir/external/bluetooth/bluez"; then
GONK_INCLUDES+=" -I$gonkdir/external/dbus -I$gonkdir/external/bluetooth/bluez/lib"
MOZ_B2G_BT=1
fi
;;
Assignee | ||
Comment 6•12 years ago
|
||
In order to build brcm_patchram_plus, we need to add BOARD_HAVE_BLUETOOTH_BCM flag.
Assignee | ||
Comment 7•12 years ago
|
||
Add repo status for better understanding overall changes
Assignee | ||
Comment 8•12 years ago
|
||
Update b2g-manifest:
a31-b2g-manifest/commits/a00e7393430824a720a80c56ab45231e69d0eb2b
Assignee | ||
Comment 9•12 years ago
|
||
in glib/glib/gtestutils.c:1852
net_double (const gchar **ipointer)
{
...
guint64 aligned_int64;
memcpy (&aligned_int64, *ipointer, 8);
*ipointer += 8;
...
This shall change to sizeof(guint64)
Assignee | ||
Comment 10•12 years ago
|
||
Just found caf glib jb-mr1 version had fixed this problem, so I will change manifest and use caf glib.
Assignee | ||
Comment 11•12 years ago
|
||
Update manifest:
commits/4b5f60e3f425e89fab252581d5b28c0f20a91015
Assignee | ||
Comment 12•12 years ago
|
||
demo version is working now. Close this bug.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•