Skip to content

Commit ef84fd9

Browse files
committed
Upgrade uefi crate from v0.20 to v0.36
Migrate from uefi v0.20 + uefi-services to uefi v0.36 + uefi-raw. Key API changes: - Entry point: fn main(Handle, SystemTable<Boot>) -> fn main() -> Status - uefi_services::init() -> uefi::helpers::init() - boot_services.method() -> uefi::boot::method() - uefi_services::system_table() -> uefi::system::with_config_table() - Shell protocol accessed via uefi_raw::protocol::shell::ShellProtocol (the safe wrapper's ShellProtocol is not public in v0.36) - Config table GUIDs: SMBIOS_GUID/SMBIOS3_GUID -> ConfigTableEntry::* - ESRT GUID: manual GUID comparison -> ConfigTableEntry::ESRT_GUID - bs.stall(usize) -> uefi::boot::stall(Duration) - ShellParameters: get_args(bs, handle) -> args() iterator on image_handle Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 19a14c4 commit ef84fd9

File tree

13 files changed

+207
-317
lines changed

13 files changed

+207
-317
lines changed

Cargo.lock

Lines changed: 46 additions & 68 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,5 @@ default-members = [
1919
"framework_tool",
2020
]
2121

22-
[patch.crates-io]
23-
uefi = { git = "https://github.com/FrameworkComputer/uefi-rs", branch = "merged" }
24-
uefi-services = { git = "https://github.com/FrameworkComputer/uefi-rs", branch = "merged" }
25-
2622
[profile.release]
2723
lto = true

framework_lib/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ rusb = { version = "0.9.4", optional = true }
3737
guid-create = { version = "0.5.0", default-features = false }
3838

3939
[target.'cfg(target_os = "uefi")'.dependencies]
40-
uefi = { version = "0.20", features = ["alloc"] }
41-
uefi-services = "0.17"
40+
uefi = { version = "0.36", features = ["alloc", "global_allocator", "panic_handler", "logger"] }
41+
uefi-raw = "0.13"
4242
plain = "0.2.3"
4343
redox_hwio = { git = "https://github.com/FrameworkComputer/rust-hwio", branch = "freebsd", default-features = false }
4444
smbios-lib = { git = "https://github.com/FrameworkComputer/smbios-lib.git", branch = "no-std", default-features = false }

framework_lib/src/chromium_ec/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
//! - `windows` - It uses [DHowett's Windows driver](https://github.com/DHowett/FrameworkWindowsUtils)
1010
1111
use crate::ec_binary;
12+
#[cfg(feature = "uefi")]
13+
use crate::fw_uefi::shell_get_execution_break_flag;
1214
use crate::os_specific;
1315
use crate::power;
1416
use crate::smbios;
15-
#[cfg(feature = "uefi")]
16-
use crate::fw_uefi::shell_get_execution_break_flag;
1717
use crate::util::{self, Platform};
1818

1919
use no_std_compat::time::Duration;

framework_lib/src/commandline/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ use crate::chromium_ec::{EcError, EcResult};
4747
use crate::csme;
4848
use crate::ec_binary;
4949
use crate::esrt::{self, ResourceType};
50+
#[cfg(feature = "uefi")]
51+
use crate::fw_uefi::enable_page_break;
5052
#[cfg(feature = "rusb")]
5153
use crate::inputmodule::check_inputmodule_version;
5254
#[cfg(target_os = "linux")]
@@ -61,8 +63,6 @@ use crate::smbios::{dmidecode_string_val, get_smbios, is_framework};
6163
use crate::touchpad::print_touchpad_fw_ver;
6264
#[cfg(feature = "hidapi")]
6365
use crate::touchscreen;
64-
#[cfg(feature = "uefi")]
65-
use crate::fw_uefi::enable_page_break;
6666
#[cfg(feature = "rusb")]
6767
use crate::usbhub::check_usbhub_version;
6868
use crate::util::{self, Config, Platform, PlatformFamily};

0 commit comments

Comments
 (0)