diff --git a/README.md b/README.md index ca16f5f..3b1fd59 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ reims-ctl create mac --opencore OpenCore.qcow2 \ ``` `reims-ctl` copies the OpenCore image into the VM, finds OVMF beside it, and takes the installer -as it is. OpenCore's picker boots "macOS Base System" after 5 seconds, and you're in macOS +as it is. OpenCore boots "macOS Base System" with no picker, and you're in macOS Recovery: erase the VM's disk in Disk Utility, then pick Reinstall macOS, which downloads the rest from Apple. @@ -89,8 +89,10 @@ What's in the image, and why: ([below](#apv-arm64-port)). There are no others: QEMU's `isa-applesmc` is the SMC. - **The drivers a VM boots with**: OpenRuntime, OpenHfsPlus (recovery images and installers are HFS+), OpenPartitionDxe (for older recovery images) and ResetNvramEntry. -- **The graphical picker**, OpenCanopy, with the GoldenGate icons. Pick with the arrow keys, Tab - and Enter; it has no mouse pointer in a VM. `--text-picker` gives OpenCore's text list instead. +- **No boot picker**: OpenCore boots the default entry, the disk macOS last chose as its startup + disk. `--show-picker` shows it at every boot: the graphical one, OpenCanopy, with the GoldenGate + icons. Pick with the arrow keys, Tab and Enter; it has no mouse pointer in a VM. + `--text-picker` gives OpenCore's text list instead. - **The boot chime**, which plays on the VM's Intel HD Audio controller when it has one (QEMU's `ich9-intel-hda` with an `hda-output` codec). Turning off "Play sound on startup" in macOS's Sound settings silences it. @@ -101,7 +103,7 @@ What's in the image, and why: `--show-vm` turns that off. - **System Integrity Protection on**, as on a real Mac. `--disable-sip` turns it off. -`--timeout` sets how long the picker waits (0 waits for you), `--boot-args` the kernel's boot +`--timeout` sets how long a shown picker waits (0 waits for you), `--boot-args` the kernel's boot arguments, and `--verbose-boot` shows the kernel's messages while it boots. `reims-util opencore --help` lists the rest. diff --git a/src/cli.rs b/src/cli.rs index fc1f296..9d891f2 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -83,7 +83,8 @@ pub struct OpencoreArgs { /// The ROM: 12 hex digits or a MAC address, such as the VM's (default: random) #[arg(long)] pub rom: Option, - /// Seconds the boot picker waits before it boots the default entry (0 waits for you) + /// Seconds the boot picker, when shown, waits before it boots the default entry (0 waits for + /// you) #[arg(long, default_value_t = 5)] pub timeout: u32, /// The kernel's boot arguments @@ -104,6 +105,9 @@ pub struct OpencoreArgs { /// Use OpenCore's text picker instead of the graphical one #[arg(long)] pub text_picker: bool, + /// Show OpenCore's boot picker at every boot (by default OpenCore boots the default entry) + #[arg(long)] + pub show_picker: bool, /// Leave out Lilu, ReimsVgpu.kext and the apv-arm64-port kexts, so macOS 26 drives /// reims-vgpu's GPU with its driver as it is #[arg(long)] @@ -345,6 +349,7 @@ pub fn opencore_options(a: &OpencoreArgs) -> Result { cpuid_spoof: !a.no_cpuid_spoof, hide_vm: !a.show_vm, graphical_picker: !a.text_picker, + show_picker: a.show_picker, kexts: !a.no_kexts, }, apv_arm64_port: !a.no_apv_arm64_port, diff --git a/src/opencore/config.rs b/src/opencore/config.rs index 5354176..6a5dfc6 100644 --- a/src/opencore/config.rs +++ b/src/opencore/config.rs @@ -23,6 +23,7 @@ //! `ForceSecureBootScheme`), with Apple Secure Boot off, any volume scanned, no vault; //! - optionally, the kernel's `kern.hv_vmm_present` swapped with `kern.hibernatecount`, so macOS //! does not see it runs in a VM and lets iCloud and the App Store sign in; +//! - the picker hidden, so OpenCore boots the default entry, unless asked to show it; //! - the SMBIOS identity (smbios.rs), and the picker's timeout and boot arguments. use super::apv_arm64_port::Kext as PortKext; @@ -92,6 +93,8 @@ pub struct Options { pub hide_vm: bool, /// OpenCanopy's graphical picker, or OpenCore's text one. pub graphical_picker: bool, + /// The picker at every boot, or none: OpenCore boots the default entry. + pub show_picker: bool, /// Lilu and ReimsVgpu (and the set `make` is given), for macOS 26. pub kexts: bool, } @@ -222,7 +225,7 @@ pub fn make(sample: &[u8], o: &Options, port: &[PortKext<'_>]) -> Result set(c, &["Misc", "Boot"], "PickerMode", mode.into())?; set(c, &["Misc", "Boot"], "PickerVariant", PICKER_VARIANT.into())?; set(c, &["Misc", "Boot"], "PollAppleHotKeys", true.into())?; - set(c, &["Misc", "Boot"], "ShowPicker", true.into())?; + set(c, &["Misc", "Boot"], "ShowPicker", o.show_picker.into())?; set(c, &["Misc", "Boot"], "Timeout", (o.timeout as i64).into())?; set(c, &["Misc"], "Entries", Value::Array(vec![]))?; set(c, &["Misc"], "Tools", Value::Array(vec![]))?; diff --git a/src/tui.rs b/src/tui.rs index cb66ed4..de127fd 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -271,6 +271,7 @@ impl App { no_cpuid_spoof: false, show_vm: !form.toggle(5), text_picker: !form.toggle(7), + show_picker: form.toggle(8), no_kexts: false, no_apv_arm64_port: false, no_ovmf: !form.toggle(3), @@ -628,8 +629,8 @@ fn opencore_form() -> Form { }, Field { label: "Picker timeout", - help: "Seconds OpenCore's boot picker waits before it boots the default entry; \ - 0 waits for you." + help: "Seconds OpenCore's boot picker, when shown, waits before it boots the \ + default entry; 0 waits for you." .into(), kind: Kind::Text("5".into(), ""), }, @@ -665,6 +666,13 @@ fn opencore_form() -> Form { help: "OpenCore's boot picker with icons, or its text list when off.".into(), kind: Kind::Toggle(true), }, + Field { + label: "Show the picker", + help: "OpenCore's boot picker at every boot, or none when off: OpenCore boots the \ + default entry." + .into(), + kind: Kind::Toggle(false), + }, ], } }