• 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-arm-linux-gnueabihf \
9    libavcodec-dev:armhf \
10    libavutil-dev:armhf \
11    libc-dev:armhf \
12    libcap-dev:armhf \
13    libdbus-1-dev:armhf \
14    libdrm-dev:armhf \
15    libepoxy-dev:armhf \
16    libssl-dev:armhf \
17    libswscale-dev:armhf \
18    libva-dev:armhf \
19    libwayland-dev:armhf \
20    libxext-dev:armhf
21
22rustup target add armv7-unknown-linux-gnueabihf
23
24# Generate a cross file for meson to compile for armhf
25sudo mkdir -p -m 0755 /usr/local/share/meson/cross
26sudo tee /usr/local/share/meson/cross/armhf >/dev/null <<EOF
27[binaries]
28c = '/usr/bin/arm-linux-gnueabihf-gcc'
29cpp = '/usr/bin/arm-linux-gnueabihf-g++'
30ar = '/usr/bin/arm-linux-gnueabihf-ar'
31strip = '/usr/bin/arm-linux-gnueabihf-strip'
32objcopy = '/usr/bin/arm-linux-gnueabihf-objcopy'
33ld= '/usr/bin/arm-linux-gnueabihf-ld'
34pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
35
36[properties]
37
38[host_machine]
39system = 'linux'
40cpu_family = 'arm'
41cpu = 'arm7hlf'
42endian = 'little'
43EOF
44