Disclaimer: This guide is based on Linksys EA8100 router. The configuration and steps may varies depends on the router hardware and brands.
If you haven't had any experience with OpenWRT, this blog might be a good start. I am also a newbie for OpenWRT. I did a lot of googling around how to do a proper setup with OpenWRT for TM Unifi (One of Malaysia's ISP Provider) but not able to find one during the time I write this blog, especially for the version of OpenWRT with DSA.
First, you will need to go to the OpenWRT website to check if your router is supported by OpenWRT. This is important to make sure the router have an adequate support for its hardware. You can go to this link, https://firmware-selector.openwrt.org/ where you can check your router model. If it is in the list, then you are good to download the firmware for your router brand and model.
Once you download the firmware for your router, you will need to upload the firmware into your router. For linksys brand especially for EA8100 (since I am using this brand and model) it is quite easy. You just need to go to Linksys WebUI page and then under Router Settings go to Connectivity then under Router Firmware Update click on Choose File button under Manual section and select your openwrt image and click Open button. After that click the Start button next to start the flash image process. Once completed, the router will automatically reboot. Do not manually reboot the router even it seems like the flash has been completed as it can brick your router. You can search the video guide on youtube as well on how to do this process.
Once the router has been successfully back online after reboot, you should be able to login to your OpenWRT UI or LuCI. It use the same IP address as your original Linksys WebUI login page.
The first step it will ask you to do is it to setup the login password. Then go to Network > Interface. Click on Devices tab. Click on Add Device Configuration. Device type, select VLAN (802.1q). Base Device, select wan. VLAN ID, type 500. Device name, you can put anything that would easier for you to identify the WAN connection for VLAN ID 500 for TM Unifi, example UniFi.500. Then click Save button.
Next, go to Interfaces tab. Select wan interface and then click Edit button. Change the protocol type from DHCP client to PPPoE. Then you will need to enter userid and password for TM Unifi and click Save button.
Next, you can configure the wifi for the router. This configuration may varies depends on your requirement and needs.