How to port PX4 firmware to a custom flight controller?

I have designed a custom flight controller and completed the porting process for PX4 by adjusting sensor orientations and adding missing drivers. I intend to contribute this support to the official PX4 GitHub repository. What are the standard procedures and requirements for submitting a hardware support Pull Request? Furthermore, regarding firmware uploads, is it possible to enable auto-detection for the board in QGroundControl, or must users manually build and select the specific target from the source code?