commit | 6022c509a2fb66a0c0ac1744037ee8f802fe01df | [log] [tgz] |
---|---|---|
author | Bob Badour <bbadour@google.com> | Fri Feb 12 15:42:03 2021 -0800 |
committer | Bob Badour <bbadour@google.com> | Fri Feb 12 15:42:03 2021 -0800 |
tree | 903ffe268fa83536d59f0f25cbe60ac80a85c5e8 | |
parent | 6758967cf2461d677d7cb4a05c7ce3fada3ba3c9 [diff] |
[LSC] Add LOCAL_LICENSE_KINDS to system/tools/hidl Added SPDX-license-identifier-Apache-2.0 to: Android.bp build/Android.bp c2hal/Android.bp c2hal/test/Android.bp hashing/Android.bp hidl2aidl/Android.bp hidl2aidl/test/1.0/Android.bp hidl2aidl/test/1.1/Android.bp hidl2aidl/test/1.2/Android.bp hidl2aidl/test/3.0/Android.bp hidl2aidl/test/Android.bp host_utils/Android.bp lint/Android.bp lint/test/Android.bp metadata/Android.bp test/Android.bp test/build_variants/1.0/Android.bp test/build_variants/2.0/Android.bp test/build_variants/Android.bp test/cpp_impl_test/Android.bp test/error_test/Android.bp test/export_test/Android.bp test/format_test/1.0/Android.bp test/format_test/Android.bp test/hash_test/Android.bp test/hidl_test/Android.bp test/host_test/Android.bp test/host_utils_test/Android.bp test/java_impl_test/Android.bp test/java_partial_test/Android.bp test/java_test/Android.bp test/lazy_test/Android.bp test/system_api_test/Android.bp test/utils_test/Android.bp test/vendor/1.0/Android.bp test/vendor/1.1/Android.bp test/vendor/android/1.0/Android.bp test/version_test/Android.bp utils/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: If0ee33014e4b80454657ad11745f73ba55ed5c57
Full documentation can be found here: https://source.android.com/devices/architecture/hidl/
hidl-gen is a compiler for the HIDL (HAL Interface Design Language) which generates C++ and Java endpoints for RPC mechanisms. The main userspace libraries which this compiler uses can be found at system/libhidl.
m hidl-gen
Note that options for hidl-gen expected to be invoked by the build system are marked with ‘internal’ in the help menu.
hidl-gen -h hidl-gen -o output -L c++-impl -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0
Some defaults for package roots are also provided
hidl-gen -o output -L c++-impl android.hardware.nfc@1.0 hidl-gen -o output -L vts android.hardware.nfc@1.0 hidl-gen -L hash android.hardware.nfc@1.0
Example command for vendor project
hidl-gen -L c++-impl -r vendor.foo:vendor/foo/interfaces vendor.foo.nfc@1.0
See update-makefiles-helper.sh and update-all-google-makefiles.sh for examples of how to generate HIDL makefiles (using the -Landroidbp option).
NOTE: When using the -Landroidbp option, you can force generated modules to be installed in
/system_ext
rather than other partition by putting a marker file.hidl_for_system_ext
alongside*.hal
files.
NOTE: You can also install the vendor variant of the generated modules to be installed in
/odm
rather than/vendor
by putting a marker file.hidl_for_odm
alongside*.hal
files.
This is a helper tool to convert C headers to valid .hal files.
m c2hal && c2hal -h