Core dependencies:https://github.com/opnsense/core/blob/master/Makefile#L74-L134Ports to build:https://github.com/opnsense/tools/blob/master/config/17.7/ports.conf
We have docs for this... https://github.com/opnsense/tools#advanced-package-buildsPlease refer to specific sections of the document if you have trouble with them.Cheers,Franco