crosvm/system_api/update_bindings.sh
Yuan Yao 4f352d3792 system_api: add power_manager bindings and update other bindings
This CL adds power_manager D-Bus bindings, which will be used in a
follow-up CL. Also updates other bindings as a result of running
update_bindings.sh.

BUG=b:361281568
TEST=./update_bindings.sh
TEST=emerge-<BOARD> crosvm

Change-Id: I1411d1b07f8a99bab6d6af45fb32649d83cbadf5
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5883998
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Yuan Yao <yuanyaogoog@chromium.org>
2024-10-10 09:12:27 +00:00

28 lines
856 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.
STUB_DIR=$(dirname "$0")
SYSTEM_API_DIR="$HOME/chromiumos/src/platform2/system_api"
if ! [ -e "$SYSTEM_API_DIR" ]; then
echo "This script must be run from a ChromeOS checkout and inside cros_sdk."
fi
# The system_api build.rs will generate bindings in $SYSTEM_API_DIR/src
(cd "$SYSTEM_API_DIR" && cargo build)
FILES=(
"src/bindings/client/org_chromium_spaced.rs"
"src/bindings/client/org_chromium_vtpm.rs"
"src/bindings/client/org_chromium_power_manager.rs"
"src/protos/spaced.rs"
"src/protos/vtpm_interface.rs"
)
for FILE in "${FILES[@]}"; do
TARGET_DIR=$(dirname "$STUB_DIR/$FILE")
mkdir -p "$TARGET_DIR"
cp "$SYSTEM_API_DIR/$FILE" "$TARGET_DIR"
done