1#!/usr/bin/env bash 2# Copyright 2023 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 geniezone_sys bindgen bindings. 7 8set -euo pipefail 9cd "$(dirname "${BASH_SOURCE[0]}")/../../../.." 10 11source tools/impl/bindgen-common.sh 12 13GZVM_SYS_BASE="hypervisor/src/geniezone/geniezone_sys" 14GZVM_BINDINGS="${GZVM_SYS_BASE}/aarch64/bindings.rs" 15 16GZVM_HEADER_FILE="${BINDGEN_LINUX_ARM64_HEADERS}/include/linux/gzvm_common.h" 17 18bindgen_generate \ 19 --blocklist-item='__kernel.*' \ 20 --blocklist-item='__BITS_PER_LONG' \ 21 --blocklist-item='__FD_SETSIZE' \ 22 --blocklist-item='_?IOC.*' \ 23 ${GZVM_HEADER_FILE} \ 24 -- \ 25 -isystem "${BINDGEN_LINUX_ARM64_HEADERS}/include" \ 26 | replace_linux_int_types \ 27 > ${GZVM_BINDINGS} 28