Hello. My internet connection cames over Fiber Optical and then connects to a router/ optical network terminal/ GPON terminal. Now when optical cable is connected and ONT have internet I can connect ethernet ports to devices where I need internet. I tried to find a firmware for my ONT but I can not find any. Can you advice what ONT I can buy that support OpenWRT firmware or any other hardware/sofware solutions ?
I use the same configuration, but I have an Archer C7 doing all the internet distribution for my home network, which still includes an EA-6200 in bridge mode, and connected TV, video games and various notes and cellars, and finciona very well.
You won't find open source firmware for the ONT.
You don't purchase an ONT...it is provided by the ISP.
What you can do is purchase a LEDE-friendly router and connect it to the ONT.
Also, if your ONT provides Internet via coax (this doesn't seem like the case, though, as you state you have 'Ethernet ports' on the ONT), you'll have to get your ISP to reprovision it for RJ-45 Ethernet plug. If you have TV, this may need more configuration.
The ONT is passive (as far as you're concerned, as it only converts fiber to another medium), and not owned by you. The first equipment you would change, as @jwoods said, would be the router.
This is not fully settled by law, at least in Germany the end of the ISPs network is defined to be passive (see https://www.bgbl.de/xaver/bgbl/start.xav?startbk=Bundesanzeiger_BGBl&start=//[@attr_id=%27bgbl116s0106.pdf%27]#bgbl%2F%2F%5B%40attr_id%3D%27bgbl116s0106.pdf%27%5D__1518180720267), and an ONT is decidedly not passive, so I expect this to be in flux. But given the duties of the ONT being similar to the duties of a DOCSIS modem, I still do not expect an opensource firmware for an ONT (at best like with VDSL routers, where the actual modem runs a proprietary firmware).