Look into ./tools/make_fw.sh to learn about the directory structure and dependencies. You need to have OpenWRT ImageBuilder available to the script script.
Run ./tools/make_fw.sh to build images.