HIDL for linux 测试环境搭建

Update readme a little

Marius Gripsgard authored 2 years ago

92eae373

NameLast commitLast update
hwtestsAdd some hardware tests2 years ago
srcDont do first_stage, dont set time values and dont wait for coldboot2 years ago
.gitignoreInital commit2 years ago
CMakeLists.txtHack togheter an init thingy2 years ago
readme.mdUpdate readme a little2 years ago

readme.md

HIDL for linux

This builds and generates HIDL headers and binaries.

This is work in progress, expect bugs and failures!

How it works

HIDL/treble uses a server-client format all using androids binder, and all vendor libraries does only depend on a limited set of libraries from /system, this makes it easy for us to create a enviroment with the needed services and libraries the vendor services need. Also since they use binder we can call any hardware services from glibc without using libhybris. We can also easily support new devices since all that is needed is treble support and to rebuild the kernel with the reqired configs and our initrd.

How to test

You will need to mount /vendor partition and mount/provide /system (android 9.0)

Disable all inits from /system, we dont need any of these at this moment. (rm or mv /system/etc/init)

Start the init binary built from this project. Start hwservicemanager built from this project. Start vendor service you need (example: /vendor/bin/hw/android.hardware.vibrator@1.1-service) Run hw tests (example: hwtest_vibrator)

LL-NDK includes the following libraries: libEGL.so, libGLESv1_CM.so, libGLESv2.so, libGLESv3.so, libandroid_net.so, libc.so, libdl.so, liblog.so, libm.so, libnativewindow.so, libneuralnetworks.so, libsync.so, libvndksupport.so, and libvulkan.so,

 

binder-for-linux  配合 Android 10 以上  driver

README.md
binder-for-linux
binder-for-linux is an experimental project to evaluate the feasibility of porting Android Binder IPC subsystem to Ubuntu Linux.

Environment
Ubuntu 14.04.4 LTS
Linux Kernel 4.2.0-27
gcc 4.9.3
Codebase
Binder driver: mainline kernel 4.2.0-27-generic
Android Framework version: android-6.0.1_r46
Modifications
Make binder & ashmem driver dynamically loadable
Modified as a standard loadable kernel module
Use kallsyms and a shell script to generate symbol dependencies that are not exposed by kernel (e.g. get_vm_area)
Fix compatability issues after replacing Bionic C library with glibc
Fix compatibility issues of atomic library
Some are changed to use standard C++ atomic library (C++11 and gcc 4.9.3+ are required)
cutils/atomic.h is re-implemented with x86 atomic instructions
Dependencies to Android log daemon and SELinux library are removed
And other small fixes...
Get Started
To compile all from source,

$ ./project.sh makeall
Now you can install kernel modules (binder & ashmem) by,

$ ./project.sh insmod
Then run Service Manager in background,

$ sudo servicemanager/servicemanager &
We also prepared a benchmark program to perform correctness test and performance test,

$ sudo test/binderAddInts -n 100 -p 0   # correctness test with 100 iterations
$ sudo test/binderAddInts -n 10000 -p 4096   # performance test with 4K payload and 10000 iterations

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值