You can find the sf1xx driver under src/drivers (https://github.com/PX4/Firmware/blob/master/src/drivers/sf1xx/sf1xx.cpp). The modules built per configuration (autopilot board basically) are under cmake/configs. For example here's the config for px4fmu-v3_default (a pixhawk). https://github.com/PX4/Firmware/blob/master/cmake/configs/nuttx_px4fmu-v3_default.cmake#L56
Here's the config for the raspberrypi (navio2). https://github.com/PX4/Firmware/blob/master/cmake/configs/posix_rpi_common.cmake
So add drivers/sf1xx to cmake/configs/posix_rpi_common.cmake, then work through the minor complication problems. NuttX headers will need to be removed or replaced with px4 platform versions.
Any usage of ioctl, open, close, etc dealing with the /dev/sf1xx device within px4 needs to be replaced with the px4 version (px4_ioctl, px4_open, px4_close, etc). Access a real physical serial port should still use ::open, ::close, ::read though.
Any helper functions that exit need to be changed. On NuttX each module is a task (like a process). In Linux each module is actually a thread within a single process, so exit will actually exit the entire px4 process.
Does that make sense?