@@ -17,6 +17,11 @@ import (
1717
1818type starnix struct {}
1919
20+ // The location of the default ffx build config (a Fuchsia implementation detail),
21+ // relative to the kernel build dir. Contains default relative paths of build
22+ // artifacts.
23+ const ffxBuildConfig = "ffx-config.json"
24+
2025// The name of the Fuchsia assembly override defined in `overrideRule`.
2126const overrideName = "syzkaller_starnix"
2227
@@ -54,10 +59,11 @@ func (st starnix) build(params Params) (ImageDetails, error) {
5459 if err := osutil .SandboxChown (localDir ); err != nil {
5560 return ImageDetails {}, err
5661 }
62+ buildDir := filepath .Join (params .KernelDir , "out/" + arch )
5763 if _ , err := runSandboxed (
5864 time .Hour ,
5965 params .KernelDir ,
60- "scripts/fx" , "--dir" , "out/" + arch ,
66+ "scripts/fx" , "--dir" , buildDir ,
6167 "set" , product ,
6268 "--assembly-override" , fmt .Sprintf ("//products/workbench/*=//local:%s" , overrideName ),
6369 ); err != nil {
@@ -75,6 +81,8 @@ func (st starnix) build(params Params) (ImageDetails, error) {
7581 30 * time .Second ,
7682 params .KernelDir ,
7783 ffxBinary ,
84+ "--no-environment" ,
85+ "-c" , filepath .Join (buildDir , ffxBuildConfig ),
7886 "-c" , "log.enabled=false,ffx.analytics.disabled=true,daemon.autostart=false" ,
7987 "config" , "get" , "product.path" ,
8088 )
@@ -86,6 +94,7 @@ func (st starnix) build(params Params) (ImageDetails, error) {
8694 30 * time .Second ,
8795 params .KernelDir ,
8896 ffxBinary ,
97+ "--no-environment" ,
8998 "-c" , "log.enabled=false,ffx.analytics.disabled=true,daemon.autostart=false" ,
9099 "product" , "get-image-path" , productBundlePath ,
91100 "--slot" , "a" ,
0 commit comments