image: Add build_root flag for specifying separate build directory

Allow building the image in a directory that is different from the
output directory.  This is useful for instance in the BoW usecase,
where the output directory may be on a mounted remote filesystem that
is slower than the chroot's filesystem, or has different permissions.

BUG=brillo:867
TEST=`brillo image` command builds in normal chroot directory, output
     image is in workspace
TEST=default `./build_image` command builds in the chroot, output remains
     in the chroot

Change-Id: I226b2ece27fe79b37a8429d6bdb4272fe20f24b4
Reviewed-on: https://chromium-review.googlesource.com/269809
Trybot-Ready: Steve Fung <stevefung@chromium.org>
Tested-by: Steve Fung <stevefung@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Steve Fung <stevefung@chromium.org>
2 files changed