ARM64: specify external firware binary for containerized qemu

Current implementation uses a fixed firmware(bios) binary
installed by the build process of the qemu container image,
which will prevent us from providing an external firmware binary
outside the container. This patch removes this limitation, thus we
can assign a firware binary image file with "-fw" option.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
This commit is contained in:
Dennis Chen 2017-07-14 09:10:42 +00:00 committed by Rolf Neugebauer
parent 4eb0f00db6
commit 3ef5f27e49

View File

@ -302,6 +302,13 @@ func runQemuContainer(config QemuConfig) error {
var args []string
config, args = buildQemuCmdline(config)
// if user specify the "-fw" parameter, this should override the default in container context,
// with "-v" option, we will have the chance to assign an external FW binary to the containerized qemu
// instead of the fixed FW bin instealled by the build process of the image.
if config.UEFI {
binds = append(binds, "-v", fmt.Sprintf("%[1]s:%[1]s", config.FWPath))
}
dockerArgs := append([]string{"run", "--interactive", "--rm", "-w", cwd}, binds...)
dockerArgsImg := append([]string{"run", "--rm", "-w", cwd}, binds...)