mirror of
https://github.com/utmapp/UTM.git
synced 2026-10-12 02:24:01 +00:00
Merge pull request #7886 from utmapp/feature/apple-secure-boot
config: add Secure Boot option for Apple UEFI guests
This commit is contained in:
@@ -76,6 +76,9 @@ struct VMConfigAppleBootView: View {
|
||||
} else if newValue {
|
||||
config.genericPlatform = UTMAppleConfigurationGenericPlatform()
|
||||
}
|
||||
if !newValue {
|
||||
config.boot.hasSecureBoot = false
|
||||
}
|
||||
}.alert(item: $alertBootloaderSelection) { selection in
|
||||
let okay = Alert.Button.default(Text("OK")) {
|
||||
importBootloaderSelection = selection
|
||||
@@ -93,6 +96,11 @@ struct VMConfigAppleBootView: View {
|
||||
allowedContentTypes: [importBootloaderSelection == .ipsw ? .ipsw : .data],
|
||||
onCompletion: selectImportedFile)
|
||||
|
||||
if #available(macOS 27, *), operatingSystem == .linux && config.boot.hasUefiBoot {
|
||||
Toggle("Secure Boot", isOn: $config.boot.hasSecureBoot)
|
||||
.help("Only boot operating systems signed by Microsoft or a trusted vendor. Most major Linux distributions are supported.")
|
||||
}
|
||||
|
||||
if operatingSystem == .linux && !config.boot.hasUefiBoot {
|
||||
Section(header: Text("Linux Settings")) {
|
||||
FileBrowseField("Kernel Image", url: $config.boot.linuxKernelURL, isFileImporterPresented: $importFileShown, hasClearButton: false) {
|
||||
|
||||
Reference in New Issue
Block a user