Android O HIDL create

I have a task
example"
driver ==> hal ==> hidl

How to do “hidl” by yourself ? I mean craet a new one ?

HIDLs are built around interfaces, typically defined with abstract type/class. Most of these interfaces are located in hardware/interfaces. I’m not sure if you want to create a new interface or implement an existing one. There are several examples of implementation in the AOSP tree, some of them are default implementations and located in the same path as the interface definition (e.g. hardware/interfaces/light/2.0/default) some others are external or vendor (e.g. external/wpa_supplicant_8/wpa_supplicant/hidl/1.0).

cf HIDL  |  Android Open Source Project

Moreover there are several existing architectures, from full legacy hal (deprecated) to full binderized HALs (4): HIDL C++  |  Android Open Source Project.