pkg/build: fix the failing build

1. Add MKCTF option
2. Remove the command to make the kcov node. Since do it in the script.
This commit is contained in:
R3x 2019-06-10 17:14:39 +00:00 committed by Dmitry Vyukov
parent 0159583c3b
commit 5b5826d065

View File

@ -43,13 +43,13 @@ options KCOV
}
// Build tools before building kernel
if _, err := osutil.RunCmd(10*time.Minute, kernelDir, "./build.sh", "-m", targetArch,
"-U", "-u", "-j"+strconv.Itoa(runtime.NumCPU()), "tools"); err != nil {
"-U", "-u", "-j"+strconv.Itoa(runtime.NumCPU()), "-V", "MKCTF=no", "tools"); err != nil {
return err
}
// Build kernel
if _, err := osutil.RunCmd(10*time.Minute, kernelDir, "./build.sh", "-m", targetArch,
"-U", "-u", "-j"+strconv.Itoa(runtime.NumCPU()), "kernel="+kernelName); err != nil {
"-U", "-u", "-j"+strconv.Itoa(runtime.NumCPU()), "-V", "MKCTF=no", "kernel="+kernelName); err != nil {
return err
}
for _, s := range []struct{ dir, src, dst string }{
@ -115,9 +115,7 @@ func (ctx netbsd) copyKernelToDisk(targetArch, vmType, outputDir, kernel string)
if kernel != "/netbsd" {
return fmt.Errorf("kernel is copied into wrong location: %v", kernel)
}
commands := []string{"touch /fastboot",
// /fastboot file prevents disk check on start.
"mknod /dev/kcov c 346 0"}
commands := []string{"touch /fastboot"} // /fastboot file prevents disk check on start.
if vmType == "gce" {
commands = append(commands, []string{
// We expect boot disk to be wd0a for the qemu (that's how qemu exposes -hda disk).