blob: 4ef0066474278d4af3ce1aebcb7704143b1d239b [file] [log] [blame]
// Copyright 2019 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.
package targets
import (
"context"
"go.fuchsia.dev/fuchsia/tools/qemu"
)
const (
// aemuBinaryName is the name of the AEMU binary.
aemuBinaryName = "emulator"
)
// AEMUTarget is a AEMU target.
type AEMUTarget struct {
QEMUTarget
}
// NewAEMUTarget returns a new AEMU target with a given configuration.
func NewAEMUTarget(ctx context.Context, config QEMUConfig, opts Options) (*AEMUTarget, error) {
target, err := NewQEMUTarget(ctx, config, opts)
if err != nil {
return nil, err
}
target.binary = aemuBinaryName
target.builder = qemu.NewAEMUCommandBuilder()
return &AEMUTarget{QEMUTarget: *target}, nil
}