diff options
| author | Laura Peskin <pesk@google.com> | 2024-11-19 16:10:36 -0800 |
|---|---|---|
| committer | glpesk <114444708+glpesk@users.noreply.github.com> | 2024-12-02 23:33:55 +0000 |
| commit | 578925bcbcaef470c75aea9e463ca6a44ac10c17 (patch) | |
| tree | 49d5542fad2d3ea519ebc71b08772e58c5a5ba39 /pkg | |
| parent | bb326ffb6f9073a2100ce4ed9486fd064dbc8380 (diff) | |
pkg/build: avoid relying on environment file for ffx
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/build/starnix.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/build/starnix.go b/pkg/build/starnix.go index e629c004e..1ab542929 100644 --- a/pkg/build/starnix.go +++ b/pkg/build/starnix.go @@ -17,6 +17,11 @@ import ( type starnix struct{} +// The location of the default ffx build config (a Fuchsia implementation detail), +// relative to the kernel build dir. Contains default relative paths of build +// artifacts. +const ffxBuildConfig = "ffx-config.json" + // The name of the Fuchsia assembly override defined in `overrideRule`. const overrideName = "syzkaller_starnix" @@ -54,10 +59,11 @@ func (st starnix) build(params Params) (ImageDetails, error) { if err := osutil.SandboxChown(localDir); err != nil { return ImageDetails{}, err } + buildDir := filepath.Join(params.KernelDir, "out/"+arch) if _, err := runSandboxed( time.Hour, params.KernelDir, - "scripts/fx", "--dir", "out/"+arch, + "scripts/fx", "--dir", buildDir, "set", product, "--assembly-override", fmt.Sprintf("//products/workbench/*=//local:%s", overrideName), ); err != nil { @@ -75,6 +81,8 @@ func (st starnix) build(params Params) (ImageDetails, error) { 30*time.Second, params.KernelDir, ffxBinary, + "--no-environment", + "-c", filepath.Join(buildDir, ffxBuildConfig), "-c", "log.enabled=false,ffx.analytics.disabled=true,daemon.autostart=false", "config", "get", "product.path", ) @@ -86,6 +94,7 @@ func (st starnix) build(params Params) (ImageDetails, error) { 30*time.Second, params.KernelDir, ffxBinary, + "--no-environment", "-c", "log.enabled=false,ffx.analytics.disabled=true,daemon.autostart=false", "product", "get-image-path", productBundlePath, "--slot", "a", |
