This patch is for master, but can be applied to the 19 branch....
Basically, the problem is with the Realtek Giga Switch driver that is not supported by Openwrt yet. We are working with Openwrt to include support for this chip.
The files and instructions you provided work just fine, the only adjustment required is that the patch complains about the permission of two files not being 644.
I fixed this by issuing something like this before applying the patch:
Basically, the current config from 19.07 do not work fully.
For the first boot up, there is switch0, with no ports active. Switch 1, which is the active switch.
After install of luci, any change of Interface config will result in failed when apply. Need to manually remove switch0 entries in /etc/config/network, reboot, then edits in luci will work.
Update: I proceeded to force upgrade. And it works so far.
I can generate the rom file after cp archerc5v4.config .config .
Glad that worked for you. I don't know it didn't work how many times I tried building / flashing; not sure it is because the router is provided by my ISP (Act Fibernet from India).
After flashing the firmware using tftp the router reboots and doesn't connect to LAN. So, no way for me to access it.
Thank you for the images. I am using 19.07.02. I received kernel version mismatch error after openvpn-openssl package installation attempt. Please update the images to match kernel versions for this package. Thank you for your help.
FYI, the DSA driver for the Realtek rtl8367s got merged upstream today. It might arrive with kernel 5.18. Once that switch driver is available, it might not be too difficult to have C5v4 support merged.
This driver does not offload forwarding and all traffic between LAN ports still goes through the CPU. Maybe we can add the offload support before OpenWrt really uses it.
I have a branch with 5.15.17 kernel and dozens of backported patches that can generate a working image. There is a hack to disable all mediatek resets that prevented to boot the image. Mediatek Ethernet also have some trouble with checksum offload and incompatible dsa tag. I'll test changing the Realtek CPU tag position to the end of the packet. Maybe Mediatek will be happy with it. For now, it is disabling checksum offload.