aosp12/system/tools/hidl
hcl 7be3fd486c init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
..
build init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
c2hal init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
hashing init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
hidl2aidl init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
host_utils init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
lint init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
metadata init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
scripts init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
test init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
utils init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
.clang-format init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
AST.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
AST.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Android.bp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Annotation.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Annotation.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ArrayType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ArrayType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
CleanSpec.mk init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
CompoundType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
CompoundType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ConstantExpression.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ConstantExpression.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Coordinator.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Coordinator.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
DeathRecipientType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
DeathRecipientType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
DocComment.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
DocComment.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
EnumType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
EnumType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
FmqType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
FmqType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
FormattingConstants.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
HandleType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
HandleType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
HidlTypeAssertion.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
HidlTypeAssertion.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Interface.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Interface.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Location.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Location.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
MemoryType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
MemoryType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Method.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Method.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
NOTICE init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
NamedType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
NamedType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
OWNERS init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
PREUPLOAD.cfg init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
PointerType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
PointerType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
README.md init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Reference.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ScalarType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
ScalarType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Scope.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Scope.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
StringType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
StringType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
TEST_MAPPING init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Type.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
Type.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
TypeDef.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
TypeDef.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
VectorType.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
VectorType.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
generateCpp.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
generateCppAdapter.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
generateCppImpl.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
generateDependencies.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
generateFormattedHidl.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
generateInheritanceHierarchy.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
generateJava.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
generateJavaImpl.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
generateVts.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
hidl-gen_l.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
hidl-gen_l.ll init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
hidl-gen_y-helpers.h init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
hidl-gen_y.yy init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
main.cpp init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
update-all-google-makefiles.sh init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00
update-makefiles-helper.sh init from android-12.1.0_r8 2023-01-09 17:11:35 +08:00

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