diff options
| author | Marco Vanotti <mvanotti@google.com> | 2020-09-29 23:55:10 -0700 |
|---|---|---|
| committer | Marco Vanotti <mvanotti@users.noreply.github.com> | 2020-10-01 12:43:24 -0700 |
| commit | a3de0c0818bca4aa11cad1414b462b5a0184b17c (patch) | |
| tree | e1e9a576297e4c4ccd465d5d5486252fa7ece2e4 /pkg | |
| parent | 28cd8ce33c0a2dc1e3f721bdcdd9ec2638e496c9 (diff) | |
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.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/build/fuchsia.go | 12 |
1 files changed, 11 insertions, 1 deletions
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", } { |
