install-armhf-deps 1.1 KB

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