• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Build environment for Floss
2#
3# This dockerfile generates the build environment required to build Floss, which
4# is the Linux build for the Fluoride Bluetooth stack.
5
6# Inherit from a recent Debian version. The slim version is a smaller variant
7# meant for containers.
8# This digest is taken from the tag debian:bookworm-slim (if you want to update)
9FROM debian@sha256:b66f66d473ef3128436ba2812198edcae86c268eb530dff44ff6ae26f9a2ee30
10
11# First install all required apt packages.
12RUN apt-get update && \
13    apt-get install -y \
14    bison \
15    build-essential \
16    clang \
17    cmake \
18    curl \
19    debmake \
20    flatbuffers-compiler \
21    flex \
22    g++-multilib \
23    gcc-multilib \
24    generate-ninja \
25    gnupg \
26    gperf \
27    libabsl-dev \
28    libc++abi-dev \
29    libc++-dev \
30    libdbus-1-dev \
31    libdouble-conversion-dev \
32    libevent-dev \
33    libflatbuffers-dev \
34    libflatbuffers1 \
35    libgl1-mesa-dev \
36    libglib2.0-dev \
37    libgtest-dev \
38    libgmock-dev \
39    liblz4-tool \
40    libncurses5 \
41    libnss3-dev \
42    libprotobuf-dev \
43    libre2-9 \
44    libre2-dev \
45    libssl-dev \
46    libtinyxml2-dev \
47    libx11-dev \
48    libxml2-utils \
49    ninja-build \
50    openssl \
51    protobuf-compiler \
52    python3 \
53    unzip \
54    x11proto-core-dev \
55    xsltproc \
56    zip \
57    zlib1g-dev \
58    ;
59
60# Next install the Rust toolchain. Download the toolchain to the local folder
61# using curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs
62ADD rustup/rustup.sh /tmp
63RUN /tmp/rustup.sh -y --default-toolchain 1.59.0
64
65# Add .cargo/bin to $PATH
66ENV PATH="/root/.cargo/bin:${PATH}"
67
68# Install cargo packages required on build image.
69RUN cargo install cxxbridge-cmd --version 1.0.42
70
71# Rename llvm packages. By default, they are named 11vm-ar-13, etc. which won't
72# work properly with the build.
73ADD llvm-rename.sh /tmp
74RUN /tmp/llvm-rename.sh 13
75
76# At this point, the base container is ready. Now we need to build and install
77# both libchrome and modp-b64. If you ran this via `docker-build-image.py`, this
78# will be done after the image is created and tagged. Otherwise, you need to
79# manually mount the source and run the dpkg builders in `system/build/dpkg`.
80