crosvm/vm_memory/bindgen.sh
Daniel Verkamp 94f9dd5085 bindgen: use installed UAPI headers
Don't point bindgen at the Linux kernel source tree (BINDGEN_LINUX), but
rather at the installed uapi header location for one of the
architectures. This means the individual bindgen.sh scripts don't depend
on the kernel source tree location.

BUG=b:402466294

Change-Id: If0332bcc4497437ee2f68133d4e52836d0a49751
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/6345301
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Frederick Mayle <fmayle@google.com>
2025-03-12 12:30:26 -07:00

18 lines
542 B
Bash
Executable file

#!/usr/bin/env bash
# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Regenerate virtio-gpu udmabuf bindgen bindings.
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")/.."
source tools/impl/bindgen-common.sh
bindgen_generate \
--allowlist-type='udmabuf_.*' \
--allowlist-var="UDMABUF_.*" \
"${BINDGEN_LINUX_X86_HEADERS}/include/linux/udmabuf.h" \
| replace_linux_int_types | rustfmt \
> vm_memory/src/udmabuf_bindings.rs