Linux is adaptable to embedded systems and also the requirements of the system are quite low. There are projects or there were projects regarding real time kernel. I worked a bit with rtai. If you are comfortable with kernel compilation you are in the right spot for making your Linux realtime.