commit | 39273c48d0b8ac37ba5ad9bdd1653b866d94fb70 | [log] [tgz] |
---|---|---|
author | Yifei Teng <yifeit@google.com> | Fri Oct 07 21:13:49 2022 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Oct 07 21:13:49 2022 +0000 |
tree | 6dc93afc85adab777c0caa138bbe297805e6c016 | |
parent | 245fd8b2f1b182e0d49e09bd3ef2c178e88daae5 [diff] |
[fidl] Fix incorrect error conversion when making FIDL calls The domain error of EvaluateObject is fuchsia_hardware_acpi::Status. The code used to implicitly cast that to a zx_status_t. Instead of coming up with a way to represent ACPI statuses with zircon statuses, we can log the ACPI status then return a generic value. TEST: it builds using tools/bazel build --config=fuchsia_x64 driver:pkg TEST: ran scripts/smoke-test.sh Fixed: 111361 Change-Id: Iba3509fbc2ba017253e5fb949804a84d1c585dd2 Reviewed-on: https://fuchsia-review.googlesource.com/c/drivers/misc/google/backlight/+/736114 Reviewed-by: Novin Changizi <novinc@google.com> Reviewed-by: Suraj Malhotra <surajmalhotra@google.com> Reviewed-by: Renato Mangini Dias <mangini@google.com>
This repository contains instructions and source code to build, package and run the Fuchsia backlight driver that is used in the workstation_eng.chromebook-x64-dfv2
product.
Make sure this repository has the required submodules:
git submodule update --recursive --init
Run the bootstrap script that downloads the appropriate Bazel binary:
scripts/bootstrap.sh
Ensure that there are Fuchsia SSH keys in your host machine. You will need them for running the Fuchsia emulator.
[[ -f "${HOME}/.ssh/fuchsia_ed25519" ]] || ssh-keygen -P "" -t ed25519 -f "${HOME}/.ssh/fuchsia_ed25519" -C "${USER}@$(hostname -f) Shared SSH Key for Fuchsia" [[ -f "${HOME}/.ssh/fuchsia_authorized_keys" ]] || ssh-keygen -y -f "${HOME}/.ssh/fuchsia_ed25519" > "${HOME}/.ssh/fuchsia_authorized_keys"
The repository is ready to build the samples.
Note: in order to use an SDK produced by a local Fuchsia platform tree, you can set an environment variable named
LOCAL_FUCHSIA_PLATFORM_BUILD
as described in https://fuchsia.googlesource.com/sdk-integration/+/refs/heads/main/using_local_sdk.md
Fetch the system images
tools/ffx product-bundle get workstation_eng.chromebook-x64-dfv2 --repository workstation
Prepare and connect the Pixelbook Go, by flashing and/or paving it (not covered here), and connect using Ethernet.
The product bundle comes with on-demand packages in a separate repository.
Use the following command to register it with the device:
tools/ffx target repository register -r workstation --alias fuchsia.com
Update (OTA) the device to the version of the SDK:
tools/ffx target update check-now --monitor
(optional) watch the device log in a separate window
tools/ffx log
Load the driver
Now you are ready to register the driver.
First, let's confirm that the driver is not loaded:
tools/ffx driver list | grep backlight
The command above should not return any driver because it has not been registered.
Now register the driver:
tools/bazel run --config=fuchsia_x64 driver:pkg.component
The driver now should show in the list of loaded drivers:
tools/ffx driver list | grep backlight fuchsia-pkg://bazel.pkg.component/backlight_driver#meta/backlight_driver.cm