OSPFv2 configuration for OpenWrt?

I wanted to create different IP subnet in my BATMAN mesh.
One of the solution I found was to run instance of OSPF on the border nodes. So, looked at quagga documentation, but could't understand the configuration process.
Can anyone help me with the configuration.

It is very similar to Cisco IOS. Type vtysh at the prompt and you will connect to the quagga console. Then you can type conf t to get into configuration mode, do your stuff, end to get out of configuration mode, wr to save the config, and with show ? you can see the available commands for troubleshooting/monitoring. With quit you exit quagga shell.