2021-10-13 23:40:53 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-09-13 17:55:17 +00:00
|
|
|
# Copyright 2021 The ChromiumOS Authors
|
2021-10-13 23:40:53 +00:00
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
set -ex
|
|
|
|
|
2021-10-29 02:08:30 +00:00
|
|
|
sudo apt-get update
|
2021-10-13 23:40:53 +00:00
|
|
|
sudo apt-get install --yes --no-install-recommends \
|
|
|
|
ca-certificates \
|
2022-07-28 18:04:52 +00:00
|
|
|
clang \
|
2021-10-13 23:40:53 +00:00
|
|
|
cloud-image-utils \
|
|
|
|
curl \
|
|
|
|
dpkg-dev \
|
|
|
|
expect \
|
|
|
|
gcc \
|
|
|
|
git \
|
|
|
|
jq \
|
|
|
|
libasound2-dev \
|
2022-06-02 06:32:32 +00:00
|
|
|
libavcodec-dev \
|
|
|
|
libavutil-dev \
|
2021-10-13 23:40:53 +00:00
|
|
|
libclang-dev \
|
|
|
|
libdbus-1-dev \
|
|
|
|
libdrm-dev \
|
|
|
|
libepoxy-dev \
|
2022-10-04 20:29:10 +00:00
|
|
|
libglib2.0-dev \
|
2022-07-27 21:04:13 +00:00
|
|
|
libguestfs-tools \
|
2022-10-04 20:29:10 +00:00
|
|
|
libslirp-dev \
|
2021-10-13 23:40:53 +00:00
|
|
|
libssl-dev \
|
2022-06-02 06:32:32 +00:00
|
|
|
libswscale-dev \
|
2022-06-21 04:57:28 +00:00
|
|
|
libudev-dev \
|
|
|
|
libva-dev \
|
2021-10-13 23:40:53 +00:00
|
|
|
libwayland-dev \
|
|
|
|
libxext-dev \
|
|
|
|
make \
|
|
|
|
nasm \
|
|
|
|
ninja-build \
|
|
|
|
openssh-client \
|
|
|
|
pkg-config \
|
|
|
|
python3 \
|
2021-11-01 06:32:18 +00:00
|
|
|
python3-pip \
|
2021-10-13 23:40:53 +00:00
|
|
|
python3-setuptools \
|
|
|
|
qemu-system-x86 \
|
|
|
|
rsync \
|
|
|
|
screen \
|
2022-09-12 19:20:23 +00:00
|
|
|
wget \
|
2022-03-03 01:29:26 +00:00
|
|
|
wine64 \
|
|
|
|
gcc-mingw-w64-x86-64-win32 \
|
2021-10-13 23:40:53 +00:00
|
|
|
wayland-protocols
|
|
|
|
|
2022-03-22 20:04:31 +00:00
|
|
|
pip3 install \
|
|
|
|
meson \
|
|
|
|
mdformat \
|
|
|
|
argh \
|
|
|
|
mypy \
|
|
|
|
black
|
2022-02-14 20:47:01 +00:00
|
|
|
|
2022-09-12 19:20:23 +00:00
|
|
|
if ! command -v rustup &> /dev/null; then
|
|
|
|
wget "https://static.rust-lang.org/rustup/archive/1.25.1/x86_64-unknown-linux-gnu/rustup-init"
|
|
|
|
echo "5cc9ffd1026e82e7fb2eec2121ad71f4b0f044e88bca39207b3f6b769aaa799c *rustup-init" | sha256sum -c -; \
|
|
|
|
chmod +x rustup-init
|
|
|
|
./rustup-init -y --no-modify-path --profile minimal --default-toolchain none
|
|
|
|
rm rustup-init
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Install required rust components.
|
|
|
|
# This will also ensure the toolchain required by ./rust-toolchain is installed.
|
|
|
|
rustup component add cargo clippy rustfmt
|
2021-10-13 23:40:53 +00:00
|
|
|
|
2022-08-02 21:15:46 +00:00
|
|
|
# LLVM tools are used to generate and process coverage files
|
|
|
|
rustup component add llvm-tools-preview
|
|
|
|
|
2022-09-12 19:20:23 +00:00
|
|
|
# Allow cross-compilation via mingw64
|
2022-03-03 01:29:26 +00:00
|
|
|
rustup target add x86_64-pc-windows-gnu
|
|
|
|
|
2021-10-13 23:40:53 +00:00
|
|
|
# The bindgen tool is required to build a crosvm dependency.
|
|
|
|
cargo install bindgen
|
|
|
|
|
2022-08-02 21:15:46 +00:00
|
|
|
# binutils are wrappers to call the rustup bundled versions of llvm tools.
|
|
|
|
cargo install cargo-binutils
|
|
|
|
|
2022-04-08 10:51:32 +00:00
|
|
|
# Install dependencies used to generate mdbook documentation.
|
|
|
|
$(dirname "$0")/install-docs-deps
|