From a3de0c0818bca4aa11cad1414b462b5a0184b17c Mon Sep 17 00:00:00 2001 From: Marco Vanotti Date: Tue, 29 Sep 2020 23:55:10 -0700 Subject: pkg/build/fuchsia: expand fvm image The fvm partition used was the default from the build. This commit expands it to 2GB. Without this change, recent versions of fuchsia will not boot. --- pkg/build/fuchsia.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/build/fuchsia.go b/pkg/build/fuchsia.go index 892e6006a..f4bb2c8b4 100644 --- a/pkg/build/fuchsia.go +++ b/pkg/build/fuchsia.go @@ -68,8 +68,18 @@ func (fu fuchsia) build(params *Params) error { return err } + // Copy and extend the fvm. + fvmTool := filepath.Join("out", arch, "host_x64", "fvm") + fvmDst := filepath.Join(params.OutputDir, "image") + fvmSrc := filepath.Join(params.KernelDir, "out", arch, "obj/build/images/fvm.blk") + if err := osutil.CopyFile(fvmSrc, fvmDst); err != nil { + return err + } + if _, err := osutil.RunCmd(time.Minute*5, params.KernelDir, fvmTool, fvmDst, "extend", "--length", "3G"); err != nil { + return err + } + for src, dst := range map[string]string{ - "out/" + arch + "/obj/build/images/fvm.blk": "image", "out/" + arch + ".zircon/kernel-" + arch + "-kasan/obj/kernel/zircon.elf": "obj/zircon.elf", "out/" + arch + "/multiboot.bin": "kernel", } { -- cgit mrf-deployment