build-script: add file-system selection, license, and improve the script

Change-Id: I456dc396ecfd0c06ee6fab1b82e255e0e190f45b