path: root/bsd_eth_drivers/libbsdport/README
blob: 14fd4a5f157a329af76bb8715fb34d70adbc82f3 (plain) (tree)

This is a library and collection of header files
intended to ease porting recent FreeBSD (as of 7/2007)
drivers to RTEMS. Currently, only the PCI bus is supported.

A lot of macro-magic is used in the 'libbsdport.h'
and 'libbsdport_post.h' headers which are te be included
from the driver source file prior and after the driver
includes the normal headers it uses:

At the top of if_xxx.c add:

#ifdef __rtems__
#include <libbsdport.h>

... leave all normal include statements in place...
#include <sys/yyy.h>

lastly, add:

#ifdef __rtems__
#include <libbsdport_post.h>

Note that libbsdport does not provide the full freebsd
kernel API but only a subset.