TLDR: Open-source cannot get closed. However, an OpenWRT based firmware is bringing in together a lot of different licenses and you need to follow each of them when it comes to modifying/distributing commercially.
Quick Reference (may not feel quick but is very readable): opensource.org FAQ
What is important to understand is that each package you build into your firmware using OpenWRT (including OpenWRT itself) has a specific license which you are required to follow. As you publish your firmware, you need to be able to list all packages that are used, what license they are published under and adhere to all the requirement in that license.
Typical requirements include:
- crediting the creators (usually the minimum)
- publishing any changes your made either in source, binary or both under a specific license as required by the original package license
- if the package you need is not open-source, you may consider buying commercial rights to distribute/modify it
Another important aspect is that you are typically not required to publish modifications you make to the tools used to build your firmware as long as you don't distribute them. OpenWRT may seem confusing to you as it is both the tool (to build your firmware) and a set of packages (which are present in the firmware you distribute). Make sure you understand what this means for your distribution.
This work is complex and most likely tedious but it is critical for you to do it. From experience, it is very hard and costly to postpone this analysis (technically and legally).
One last element, there are tools that can help you identify code source and licenses automatically. These tools are typically used when auditing a code-base or a binary release. There are also lawyers, developers, etc. who specialize in open source software/licenses and would be able to help you.