Alright, have not had much time to work on this project lately but I successfully added the modules and it seems like dwc2 module is loaded on boot now. Here is the output of lsmod:
usb_f_rndis 17023 0
u_ether 14023 1 usb_f_rndis
libcomposite 49319 1 usb_f_rndis
dwc2 109939 0
udc_core 12750 2 libcomposite,dwc2
squashfs 32160 62
i2c_bcm2708 5740 0
spi_bcm2835 7424 0
bcm2835_gpiomem 3823 0
bcm2835_wdt 4133 0
zram 22461 1
uio_pdrv_genirq 3718 0
zsmalloc 14329 1 zram
lz4_compress 3289 1 zram
uio 10230 1 uio_pdrv_genirq
My problem now is that g_ether fails to load properly, here is the output of dmesg:
[ 22.042841] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[ 22.573179] dwc2 20980000.usb: DWC OTG Controller
[ 22.573255] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[ 22.573318] dwc2 20980000.usb: irq 33, io mem 0x00000000
[ 22.573590] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 22.573609] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 22.573622] usb usb1: Product: DWC OTG Controller
[ 22.573634] usb usb1: Manufacturer: Linux 4.4.20-piCore+ dwc2_hsotg
[ 22.573645] usb usb1: SerialNumber: 20980000.usb
[ 22.577937] hub 1-0:1.0: USB hub found
[ 22.578019] hub 1-0:1.0: 1 port detected
[ 27.653659] g_ether 20980000.usb: failed to start g_ether: -2
This is the output I get from trying to manually do: sudo modprobe g_ether
modprobe: can't load module g_ether (kernel/drivers/usb/gadget/legacy/g_ether.ko): unknown symbol in module, or unknown parameter