diff --git a/framework_lib/src/commandline/mod.rs b/framework_lib/src/commandline/mod.rs index 4ca9af45..e006d27b 100644 --- a/framework_lib/src/commandline/mod.rs +++ b/framework_lib/src/commandline/mod.rs @@ -1826,7 +1826,11 @@ Options: --autofanctrl []Turn on automatic fan speed control (optionally provide fan index) --pdports Show information about USB-C PD ports --info Show info from SMBIOS (Only on UEFI) + --meinfo [] Show Intel ME information (from SMBIOS type 0xDB) --pd-info Show details about the PD controllers + --pd-reset Reset a specific PD controller (for debugging only) + --pd-disable Disable all ports on a specific PD controller (for debugging only) + --pd-enable Enable all ports on a specific PD controller (for debugging only) --privacy Show privacy switch statuses (camera and microphone) --pd-bin Parse versions from PD firmware binary file --ec-bin Parse versions from EC firmware binary file @@ -1838,6 +1842,9 @@ Options: --flash-ro-ec Flash EC with new firmware from file --flash-rw-ec Flash EC with new firmware from file --reboot-ec Control EC RO/RW jump [possible values: reboot, jump-ro, jump-rw, cancel-jump, disable-jump] + --ec-hib-delay [] Get or set EC hibernate delay (S5 to G3) + --uptimeinfo Show EC uptime information + --s0ix-counter Show S0ix counter --intrusion Show status of intrusion switch --inputdeck Show status of the input deck --inputdeck-mode Set input deck power mode [possible values: auto, off, on] (Framework 16 only) @@ -1845,17 +1852,34 @@ Options: --nvidia Show NVIDIA GPU information (Framework 16 only) --charge-limit [] Get or set battery charge limit (Percentage number as arg, e.g. '100') --charge-current-limit [] Get or set battery current charge limit (Percentage number as arg, e.g. '100') + --charge-rate-limit [] Set max charge rate limit --get-gpio Get GPIO value by name or all, if no name provided --fp-led-level [] Get or set fingerprint LED brightness level [possible values: high, medium, low] --fp-brightness []Get or set fingerprint LED brightness percentage --kblight [] Set keyboard backlight percentage or get, if no value provided + --remap-key + Remap a key by changing the scancode + --rgbkbd [ ...] + Set the color of a key to RGB. Multiple colors for adjacent keys can be set at once + --tablet-mode Set tablet mode override [possible values: auto, tablet, laptop] --console Get EC console, choose whether recent or to follow the output [possible values: recent, follow] --hash Hash a file of arbitrary data --flash-gpu-descriptor <18 DIGIT SN> Overwrite the GPU bay descriptor SN and type. --flash-gpu-descriptor-file Write the GPU bay descriptor with a descriptor file. + --dump-gpu-descriptor-file Dump the GPU bay descriptor to a file -f, --force Force execution of an unsafe command - may render your hardware unbootable! --dry-run Simulate execution of a command (e.g. --flash-ec) + --pd-addrs + Specify I2C addresses of the PD chips (Advanced) + --pd-ports + Specify I2C ports of the PD chips (Advanced) + --has-mec + Specify the type of EC chip (MEC/MCHP or other) [possible values: true, false] + --host-command [DATA...] + Send an EC host command -t, --test Run self-test to check if interaction with EC is possible + --test-retimer Run self-test to check if interaction with retimers is possible + --boardid Print all board IDs -h, --help Print help information -b Print output one screen at a time "# diff --git a/framework_lib/src/commandline/uefi.rs b/framework_lib/src/commandline/uefi.rs index d08e6ddd..faf34b10 100644 --- a/framework_lib/src/commandline/uefi.rs +++ b/framework_lib/src/commandline/uefi.rs @@ -205,7 +205,7 @@ pub fn parse(args: &[String]) -> Cli { None }; found_an_option = true; - } else if arg == "--autofanctrol" { + } else if arg == "--autofanctrl" { cli.autofanctrl = if args.len() > i + 1 { if let Ok(fan_id) = args[i + 1].parse::() { Some(Some(fan_id)) @@ -363,6 +363,20 @@ pub fn parse(args: &[String]) -> Cli { Some(None) }; found_an_option = true; + } else if arg == "--remap-key" { + if args.len() > i + 3 { + let row = parse_hex_or_dec_u8(&args[i + 1]); + let col = parse_hex_or_dec_u8(&args[i + 2]); + let scancode = parse_hex_or_dec_u16(&args[i + 3]); + if let (Some(row), Some(col), Some(scancode)) = (row, col, scancode) { + cli.remap_key = Some((row, col, scancode)); + } else { + println!("Invalid values for --remap-key. Must be: "); + } + } else { + println!("--remap-key requires 3 arguments: "); + } + found_an_option = true; } else if arg == "--rgbkbd" { cli.rgbkbd = if args.len() > i + 2 { let mut colors = Vec::::new(); @@ -374,7 +388,8 @@ pub fn parse(args: &[String]) -> Cli { } else { println!("--rgbkbd requires at least 2 arguments, the start key and an RGB value"); vec![] - } + }; + found_an_option = true; } else if arg == "--ps2-enable" { cli.ps2_enable = if args.len() > i + 1 { let enable_arg = &args[i + 1]; @@ -391,7 +406,7 @@ pub fn parse(args: &[String]) -> Cli { None } } else { - println!("Need to provide a value for --tablet-mode. One of: `auto`, `tablet` or `laptop`"); + println!("Need to provide a value for --ps2-enable. Must be `true` or `false`"); None }; found_an_option = true; @@ -506,7 +521,7 @@ pub fn parse(args: &[String]) -> Cli { Some(Some(delay)) } } else { - println!("Invalid value for --fp-brightness. Must be amount in seconds >0"); + println!("Invalid value for --ec-hib-delay. Must be amount in seconds >0"); None } } else { @@ -522,7 +537,7 @@ pub fn parse(args: &[String]) -> Cli { } else if arg == "-t" || arg == "--test" { cli.test = true; found_an_option = true; - } else if arg == "-t" || arg == "--test-retimer" { + } else if arg == "--test-retimer" { cli.test_retimer = true; found_an_option = true; } else if arg == "--boardid" { @@ -557,7 +572,7 @@ pub fn parse(args: &[String]) -> Cli { }; found_an_option = true; } else if arg == "--pd-disable" { - cli.pd_reset = if args.len() > i + 1 { + cli.pd_disable = if args.len() > i + 1 { if let Ok(pd) = args[i + 1].parse::() { Some(pd) } else { @@ -709,7 +724,7 @@ pub fn parse(args: &[String]) -> Cli { None } } else { - println!("--pd-ports requires two arguments, one for each port"); + println!("--pd-ports requires three arguments, one for each port"); None }; found_an_option = true; @@ -778,9 +793,10 @@ pub fn parse(args: &[String]) -> Cli { None } } else { - println!("Need to provide a value for --console. Possible values: bios, ec, pd0, pd1, rtm01, rtm23, ac-left, ac-right"); + println!("Need to provide a value for --device. Possible values: bios, ec, pd0, pd1, rtm01, rtm23, ac-left, ac-right"); None }; + found_an_option = true; } else if arg == "--flash-gpu-descriptor" { cli.flash_gpu_descriptor = if args.len() > i + 2 { let sn = args[i + 2].to_string();