commit | 46476a51983f53f49f30962e8b839b0fb567f2e8 | [log] [tgz] |
---|---|---|
author | Chris Manton <cmanton@google.com> | Tue Mar 09 00:19:34 2021 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Tue Mar 09 00:19:34 2021 +0000 |
tree | f79660a6ecdc3b705e5fbb5f31c439ae01fafcd2 | |
parent | 75dcbe16b3426b8691b23137f9f23778ae9b7d2a [diff] | |
parent | e6a57a2bb96d96bcfe05bc90004bfe28e854be9e [diff] |
Merge changes Ib81960bb,I1d84f463,Id475e310,I4ba9755c,Ib6f7b4ba, ... * changes: Introduce main_shim_test Add main/test::shim mocks Add gd/neighbor::inquiry mock Add SCO HACK for shim acl mock Add gd/hci::controller mock gd_acl: Directly access acl manager for SCO hack Put stack vars in proper scope Return proper type stack/acl/btm_pm::BTM_SetPowerMode Explicitly specify status type include/hardware/ble_scanner.h Add stack init indirection for activity_attribution Use proper tBTM_STATUS types Use tBTM_STATUS in stack/l2cap/:: gd_shim: Log more info about acl queue state Add bta_sys post to main alternative method Remove unused field srvc_id Template prep for bta hardening Use btm_status in stack/rfcomm/:: Use proper types tBLE_SCAN_MODE User proper types tBTM_STATUS Canonicalize tBTM_APPL_INFO::bta_security Streamline bta_av_link_role_ok Use canonical include paths Add hci code conversion stack/include/hci_error_code Remove unused bta/include/bta_api::#defs Remove unused API BTM_GetPeerSCA Remove unused API BTM_RequestPeerSCA Remove unused API BTM_IsPhy2mSupported Properly conform tACL_CONN field names Add stack/include::BT_HDR rigid struct Use proper types tSMP_STATUS Properly type stack/smp::tSMP_EVT Remove useless extern keyword for definitions Remove unused stack/gatt/gatt_int::#defs Re-include bta/ag/bta_ag_sdp.cc
Just build AOSP - Fluoride is there by default.
Instructions for Ubuntu, tested on 14.04 with Clang 3.5.0 and 16.10 with Clang 3.8.0
mkdir ~/fluoride cd ~/fluoride git clone https://android.googlesource.com/platform/packages/modules/Bluetooth/system
Install dependencies (require sudo access):
cd ~/fluoride/bt build/install_deps.sh
Then fetch third party dependencies:
cd ~/fluoride/bt mkdir third_party cd third_party git clone https://github.com/google/googletest.git git clone https://android.googlesource.com/platform/external/aac git clone https://android.googlesource.com/platform/external/libchrome git clone https://android.googlesource.com/platform/external/libldac git clone https://android.googlesource.com/platform/external/modp_b64 git clone https://android.googlesource.com/platform/external/tinyxml2
And third party dependencies of third party dependencies:
cd fluoride/bt/third_party/libchrome/base/third_party mkdir valgrind cd valgrind curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/valgrind.h?format=TEXT | base64 -d > valgrind.h curl https://chromium.googlesource.com/chromium/src/base/+/master/third_party/valgrind/memcheck.h?format=TEXT | base64 -d > memcheck.h
NOTE: If packages/modules/Bluetooth/system is checked out under AOSP, then create symbolic links instead of downloading sources
cd packages/modules/Bluetooth/system mkdir third_party cd third_party ln -s ../../../external/aac aac ln -s ../../../external/libchrome libchrome ln -s ../../../external/libldac libldac ln -s ../../../external/modp_b64 modp_b64 ln -s ../../../external/tinyxml2 tinyxml2 ln -s ../../../external/googletest googletest
cd ~/fluoride/bt gn gen out/Default
cd ~/fluoride/bt ninja -C out/Default all
This will build all targets (the shared library, executables, tests, etc) and put them in out/Default. To build an individual target, replace "all" with the target of your choice, e.g. ninja -C out/Default net_test_osi
.
cd ~/fluoride/bt/out/Default LD_LIBRARY_PATH=./ ./bluetoothtbd -create-ipc-socket=fluoride
Follows the Chromium project Eclipse Setup Instructions until "Optional: Building inside Eclipse" section (don't do that section, we will set it up differently)
Generate Eclipse settings:
cd packages/modules/Bluetooth/system gn gen --ide=eclipse out/Default
In Eclipse, do File->Import->C/C++->C/C++ Project Settings, choose the XML location under packages/modules/Bluetooth/system/out/Default
Right click on the project. Go to Preferences->C/C++ Build->Builder Settings. Uncheck "Use default build command", but instead using "ninja -C out/Default"
Goto Behaviour tab, change clean command to "-t clean"