[fuchsia] SSH fix and build invocation fix.

SSH keys are now included at the fx clean-build config.

A proper escape sequence looked weird so use a string literal to pass
that config.

Fixed some typos I found while debugging.
This commit is contained in:
Julia Hansbrough 2018-11-15 14:21:21 -08:00 committed by Dmitry Vyukov
parent f5e275d1d9
commit b08ee62aec
2 changed files with 4 additions and 5 deletions

View File

@ -22,13 +22,12 @@ func (fu fuchsia) build(targetArch, vmType, kernelDir, outputDir, compiler, user
}
arch := sysTarget.KernelHeaderArch
if _, err := osutil.RunCmd(time.Hour, kernelDir, "scripts/fx", "clean-build", arch,
"--packages", "garnet/packages/products/sshd",
"--args=extra_authorized_keys_file=\"//.ssh/authorized_keys\""); err != nil {
"--args", `extra_authorized_keys_file="//.ssh/authorized_keys"`,
"--packages", "garnet/packages/products/sshd", "--product", "garnet/products/default.gni"); err != nil {
return err
}
for src, dst := range map[string]string{
"out/" + arch + "/obj/build/images/fvm.blk": "image",
"out/" + arch + "/ssh-keys/id_ed25519": "key",
"out/build-zircon/build-" + arch + "/zircon.elf": "obj/zircon.elf",
"out/build-zircon/build-" + arch + "/multiboot.bin": "kernel",
"out/" + arch + "/fuchsia.zbi": "initrd",

View File

@ -256,10 +256,10 @@ func (upd *SyzUpdater) build(commit *vcs.Commit) error {
}
tagFile := filepath.Join(upd.syzkallerDir, "tag")
if err := osutil.WriteFile(tagFile, []byte(commit.Hash)); err != nil {
return fmt.Errorf("filed to write tag file: %v", err)
return fmt.Errorf("failed to write tag file: %v", err)
}
if err := osutil.CopyFiles(upd.syzkallerDir, upd.latestDir, upd.syzFiles); err != nil {
return fmt.Errorf("filed to copy syzkaller: %v", err)
return fmt.Errorf("failed to copy syzkaller: %v", err)
}
return nil
}