Skip to content
Snippets Groups Projects
  1. Oct 17, 2022
    • Abhishek Pandit-Subedi's avatar
      floss: Default build.py to release builds for Rust · 30e5730d
      Abhishek Pandit-Subedi authored
      Switch build.py to use release builds by default for Rust. This saves us
      ~5gb in generated files in the build output folder.
      
      Bug: 254085165
      Tag: #floss
      Test: ./build.py && ./build.py --target test
      Change-Id: I5abc239afe97dfb7e0e80d8df75325451b1aaa49
      30e5730d
  2. Sep 28, 2022
    • Abhishek Pandit-Subedi's avatar
      floss: Delete rootcanal Cargo.lock in build.py · 16617289
      Abhishek Pandit-Subedi authored
      When running ./build.py --target clean, we should also get rid of the
      rootcanal build.py so we don't get package conflicts.
      
      Bug: 249187187
      Tag: #floss
      Test: ./build.py --target clean and full build after.
      Change-Id: Ifccc28f38ed0ec8c899dac3430be816b9653bd83
      16617289
  3. Sep 19, 2022
  4. Sep 15, 2022
  5. Sep 14, 2022
    • Sonny Sasaka's avatar
      Floss: Add --print-env to build.py · 5b7e6f2d
      Sonny Sasaka authored
      --print-env prints the same environment variables used by build.py, this
      is useful for setting up external tools like rust-analyzer.
      
      The output can be `eval`-ed directly in shell or copied to the external
      tool's configuration.
      
      Bug: 176846220
      Tag: #floss
      Test: Manual - Ran build.py --print-env
      
      Change-Id: I51fe9cc64237207b37ba7f8d98bd386387e735e9
      5b7e6f2d
  6. Sep 12, 2022
    • Abhishek Pandit-Subedi's avatar
      floss: Recover via reset after multiple starts · b04e6a92
      Abhishek Pandit-Subedi authored
      If we attempt to start multiple times and are unsuccessful, try using
      the reset mechanism to recover instead of trying to start.
      
      This also changes the condition for attempting a restart/reset from
      depending on device presence. On Linux, when we bind the socket as
      userchannel, the device presence is false (index is removed). It makes
      more sense to attempt retry if we want the device enabled.
      
      Bug: 236709385
      Tag: #floss
      Test: Enable/disable cycles to bad state and trigger reset.
      Change-Id: I8a9003385f8fcb6d1ac237670087d34ed9590048
      b04e6a92
  7. Aug 30, 2022
  8. Aug 24, 2022
    • Ivan Podogov's avatar
      Add support for cargo build of LMP · d7b6b6d3
      Ivan Podogov authored
      This change adds an option to skip generating Bluetooth packets using
      bluetooth_packetgen if these were already built in advance.
      It also adds crate definition for liblmp, similar to bt_packets.
      
      Bug: 238726856
      Tag: #floss
      Test: cargo build
      Change-Id: Ib099b56c0eb39c37cb459132ddf2a813cb63ebf6
      d7b6b6d3
  9. Aug 11, 2022
    • Andre Braga's avatar
      Detect non x86_64 machine in build script. · aa11e7d8
      Andre Braga authored
      This change adds functionality to detect whether the
      host machine is x86_64, which is the only machine currently supported by
      the build script.
      
      Bug: 241967798
      Tag: #floss
      Test: run ./build.py on non x86_64 and observe script exiting, run on x86_64 and
      observe normal behavior.
      
      Change-Id: Ia9837e26c78559e85b00cc8637daa2874cb3d8d8
      aa11e7d8
  10. Jul 06, 2022
    • Andre Braga's avatar
      Fix help text for '--no-clang' flag. · 17ff7bc8
      Andre Braga authored
      Setting the '--no-clang' flag makes the build use gcc/g++ instead of clang, contrary to current help text.
      
      Bug: 238217027
      Tag: #floss
      Test: Manual - Run "./build.py --no-clang" and see that gcc/g++ is being run instead of clang.
      
      Change-Id: I0f920141b7bda7ff586ba40d4a97dcefd7d2e7f8
      17ff7bc8
  11. Jun 16, 2022
    • Sonny Sasaka's avatar
      Floss: Check for C++ output dir instead of Rust output dir · c1bc8e16
      Sonny Sasaka authored
      To determine whether to re-run build script for btadapterd, check the
      C++ output dir instead of Rust output dir, otherwise we will always
      rebuild btadapterd unconditionally.
      
      Bug: 203696027
      Tag: #floss
      Test: Manual - cargo build and check that btadapterd is only built once
      unless there is a change in C++ output dir
      
      Change-Id: I54fe4293a64d0d1abad3828d12590b63650d4ee6
      c1bc8e16
  12. May 03, 2022
    • Sonny Sasaka's avatar
      Floss: Add protobuf build to btmanagerd · ae9f652b
      Sonny Sasaka authored
      Prepares build system to support protobuf with powerd D-Bus integration.
      
      Bug: 224606285
      Tag: #floss
      Test: Manual - build.py
      
      Change-Id: I9b701a84d11dde3ed9414711a371707106f28b57
      ae9f652b
  13. Apr 29, 2022
    • Sonny Sasaka's avatar
      Floss: Exclude uninteresting warning from Linux build · 87bacb6f
      Sonny Sasaka authored
      Added rust flags to hide uninterested warning categories so that we can
      see more useful warnings easily.
      
      Bug: 179821440
      Tag: Floss
      Test: Build Floss on Linux with build.py
      
      Change-Id: I168322d83053a2889f9487fb92b2d9220eb82d35
      87bacb6f
  14. Feb 16, 2022
  15. Feb 14, 2022
  16. Feb 08, 2022
    • Abhishek Pandit-Subedi's avatar
      floss: Improve build.py for docs and test · 94764140
      Abhishek Pandit-Subedi authored
      Add a `-test-name` parameter to filter tests and added a `--target docs`
      option to generate Rustdocs.
      
      Bug: 218551688
      Tag: #floss
      Test: ./build.py --target docs
      Change-Id: Ifed930a9e04b8560d76a3f9e55d4470375562daf
      94764140
  17. Nov 23, 2021
    • Abhishek Pandit-Subedi's avatar
      floss: Add install target to build.py · a1a94d18
      Abhishek Pandit-Subedi authored
      The install target will copy binaries to target directory and strip
      binaries so that they're smaller. Also add an option to not strip
      binaries during install (default is to run strip).
      
      Bug: 207009162
      Tag: #floss
      Test: ./build.py --target install
      Change-Id: Ifb805a35623e4243cb28e63478a06ae0747c579f
      a1a94d18
    • Abhishek Pandit-Subedi's avatar
      floss: Update symlinks when re-running --run-bootstrap · b987eb68
      Abhishek Pandit-Subedi authored
      If re-running --run-bootstrap multiple times, do everything except git
      clone on re-runs. This makes it possible to switch between multiple
      repos when developing while sharing the staging directory at ~/.floss.
      
      Bug: 207009162
      Tag: #floss
      Test: ./build.py --run-bootstrap
      Change-Id: Iba7324a3ab88ae47cf275e1492395508135ff76d
      b987eb68
  18. Nov 12, 2021
    • Abhishek Pandit-Subedi's avatar
      Revert "Floss: Fix build post repo migration" · eb958798
      Abhishek Pandit-Subedi authored
      This reverts commit ddd429fe.
      
      As it turns out, we will need to change //bt to //bt/system after all
      because the ChromeOS ebuild can't easily handle the subdirectory change
      otherwise.
      
      Bug: 205591223
      Test: Run `./build.py`
      Tag: #floss
      Change-Id: I620221cb589712dfc1f84c7ea87a175634a86250
      eb958798
  19. Nov 08, 2021
  20. Oct 01, 2021
  21. Sep 21, 2021
    • Abhishek Pandit-Subedi's avatar
      floss: Refactor build script and merge bootstrapping · 0db7701e
      Abhishek Pandit-Subedi authored
      Removed the separate bootstrap.py and merged its functionality into
      build.py. With all the changes, this is how you do bootstrapping
      + building now:
      
      ./build.py --run-bootstrap
      ./build.py
      
      This changes defaults to something reasonable in the scripts. A few of
      the defaults that were changed:
      
      * Set bootstrap dir default to ~/.floss
      * Libdir changed to /usr/lib
      * Clang made default and --no-clang added instead
      * Vendored rust made default and --no-vendored-rust added instead
      
      Bug: 200620285
      Tag: #floss
      Test: ./build.py --run-bootstrap && ./build.py
      Change-Id: I305c6baa8a47e958dfa8e136eb60b08fc742effc
      0db7701e
  22. Sep 16, 2021
  23. Jun 14, 2021
    • Abhishek Pandit-Subedi's avatar
      Disable building C++ tests for Linux · 70e43040
      Abhishek Pandit-Subedi authored
      Due to the use of multiple build systems, link dependencies between C++
      and Rust where C++ does the final linking will fail. Until we have full
      Bazel build, we can't enable these tests again.
      
      Bug: 190750167
      Tag: #floss
      Test: Build for Linux
      Change-Id: Iadd7dafe9635f606c2289eb246e3e2eb4931e92c
      70e43040
  24. May 17, 2021
    • Abhishek Pandit-Subedi's avatar
      Refactor topshim with bindgen and unsafe code · 1927afa4
      Abhishek Pandit-Subedi authored
      Writing topshim interfaces is very tedious and lots of code is
      duplicated in C++. Rather that depend on unsafe C++ code, we write
      a small amount of unsafe Rust code and use macros to interact with the
      native layer directly from Rust.
      
      A few major changes introduced in this patch:
      - Bindgen to get Rust interface into C
      - Macros to call raw pointer functions directly
      - Macros to handle converting a callback into an enum variant
      - Refactor code to use new data structures
      - Replace use of closures for callbacks with an enum and dispatch fn
      
      This change also updates the bindgen requirement to 0.57 to match what
      Android is already using.
      
      BYPASS_INCLUSIVE_LANGUAGE_REASON=Bindgen dependency provides this api
      
      Bug: 183208689
      Tag: #floss
      Test: atest --host bluetooth_test_gd
      Change-Id: Iebe904ebc2643b48d1a371051fbf3c06f2bf04d4
      1927afa4
  25. Apr 27, 2021
  26. Apr 23, 2021
    • Abhishek Pandit-Subedi's avatar
      Additional changes for Linux build · d801b120
      Abhishek Pandit-Subedi authored
      While building for Linux on cloudtop, a few more problems were
      identified in the build. There were a couple of missing #include and
      some incomplete struct definitions in btm_int_types.h. Also put
      statslog.h behind an #ifdef OS_ANDROID.
      
      Bug: 184975659
      Tag: #floss
      Test: atest --host bluetooth_test_gd
      Change-Id: Ic2272a3acfa66259e692db280b48b4ddadff2171
      d801b120
  27. Apr 07, 2021
    • Sonny Sasaka's avatar
      Fix rust build in build.py · c1335a27
      Sonny Sasaka authored
      This copies the rust build result to the gn output directory to be
      accessible when linking from C++. Also adds an option to use crates.io
      for rust crates.
      
      Bug: 176846220
      Tag: #floss
      Test: atest --host bluetooth_test_gd
      Change-Id: I9f7732878a2aced6f80f363c25aff3243d34f0d5
      c1335a27
    • Sonny Sasaka's avatar
      Guard printing PKG_CONFIG_PATH in build.py · 706ec3b0
      Sonny Sasaka authored
      Bug: 176846220
      Tag: #floss
      Test: atest --host bluetooth_test_gd
      Change-Id: Iba0c739a07bcfa7256ea624e2391d5cee016d2de
      706ec3b0
  28. Mar 04, 2021
    • Abhishek Pandit-Subedi's avatar
      Add build.py to simplify building locally · f52cf665
      Abhishek Pandit-Subedi authored
      This adds a script that can build system/bt locally on your Linux
      machine. Please see required folder layout in the script on how to
      prepare your environment and check the help text on how to use it.
      
      In its simplest form (for example):
        ./build.py --out ../build --platform-dir ../staging --clang
      
      This will build all of systembt in ../build using the ../staging
      directory as your source directory and will use the clang compiler to do
      the build.
      
      Bug: 179821440
      Tag: #floss
      Test: atest --host bluetooth_test_gd
      
      Change-Id: I9c6a9fa30235b2fc661a0fe327154f18a03ca026
      f52cf665
Loading