diff options
| author | Marco Vanotti <mvanotti@google.com> | 2019-03-25 14:04:34 -0700 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-03-27 09:07:06 +0100 |
| commit | 69e1a4f7d5213bfbe70531479dba3bb794c6b0cf (patch) | |
| tree | 6c11542080c6148c2d902329a09425ba28ea1cf3 /pkg | |
| parent | 55684ce16ba7a9f7050fc1bba1cdff5d4ed5420d (diff) | |
pkg/build: update fuchsia build commands.
This CL changes the invocation of the `fx set` command to match the new
format[0].
This change involves removing "board" and "product" flags. Instead, now one has to use
`fx set product.board` to get the same result. In the case of syzkaller,
this would be "core.${ARCH}" where arch could be x64 or arm64.
Also, the default build directory now is `out/default`, and for now, it
is still not possible to have multiple archs built altogether. I set the
build directory manually to `out/${ARCH}` (as was before). This would
allow syzkaller to also build the kernel for arm if required.
[0]: https://fuchsia.googlesource.com/fuchsia/+/b814211ab33eeb4e8f02962d5c81d042b2464ac7
TEST=Tested this in syz-ci. It worked.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/build/fuchsia.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/build/fuchsia.go b/pkg/build/fuchsia.go index f1ff225d7..cc2e202df 100644 --- a/pkg/build/fuchsia.go +++ b/pkg/build/fuchsia.go @@ -21,9 +21,10 @@ func (fu fuchsia) build(targetArch, vmType, kernelDir, outputDir, compiler, user return fmt.Errorf("unsupported fuchsia arch %v", targetArch) } arch := sysTarget.KernelHeaderArch - if _, err := osutil.RunCmd(time.Hour, kernelDir, "scripts/fx", "set", arch, + product := fmt.Sprintf("%s.%s", "core", arch) + if _, err := osutil.RunCmd(time.Hour, kernelDir, "scripts/fx", "set", product, "--args", `extra_authorized_keys_file="//.ssh/authorized_keys"`, - "--board", "boards/x64.gni", "--product", "products/core.gni"); err != nil { + "--build-dir", "out/"+arch); err != nil { return err } if _, err := osutil.RunCmd(time.Hour, kernelDir, "scripts/fx", "clean-build"); err != nil { |
