Компиляция фторидного стека bluetooth для встроенного linux - PullRequest
0 голосов
/ 18 июня 2020

Кто-нибудь смог собрать фтористый стек блютуз отдельно для встроенного устройства linux?
Есть руководство по адресу https://android.googlesource.com/platform/system/bt/+/181144a50114c824cfe3cdfd695c11a074673a5e/README.md, но выполнение этих инструкций gn gen не позволяет получить папку common-mk и модифицировать некоторые файлы сборки, чтобы не было пропущенных переменных, папок и т. Д. c .

Мне удалось сгенерировать файлы Ninja, но при сборке отсутствуют заголовки gtest и modp_b64. Получив их из поиска источников Google, Ninja, похоже, может немного работать без ошибок, но в конечном итоге выходит из строя с:

In file included from ../../third_party/libchrome/base/message_loop/message_loop.h:18:
../../third_party/libchrome/base/message_loop/message_loop_current.h:209:3: error: static_assert failed due to requirement 'std::is_same<MessagePumpForUI, MessagePumpLibevent>::value' "MessageLoopCurrentForUI::WatchFileDescriptor is not supported when MessagePumpForUI is not a MessagePumpLibevent."
  static_assert(std::is_same<MessagePumpForUI, MessagePumpLibevent>::value,
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/libchrome/base/message_loop/message_loop_current.h:214:28: error: no type named 'Mode' in 'base::MessagePumpGlib'; did you mean 'MessagePumpLibevent::Mode'?
                           MessagePumpForUI::Mode mode,
                           ^~~~~~~~~~~~~~~~~~~~~~
                           MessagePumpLibevent::Mode
../../third_party/libchrome/base/message_loop/watchable_io_message_pump_posix.h:55:8: note: 'MessagePumpLibevent::Mode' declared here
  enum Mode {
       ^
In file included from ../../third_party/libchrome/base/run_loop.cc:10:
In file included from ../../third_party/libchrome/base/message_loop/message_loop.h:18:
../../third_party/libchrome/base/message_loop/message_loop_current.h:215:28: error: no type named 'FdWatchController' in 'base::MessagePumpGlib'; did you mean 'MessagePumpLibevent::FdWatchController'?
                           MessagePumpForUI::FdWatchController* controller,
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           MessagePumpLibevent::FdWatchController
../../third_party/libchrome/base/message_loop/message_pump_libevent.h:28:9: note: 'MessagePumpLibevent::FdWatchController' declared here
  class FdWatchController : public FdWatchControllerInterface {
        ^
In file included from ../../third_party/libchrome/base/run_loop.cc:10:
In file included from ../../third_party/libchrome/base/message_loop/message_loop.h:18:
../../third_party/libchrome/base/message_loop/message_loop_current.h:216:28: error: no type named 'FdWatcher' in 'base::MessagePumpGlib'; did you mean 'MessagePumpLibevent::FdWatcher'?
                           MessagePumpForUI::FdWatcher* delegate);
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                           MessagePumpLibevent::FdWatcher
../../third_party/libchrome/base/message_loop/watchable_io_message_pump_posix.h:17:9: note: 'MessagePumpLibevent::FdWatcher' declared here
  class FdWatcher {
        ^
4 errors generated.

Все ошибки и отсутствующие файлы происходят из third_party/libchrome
Любая помощь будет принята с благодарностью

1 Ответ

0 голосов
/ 03 августа 2020

Причина, по которой возникают проблемы с common-mk, потому что между написанием инструкций и теперь lib chrome добавила файл BUILD.gn - поэтому он используется вместо заменяющего файла в build/secondary/third-party/libchrome как предполагалось. Чтобы исправить эту часть сборки, просто удалите third-party/libchrome/BUILD.gn - это должно предотвратить необходимость много возиться со сборкой.

Вторая часть связана с конфигурацией lib chrome. После удаления упомянутого файла вам необходимо изменить build/secondary/third-party/libchrome/BUILD.gn, чтобы добавить следующее не только в source_set (как это делается в восходящем направлении), но и в libchrome_config для нижестоящих пользователей:

 defines = [
    "__ANDROID_HOST__=1",
 ]

Это повлияет на конфигурацию сборки, поэтому она не будет пытаться использовать glib.

Моя лучшая работа по созданию этой сборки находится здесь, хотя я еще не заставил ее работать полностью. https://github.com/rpavlik/fluoride Я делал это в основном в качестве эксперимента, не стесняйтесь продолжать с того места, где я остановился.

...