• 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
7rustup target add armv7-unknown-linux-gnueabihf
8
9# Generate a cross file for meson to compile for armhf
10sudo mkdir -p -m 0755 /usr/local/share/meson/cross
11sudo tee /usr/local/share/meson/cross/armhf >/dev/null <<EOF
12[binaries]
13c = '/usr/bin/arm-linux-gnueabihf-gcc'
14cpp = '/usr/bin/arm-linux-gnueabihf-g++'
15ar = '/usr/bin/arm-linux-gnueabihf-ar'
16strip = '/usr/bin/arm-linux-gnueabihf-strip'
17objcopy = '/usr/bin/arm-linux-gnueabihf-objcopy'
18ld= '/usr/bin/arm-linux-gnueabihf-ld'
19pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'
20
21[properties]
22
23[host_machine]
24system = 'linux'
25cpu_family = 'arm'
26cpu = 'arm7hlf'
27endian = 'little'
28EOF
29