LIRC Send BPI using GPIO

Hi, has any of you manage to make LIRC work on BPI (particulary BPI-M2?) I want to use BPI as and infrared trasnmitter (rather than use the onboard receiver) using GPIO. I’ve managed to make it working under RPI following (http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/), but lirc_rpi is not available for BPI. Can you help me please? Regards Martin