1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hmz007 6d24f2138b
Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56)
3 years ago
..
test Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
AST.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
AST.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Android.bp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
CompositeDeclaration.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
CompositeDeclaration.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Declaration.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Declaration.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Define.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Define.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
EnumVarDeclaration.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
EnumVarDeclaration.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Expression.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Expression.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
FunctionDeclaration.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
FunctionDeclaration.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Include.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Include.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Note.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Note.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
README.md Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Scope.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Type.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
Type.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
TypeDef.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
TypeDef.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
VarDeclaration.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
VarDeclaration.h Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
c2hal_l.ll Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
c2hal_y.yy Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago
main.cpp Rockchip Anroid12_SDK 20220721-rkr10 (e1522e56) 3 years ago

README.md

c2hal user-guide

1. Build

croot
make c2hal -j64

2. Run

c2hal [-g] [-o dir] -p package (-r interface-root)+ (header-filepath)+

-o output path: If missing, the second half of a relevant interface-root will be used.

-p package: For example android.hardware.baz@1.0. This will be used as the package in .hal files and will also be used to construct the correct directory structure.

-g: Enabling this flag changes the behavior of c2hal to parse opengl files.

-r package:path root: For example 'android.hardware:hardware/interfaces'.

Examples:

# Build the test.h header:
c2hal -r android.hardware:hardware/interfaces -p android.hardware.baz@1.0 system/tools/hidl/c2hal/test/test.h

# Build the simple.h header:
c2hal -r android.hardware:hardware/interfaces -p android.hardware.simple@1.0 system/tools/hidl/c2hal/test/simple.h

# Build a particular libhardware header:
c2hal -r android.hardware:hardware/interfaces -p android.hardware.nfc@1.0 hardware/libhardware/include/hardware/nfc.h

# Build all headers from libhardware:
python3 system/tools/hidl/c2hal/test/build_all.py ~/android/master/hardware/libhardware/include/hardware/

# Build various OpenGl versions:
python3 system/tools/hidl/c2hal/test/build_all.py -g ~/android/master/frameworks/native/opengl/include/EGL/
python3 system/tools/hidl/c2hal/test/build_all.py -g ~/android/master/frameworks/native/opengl/include/ETC1/
python3 system/tools/hidl/c2hal/test/build_all.py -g ~/android/master/frameworks/native/opengl/include/GLES/
python3 system/tools/hidl/c2hal/test/build_all.py -g ~/android/master/frameworks/native/opengl/include/GLES2/
python3 system/tools/hidl/c2hal/test/build_all.py -g ~/android/master/frameworks/native/opengl/include/GLES3/
python3 system/tools/hidl/c2hal/test/build_all.py -g ~/android/master/frameworks/native/opengl/include/KHR/