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
parent d551eed755
commit 3b1dfb69c7

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...)