mirror of
https://github.com/siderolabs/talos.git
synced 2025-09-28 17:21:24 +02:00
* split platform specific preflight checks into platform specific files * error on darwin if target is amd64 * error on darwin if host platform is amd64 * add darwin specific var-file and pflash file locations * remove hard kvm requirement (so linux logic can be tested on machines without kvm) Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com> Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
24 lines
602 B
Go
24 lines
602 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
package qemu
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"runtime"
|
|
)
|
|
|
|
func (check *preflightCheckContext) verifyPlatformSpecific(ctx context.Context) error {
|
|
return check.verifyAppleMachine(ctx)
|
|
}
|
|
|
|
func (check *preflightCheckContext) verifyAppleMachine(context.Context) error {
|
|
if runtime.GOARCH != "arm64" {
|
|
return errors.New("currently qemu on darwin is supported only on arm machines")
|
|
}
|
|
|
|
return nil
|
|
}
|