out of tree kernel modules (was: compiling modules and FDT define)

Bernd Walter ticso at cicely7.cicely.de
Fri Aug 5 13:44:24 UTC 2016


On Fri, Aug 05, 2016 at 02:54:34AM +0200, Bernd Walter wrote:
> I compile a driver as module and it seems that FDT isn't defined
> on a rpi.

When compiling kernel with modules you get an opt_platform.h containing
#define FDT 1

For my out of tree module all I get is an empty file.
I assume that also happens when you just manually compile anything in
sys/modules.

Do I really need to integrate the driver into the kernel source tree
and always compile everything?

The symptoms of missing FDT support is subtile, because everything
may seem to work, the device probing just accepts more devices than
it is supposed to handle.

On a side note, the ofw_bus_is_compatible and ofw_bus_search_compatible
functions are undocumented.
At least they don't have a manpage.
My only option was to blindly copy from another driver, without really
understanding the differences between those two functions.

-- 
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.


More information about the freebsd-arm mailing list