|
|
3 years ago | |
|---|---|---|
| .. | ||
| build | 3 years ago | |
| c2hal | 3 years ago | |
| hashing | 3 years ago | |
| hidl2aidl | 3 years ago | |
| host_utils | 3 years ago | |
| lint | 3 years ago | |
| metadata | 3 years ago | |
| scripts | 3 years ago | |
| test | 3 years ago | |
| utils | 3 years ago | |
| .clang-format | 3 years ago | |
| AST.cpp | 3 years ago | |
| AST.h | 3 years ago | |
| Android.bp | 3 years ago | |
| Annotation.cpp | 3 years ago | |
| Annotation.h | 3 years ago | |
| ArrayType.cpp | 3 years ago | |
| ArrayType.h | 3 years ago | |
| CleanSpec.mk | 3 years ago | |
| CompoundType.cpp | 3 years ago | |
| CompoundType.h | 3 years ago | |
| ConstantExpression.cpp | 3 years ago | |
| ConstantExpression.h | 3 years ago | |
| Coordinator.cpp | 3 years ago | |
| Coordinator.h | 3 years ago | |
| DeathRecipientType.cpp | 3 years ago | |
| DeathRecipientType.h | 3 years ago | |
| DocComment.cpp | 3 years ago | |
| DocComment.h | 3 years ago | |
| EnumType.cpp | 3 years ago | |
| EnumType.h | 3 years ago | |
| FmqType.cpp | 3 years ago | |
| FmqType.h | 3 years ago | |
| FormattingConstants.h | 3 years ago | |
| HandleType.cpp | 3 years ago | |
| HandleType.h | 3 years ago | |
| HidlTypeAssertion.cpp | 3 years ago | |
| HidlTypeAssertion.h | 3 years ago | |
| Interface.cpp | 3 years ago | |
| Interface.h | 3 years ago | |
| Location.cpp | 3 years ago | |
| Location.h | 3 years ago | |
| MemoryType.cpp | 3 years ago | |
| MemoryType.h | 3 years ago | |
| Method.cpp | 3 years ago | |
| Method.h | 3 years ago | |
| NOTICE | 3 years ago | |
| NamedType.cpp | 3 years ago | |
| NamedType.h | 3 years ago | |
| OWNERS | 3 years ago | |
| PREUPLOAD.cfg | 3 years ago | |
| PointerType.cpp | 3 years ago | |
| PointerType.h | 3 years ago | |
| README.md | 3 years ago | |
| Reference.h | 3 years ago | |
| ScalarType.cpp | 3 years ago | |
| ScalarType.h | 3 years ago | |
| Scope.cpp | 3 years ago | |
| Scope.h | 3 years ago | |
| StringType.cpp | 3 years ago | |
| StringType.h | 3 years ago | |
| TEST_MAPPING | 3 years ago | |
| Type.cpp | 3 years ago | |
| Type.h | 3 years ago | |
| TypeDef.cpp | 3 years ago | |
| TypeDef.h | 3 years ago | |
| VectorType.cpp | 3 years ago | |
| VectorType.h | 3 years ago | |
| generateCpp.cpp | 3 years ago | |
| generateCppAdapter.cpp | 3 years ago | |
| generateCppImpl.cpp | 3 years ago | |
| generateDependencies.cpp | 3 years ago | |
| generateFormattedHidl.cpp | 3 years ago | |
| generateInheritanceHierarchy.cpp | 3 years ago | |
| generateJava.cpp | 3 years ago | |
| generateJavaImpl.cpp | 3 years ago | |
| generateVts.cpp | 3 years ago | |
| hidl-gen_l.h | 3 years ago | |
| hidl-gen_l.ll | 3 years ago | |
| hidl-gen_y-helpers.h | 3 years ago | |
| hidl-gen_y.yy | 3 years ago | |
| main.cpp | 3 years ago | |
| update-all-google-makefiles.sh | 3 years ago | |
| update-makefiles-helper.sh | 3 years ago | |
README.md
hidl-gen
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.
1. Build
m hidl-gen
2. Run
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_extrather than other partition by putting a marker file.hidl_for_system_extalongside*.halfiles.
NOTE: You can also install the vendor variant of the generated modules to be installed in
/odmrather than/vendorby putting a marker file.hidl_for_odmalongside*.halfiles.
c2hal
This is a helper tool to convert C headers to valid .hal files.
m c2hal && c2hal -h