• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2# Copyright 2021 The ChromiumOS Authors
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5set -ex
6
7sudo apt-get install --yes --no-install-recommends \
8    gcc-aarch64-linux-gnu \
9    ipxe-qemu \
10    libavcodec-dev:arm64 \
11    libavutil-dev:arm64 \
12    libc-dev:arm64 \
13    libcap-dev:arm64 \
14    libdbus-1-dev:arm64 \
15    libdrm-dev:arm64 \
16    libepoxy-dev:arm64 \
17    libssl-dev:arm64 \
18    libswscale-dev:arm64 \
19    libva-dev:arm64 \
20    libwayland-dev:arm64 \
21    libxext-dev:arm64 \
22    qemu-efi-aarch64 \
23    qemu-system-aarch64 \
24    qemu-user-static
25
26rustup target add aarch64-unknown-linux-gnu
27
28# Generate a cross file for meson to compile for aarch64
29sudo mkdir -p -m 0755 /usr/local/share/meson/cross
30sudo tee /usr/local/share/meson/cross/aarch64 >/dev/null <<EOF
31[binaries]
32c = '/usr/bin/aarch64-linux-gnu-gcc'
33cpp = '/usr/bin/aarch64-linux-gnu-g++'
34ar = '/usr/bin/aarch64-linux-gnu-ar'
35strip = '/usr/bin/aarch64-linux-gnu-strip'
36objcopy = '/usr/bin/aarch64-linux-gnu-objcopy'
37ld= '/usr/bin/aarch64-linux-gnu-ld'
38pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'
39
40[properties]
41
42[host_machine]
43system = 'linux'
44cpu_family = 'aarch64'
45cpu = 'arm64'
46endian = 'little'
47EOF
48