Solved [Driver dev] : how to device_if.m

Hi everybody,

I'm experiencing my first driver dev.

And I have this compil error :
Code:
/usr/src/sys/sys/bus.h:743:10: fatal error: 'device_if.h' file not found

How should I troubleshoot this, please ?
Or how do I generate device_if.h from device_if.m ?

Thanks a lot
Cheers
 
Last edited by a moderator:
How should I troubleshoot this, please ?
Could you be compiling from the wrong directory?
Where did you place your driver directory in the source tree?

Here is an example.
When I tried to compile device tree binaries from this directory it would fail with unfound files.
/usr/src/sys/gnu/dts/arm/
Somehow I discovered if I compiled from the upper directory it found all needed source files.
/usr/src/sys/gnu/dts/
So directory paths are important in compiling individual components of the source tree.
 
Add device_if.h to the list of source code files of your module and the build system will take care of generating the header.

Indeed, this was I read sooner. I can't understand : make complained it can't make it.
And it works, now. I should have misspelled device_if.h.
Sorry for disturbing...
Thank to you

I would like as well to take the opportunity to encourage everybody to grant fund the ukrainian red cross.
In France, for instance, each gift of 100 euros costs 25 euros at the end for the taxpayer.
As a result, it's a little gift for man, a great present for the ukrainans.
?????
 
Back
Top