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