2021-12-07 22:01:28 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Copyright 2022 The Chromium OS Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
#
|
|
|
|
# Regenerate all bindgen-generated Rust bindings in the crosvm tree.
|
|
|
|
#
|
|
|
|
# This script expects to be executed from a full Chrome OS checkout so it has access to the kernel
|
2022-04-29 18:40:11 +00:00
|
|
|
# and other repositories. Note that it must be run from OUTSIDE the chroot.
|
2021-12-07 22:01:28 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
|
|
|
|
|
|
source tools/impl/bindgen-common.sh
|
|
|
|
|
|
|
|
die() {
|
|
|
|
echo "$@"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
dirs=(
|
2022-03-17 23:39:31 +00:00
|
|
|
io_uring
|
2021-12-07 23:01:50 +00:00
|
|
|
devices/src/virtio/gpu
|
2021-12-08 00:21:45 +00:00
|
|
|
kernel_loader
|
2021-12-08 00:46:21 +00:00
|
|
|
kvm_sys
|
2022-06-02 02:18:48 +00:00
|
|
|
media/ffmpeg
|
2022-04-01 07:03:40 +00:00
|
|
|
media/libvda
|
2021-12-13 22:21:06 +00:00
|
|
|
net_sys
|
2021-12-13 22:21:19 +00:00
|
|
|
vfio_sys
|
2021-12-08 02:51:31 +00:00
|
|
|
virtio_sys
|
2021-12-07 22:01:28 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
for d in "${dirs[@]}"; do
|
|
|
|
echo "bindgen ${d}"
|
|
|
|
"${d}"/bindgen.sh || die "Failed to generate bindings for ${d}"
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "Done!"
|