jianglk.darker
7ee447c011
|
4 months ago | |
---|---|---|
.. | ||
build | 4 months ago | |
c2hal | 4 months ago | |
hashing | 4 months ago | |
hidl2aidl | 4 months ago | |
host_utils | 4 months ago | |
lint | 4 months ago | |
metadata | 4 months ago | |
scripts | 4 months ago | |
test | 4 months ago | |
utils | 4 months ago | |
.clang-format | 4 months ago | |
AST.cpp | 4 months ago | |
AST.h | 4 months ago | |
Android.bp | 4 months ago | |
Annotation.cpp | 4 months ago | |
Annotation.h | 4 months ago | |
ArrayType.cpp | 4 months ago | |
ArrayType.h | 4 months ago | |
CleanSpec.mk | 4 months ago | |
CompoundType.cpp | 4 months ago | |
CompoundType.h | 4 months ago | |
ConstantExpression.cpp | 4 months ago | |
ConstantExpression.h | 4 months ago | |
Coordinator.cpp | 4 months ago | |
Coordinator.h | 4 months ago | |
DeathRecipientType.cpp | 4 months ago | |
DeathRecipientType.h | 4 months ago | |
DocComment.cpp | 4 months ago | |
DocComment.h | 4 months ago | |
EnumType.cpp | 4 months ago | |
EnumType.h | 4 months ago | |
FmqType.cpp | 4 months ago | |
FmqType.h | 4 months ago | |
FormattingConstants.h | 4 months ago | |
HandleType.cpp | 4 months ago | |
HandleType.h | 4 months ago | |
HidlTypeAssertion.cpp | 4 months ago | |
HidlTypeAssertion.h | 4 months ago | |
Interface.cpp | 4 months ago | |
Interface.h | 4 months ago | |
Location.cpp | 4 months ago | |
Location.h | 4 months ago | |
MemoryType.cpp | 4 months ago | |
MemoryType.h | 4 months ago | |
Method.cpp | 4 months ago | |
Method.h | 4 months ago | |
NOTICE | 4 months ago | |
NamedType.cpp | 4 months ago | |
NamedType.h | 4 months ago | |
OWNERS | 4 months ago | |
PREUPLOAD.cfg | 4 months ago | |
PointerType.cpp | 4 months ago | |
PointerType.h | 4 months ago | |
README.md | 4 months ago | |
Reference.h | 4 months ago | |
ScalarType.cpp | 4 months ago | |
ScalarType.h | 4 months ago | |
Scope.cpp | 4 months ago | |
Scope.h | 4 months ago | |
StringType.cpp | 4 months ago | |
StringType.h | 4 months ago | |
TEST_MAPPING | 4 months ago | |
Type.cpp | 4 months ago | |
Type.h | 4 months ago | |
TypeDef.cpp | 4 months ago | |
TypeDef.h | 4 months ago | |
VectorType.cpp | 4 months ago | |
VectorType.h | 4 months ago | |
generateCpp.cpp | 4 months ago | |
generateCppAdapter.cpp | 4 months ago | |
generateCppImpl.cpp | 4 months ago | |
generateDependencies.cpp | 4 months ago | |
generateFormattedHidl.cpp | 4 months ago | |
generateInheritanceHierarchy.cpp | 4 months ago | |
generateJava.cpp | 4 months ago | |
generateJavaImpl.cpp | 4 months ago | |
generateVts.cpp | 4 months ago | |
hidl-gen_l.h | 4 months ago | |
hidl-gen_l.ll | 4 months ago | |
hidl-gen_y-helpers.h | 4 months ago | |
hidl-gen_y.yy | 4 months ago | |
main.cpp | 4 months ago | |
update-all-google-makefiles.sh | 4 months ago | |
update-makefiles-helper.sh | 4 months 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_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.
c2hal
This is a helper tool to convert C headers to valid .hal files.
m c2hal && c2hal -h