Sysfs access from HAL

custom_board

#1

Hi

I want to control gpio pins from my HAL module.
So is it possible to read and write /sys/class/gpio/ from my HAL module ?

Thanks


#2

HAL? Which OS are you targeting here?


#3

android.
Hardware abstraction layer


#4

So yes you can use gpio sysfs interface from our HAL. Take care of access rights and sepolicy (if enabled).


#5

Hi Loic,

For sepolicy i am trying to use the tool audi2allow, but i am getting below error.

ERROR: ld.so: object ‘/lib64/libselinux.so’ from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
python: can’t open file ‘/external/selinux/python/audit2allow/audit2allow’: [Errno 2] No such file or directory


#6

Ok. I’ve added the custom_board tag since there’s no Android builds for DB820C right now.


#7

Can anyone help how to resolve the below error.

ERROR: ld.so: object ‘/lib64/libselinux.so’ from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

python: can’t open file ‘/external/selinux/python/audit2allow/audit2allow’: [Errno 2] No such file or directory
[/quote]