If you have the M2A module then WiFi should be working out of the box as this is built into the module.

For LTE you need to connect a suitable modem via USB and then build phone support into the OS. You're best way to do this is to get the Android source code and then make the changes to include this but you will also need a suitable RIL for the modem you use. SIMCOM offer RIL's for their modems that you can include in the build. I've recently added the SIM7100 PCI Express module as part of my own custom Android build using the source from FriendlyArm.