Building Banana Pi M3 images

Most of the Banana Pi M3 images are over a year old. Are there instructions on building/rebuilding these ourselves? Are the only options the Banana Pi kernels, or is there support for Banana Pi in the mainline Linux kernel?