| # Copyright 2018 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/fuchsia/bootdata.gni") |
| import("//build/config/fuchsia/zircon.gni") |
| import("//build/gn/config.gni") |
| import("//garnet/bin/guest/guest.gni") |
| |
| action("gpt_image") { |
| visibility = [ ":*" ] |
| gpt_image = "$target_out_dir/zircon.gpt" |
| |
| script = "//garnet/bin/guest/scripts/mkgpt.sh" |
| args = [ |
| "-o", |
| rebase_path("$target_out_dir"), |
| target_cpu, |
| ] |
| |
| outputs = [ |
| gpt_image, |
| ] |
| } |
| |
| bootdata("guest-bootdata") { |
| visibility = [ ":*" ] |
| boot = true |
| inputs = zircon_boot_manifests |
| deps = [] |
| foreach(label, deps) { |
| inputs += get_target_outputs(label) |
| } |
| } |
| |
| guest_app("zircon-guest") { |
| deps = [ |
| ":gpt_image", |
| ":guest-bootdata", |
| ] |
| |
| cmdline = "TERM=uart console.path=/dev/class/console/virtio-console" |
| bootdata_outputs = get_target_outputs(":guest-bootdata") |
| ramdisk = bootdata_outputs[0] |
| zircon = "$zircon_build_dir/zircon.bin" |
| |
| gpt_outputs = get_target_outputs(":gpt_image") |
| gpt_filename = "gpt.img" |
| resources = [ |
| { |
| path = rebase_path(gpt_outputs[0]) |
| dest = gpt_filename |
| }, |
| ] |
| block_devices = [ "/pkg/data/${gpt_filename},ro" ] |
| } |