Confused about init.rc (again)

When I look at /init.rc on the board, I see the lines:

import /init.${ro.hardware}.rc
import /vendor/etc/init/hw/init.${ro.hardware}.rc

getprop ro.hardware reveals hikey960, as expected. However, none of these files exist. The closest match I found is /vendor/etc/init/init.hikey960.rc.
Is there an error in the init file hierarchy, or am I missing something?

init.rc is generated automatically for ALL devices.
IF you need those specialized init scripts for your hardware, THEN you create the files. If not, they don’t exist.

Okay, but there are files generated for the hikey960 and they are available on the device at /vendor/etc/init/init.hikey960.rc, but the root /init.rc looks for that file in the hw subdirectory. This gives me the impression that the init.hikey960.rc is intended to be included, but will not be found.

It will get called directly by init along with all the other files in that path. It doesn’t need to be manually imported.

Cool, thank’s for the code reference!