android13/system/tools/hidl
liiir1985 7f62dcda9f initial 2024-06-22 20:45:49 +08:00
..
build initial 2024-06-22 20:45:49 +08:00
c2hal initial 2024-06-22 20:45:49 +08:00
hashing initial 2024-06-22 20:45:49 +08:00
hidl2aidl initial 2024-06-22 20:45:49 +08:00
host_utils initial 2024-06-22 20:45:49 +08:00
lint initial 2024-06-22 20:45:49 +08:00
metadata initial 2024-06-22 20:45:49 +08:00
scripts initial 2024-06-22 20:45:49 +08:00
test initial 2024-06-22 20:45:49 +08:00
utils initial 2024-06-22 20:45:49 +08:00
.clang-format initial 2024-06-22 20:45:49 +08:00
AST.cpp initial 2024-06-22 20:45:49 +08:00
AST.h initial 2024-06-22 20:45:49 +08:00
Android.bp initial 2024-06-22 20:45:49 +08:00
Annotation.cpp initial 2024-06-22 20:45:49 +08:00
Annotation.h initial 2024-06-22 20:45:49 +08:00
ArrayType.cpp initial 2024-06-22 20:45:49 +08:00
ArrayType.h initial 2024-06-22 20:45:49 +08:00
CleanSpec.mk initial 2024-06-22 20:45:49 +08:00
CompoundType.cpp initial 2024-06-22 20:45:49 +08:00
CompoundType.h initial 2024-06-22 20:45:49 +08:00
ConstantExpression.cpp initial 2024-06-22 20:45:49 +08:00
ConstantExpression.h initial 2024-06-22 20:45:49 +08:00
Coordinator.cpp initial 2024-06-22 20:45:49 +08:00
Coordinator.h initial 2024-06-22 20:45:49 +08:00
DeathRecipientType.cpp initial 2024-06-22 20:45:49 +08:00
DeathRecipientType.h initial 2024-06-22 20:45:49 +08:00
DocComment.cpp initial 2024-06-22 20:45:49 +08:00
DocComment.h initial 2024-06-22 20:45:49 +08:00
EnumType.cpp initial 2024-06-22 20:45:49 +08:00
EnumType.h initial 2024-06-22 20:45:49 +08:00
FmqType.cpp initial 2024-06-22 20:45:49 +08:00
FmqType.h initial 2024-06-22 20:45:49 +08:00
FormattingConstants.h initial 2024-06-22 20:45:49 +08:00
HandleType.cpp initial 2024-06-22 20:45:49 +08:00
HandleType.h initial 2024-06-22 20:45:49 +08:00
HidlTypeAssertion.cpp initial 2024-06-22 20:45:49 +08:00
HidlTypeAssertion.h initial 2024-06-22 20:45:49 +08:00
Interface.cpp initial 2024-06-22 20:45:49 +08:00
Interface.h initial 2024-06-22 20:45:49 +08:00
Location.cpp initial 2024-06-22 20:45:49 +08:00
Location.h initial 2024-06-22 20:45:49 +08:00
MemoryType.cpp initial 2024-06-22 20:45:49 +08:00
MemoryType.h initial 2024-06-22 20:45:49 +08:00
Method.cpp initial 2024-06-22 20:45:49 +08:00
Method.h initial 2024-06-22 20:45:49 +08:00
NOTICE initial 2024-06-22 20:45:49 +08:00
NamedType.cpp initial 2024-06-22 20:45:49 +08:00
NamedType.h initial 2024-06-22 20:45:49 +08:00
OWNERS initial 2024-06-22 20:45:49 +08:00
PREUPLOAD.cfg initial 2024-06-22 20:45:49 +08:00
PointerType.cpp initial 2024-06-22 20:45:49 +08:00
PointerType.h initial 2024-06-22 20:45:49 +08:00
README.md initial 2024-06-22 20:45:49 +08:00
Reference.h initial 2024-06-22 20:45:49 +08:00
ScalarType.cpp initial 2024-06-22 20:45:49 +08:00
ScalarType.h initial 2024-06-22 20:45:49 +08:00
Scope.cpp initial 2024-06-22 20:45:49 +08:00
Scope.h initial 2024-06-22 20:45:49 +08:00
StringType.cpp initial 2024-06-22 20:45:49 +08:00
StringType.h initial 2024-06-22 20:45:49 +08:00
TEST_MAPPING initial 2024-06-22 20:45:49 +08:00
Type.cpp initial 2024-06-22 20:45:49 +08:00
Type.h initial 2024-06-22 20:45:49 +08:00
TypeDef.cpp initial 2024-06-22 20:45:49 +08:00
TypeDef.h initial 2024-06-22 20:45:49 +08:00
VectorType.cpp initial 2024-06-22 20:45:49 +08:00
VectorType.h initial 2024-06-22 20:45:49 +08:00
generateCpp.cpp initial 2024-06-22 20:45:49 +08:00
generateCppImpl.cpp initial 2024-06-22 20:45:49 +08:00
generateDependencies.cpp initial 2024-06-22 20:45:49 +08:00
generateFormattedHidl.cpp initial 2024-06-22 20:45:49 +08:00
generateInheritanceHierarchy.cpp initial 2024-06-22 20:45:49 +08:00
generateJava.cpp initial 2024-06-22 20:45:49 +08:00
generateJavaImpl.cpp initial 2024-06-22 20:45:49 +08:00
generateVts.cpp initial 2024-06-22 20:45:49 +08:00
hidl-gen_l.h initial 2024-06-22 20:45:49 +08:00
hidl-gen_l.ll initial 2024-06-22 20:45:49 +08:00
hidl-gen_y-helpers.h initial 2024-06-22 20:45:49 +08:00
hidl-gen_y.yy initial 2024-06-22 20:45:49 +08:00
main.cpp initial 2024-06-22 20:45:49 +08:00
update-all-google-makefiles.sh initial 2024-06-22 20:45:49 +08:00
update-makefiles-helper.sh initial 2024-06-22 20:45:49 +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