Merge pull request #2203 from arm64b/firmware-file-in-container

ARM64: specify external firware binary for containerized qemu
This commit is contained in:
Justin Cormack 2017-07-14 14:17:02 +01:00 committed by GitHub
commit 9d423204f7

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