This bug tracks the refactoring of build of Newblue so that Newblue can work with Gentoo ebuild. The task includes - integrating Newblue build as a part of Gentoo ebuild - rewriting Makefile files
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/newblue/+/c78ee722d42225f20739e579bdbb18a0715a7b6d commit c78ee722d42225f20739e579bdbb18a0715a7b6d Author: Miao-chen Chou <mcchou@chromium.org> Date: Fri May 25 21:33:43 2018 build: export the symbol explicitly As a preparation to rewrite the Makefile, to make newblue as a shared library and to integrate into the build system, this eliminates the assumption on the visibility of symbols by export them explicitly. This also fixes a compilation warning in gatt.c. BUG= chromium:844266 TEST=build Change-Id: I5abd21c8a59c7a1c0635b0c9aa946e135dea557d [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/gatt-builtin.h [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/persist.h [add] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/export.h [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/uuid.h [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/bt_vendor_lib.h [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/l2cap.h [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/timer.h [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/gatt.h [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/test.c [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/att.h [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/gatt.c [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/sm.h [modify] https://crrev.com/c78ee722d42225f20739e579bdbb18a0715a7b6d/hci.h
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/newblue/+/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f commit 2ba8d501699bb88dc7c20582ecb53412ba4d6c7f Author: Miao-chen Chou <mcchou@chromium.org> Date: Thu May 31 10:50:15 2018 build: Rewrite build with common.mk This rewrites the Makefiles of Newblue based on common.mk copied from platform2/common-mk. The targets include - libnewblue.so: a shared lib which used by Newblue daemon - hci_plugin/libbt-vendor.so: a shared lib use by libnewblue.so - new_blue_test: an executable for testing during development - tests/newblue_unittest: an executable for Newblue unit tests Other fixes: - replacing PREF_PATH with pref_path which is defined an extern variable and the different definitions are picked based on the targets due to the link error caused the build system reusing the same object without re-compiling even if CFLAGs have changed - removing the use of _UNITTEST_ due to the link error caused by the build system reusing the same object without re-compiling even if CFLAGS have changed - removing the use of static_or_test macro which depends on the _UNITTEST_ flag - compilation errors in gatt.c, tests/persist_unittest.cc and unused variables BUG= chromium:844266 TEST=build Newblue with the following commands and verify build and installation make (with CC=clang and CXX=clang++) make test (with CC=clang and CXX=clang++) emerge-$BOARD newblue FEATURES="test" emerge-{$BOARD} newblue cros deploy DUT newblue CQ-DEPEND=CL:1056095 Change-Id: I454020ab9ae2d4c9f59b2e79aef63ea957b35aa3 Reviewed-on: https://chromium-review.googlesource.com/1064979 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Miao-chen Chou <mcchou@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/config.h [modify] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/tests/persist_unittest.cc [add] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/config_for_unittest.c [add] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/config.c [modify] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/Makefile [modify] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/tests/sm_unittest.cc [modify] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/.gitignore [modify] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/persist.c [modify] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/sm.c [add] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/tests/module.mk [add] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/hci_plugin/module.mk [add] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/common.mk [modify] https://crrev.com/2ba8d501699bb88dc7c20582ecb53412ba4d6c7f/sm.h [delete] https://crrev.com/d08ee3bd16611399a7efe7ddc38ab000787135d5/hci_plugin/Makefile
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/newblue/+/d08ee3bd16611399a7efe7ddc38ab000787135d5 commit d08ee3bd16611399a7efe7ddc38ab000787135d5 Author: Miao-chen Chou <mcchou@chromium.org> Date: Thu May 31 10:50:15 2018 build: export the missing symbols This exposes the missing symbols for test program. BUG= chromium:844266 TEST=build Change-Id: Ib0eebf8998d46ed1ea7db16dd116c51d901b76af Reviewed-on: https://chromium-review.googlesource.com/1077808 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Miao-chen Chou <mcchou@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/d08ee3bd16611399a7efe7ddc38ab000787135d5/att.h [modify] https://crrev.com/d08ee3bd16611399a7efe7ddc38ab000787135d5/l2cap.h [modify] https://crrev.com/d08ee3bd16611399a7efe7ddc38ab000787135d5/sm.h
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/newblue/+/423fb4358dd7cac5619fe9d251c76dc4f9b9e686 commit 423fb4358dd7cac5619fe9d251c76dc4f9b9e686 Author: Miao-chen Chou <mcchou@chromium.org> Date: Fri Jun 01 20:27:18 2018 build: fix compilation errors Most of the unused functions and all unused variables are addressed, but there are unused functions which comes as definitions in Bluetooth spec which will be used in the following patches, so -Wno-unused-function is kept for now. BUG= chromium:844266 TEST=build Newblue CQ-DEPEND=CL:1064979 Change-Id: Ie84b75b03f3ee4add736be22e803b2b796ef0df8 Reviewed-on: https://chromium-review.googlesource.com/1077809 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Miao-chen Chou <mcchou@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/l2cap.c [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/tests/persist_unittest.cc [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/mt.c [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/sm.c [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/test.c [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/sendQ.c [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/persist.c [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/att.c [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/hci.c [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/hci_templated_commands.h [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/vendorLib.c [modify] https://crrev.com/423fb4358dd7cac5619fe9d251c76dc4f9b9e686/gatt.c
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/c84f427ca86fe9015f7ef02d5390ef268e219feb commit c84f427ca86fe9015f7ef02d5390ef268e219feb Author: Miao-chen Chou <mcchou@chromium.org> Date: Mon Jul 02 22:32:43 2018 bluetooth: Add newblue as a runtime dependency BUG= chromium:844266 TEST=equery-$BOARD g chromeos-base/bluetooth and verify that chromeos-base/newblue is listed Change-Id: I9632ecda5508b2ccb7bc6d02596fdc1ae854dfce Reviewed-on: https://chromium-review.googlesource.com/1066977 Commit-Ready: Sonny Sasaka <sonnysasaka@chromium.org> Tested-by: Sonny Sasaka <sonnysasaka@chromium.org> Reviewed-by: Ben Chan <benchan@chromium.org> [modify] https://crrev.com/c84f427ca86fe9015f7ef02d5390ef268e219feb/chromeos-base/bluetooth/bluetooth-9999.ebuild
Comment 1 by mcchou@chromium.org
, May 18 2018