• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2# Copyright 2022 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#
6# Regenerate all bindgen-generated Rust bindings in the crosvm tree.
7#
8# This script expects to be executed from a full ChromeOS checkout so it has access to the kernel
9# and other repositories. Note that it must be run from OUTSIDE the chroot.
10
11set -e
12cd "$(dirname "${BASH_SOURCE[0]}")/.."
13
14source tools/impl/bindgen-common.sh
15
16die() {
17    echo "$@"
18    exit 1
19}
20
21dirs=(
22    io_uring
23    kernel_loader
24    kvm_sys
25    media/ffmpeg
26    media/libva
27    media/libvda
28    net_sys
29    vfio_sys
30    virtio_sys
31    vm_memory
32)
33
34for d in "${dirs[@]}"; do
35    echo "bindgen ${d}"
36    "${d}"/bindgen.sh || die "Failed to generate bindings for ${d}"
37done
38
39echo "Done!"
40