add a common build script for Xen and baremetal

initial experiment, usage a bit rough around the edges