Skip to content

Commit b7bf240

Browse files
committed
framework_uefi: Add support for AcLeft and AcRight
Functionality originally added in 69c97b0. Forgot to add these to UEFI as well. Signed-off-by: Daniel Schaefer <[email protected]>
1 parent 38eedeb commit b7bf240

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

README.md

+27-4
Original file line numberDiff line numberDiff line change
@@ -279,21 +279,21 @@ succcess, 1 on failure.
279279

280280
```
281281
# Check which devices it's available for
282-
> ./framework_system --device
283-
[possible values: bios, ec, pd0, pd1, rtm01, rtm23]
282+
> ./framework_tool --device
283+
[possible values: bios, ec, pd0, pd1, rtm01, rtm23, ac-left, ac-right]
284284
285285
For more information try '--help'
286286
287287
# Successful compare
288-
> ./framework_system --device bios --compare-version 03.01
288+
> ./framework_tool --device bios --compare-version 03.01
289289
Target Version "03.01"
290290
Comparing BIOS version "03.01"
291291
Compared version: 0
292292
> echo $?
293293
0
294294
295295
# Failed compare
296-
> ./framework_system --device bios --compare-version 03.00
296+
> ./framework_tool --device bios --compare-version 03.00
297297
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
298298
Target Version "03.00"
299299
Comparing BIOS version "03.01"
@@ -304,6 +304,29 @@ Error: "Fail"
304304
1
305305
```
306306

307+
On UEFI Shell:
308+
309+
```
310+
# Check if AC is attached on left side
311+
Shell> fs0:framework_tool.efi --device ac-left --compare-version 1
312+
Target Version "1"
313+
Comparing AcLeft "1"
314+
Comparison Result: 0
315+
# It is
316+
Shell> echo %lasterror%
317+
0x0
318+
319+
# Check if AC is attached on right side
320+
Shell> fs0:framework_tool.efi --device ac-right --compare-version 1
321+
Target Version "1"
322+
Comparing AcLeft "0"
323+
Comparison Result: 1
324+
325+
# It is not
326+
Shell> echo %lasterror%
327+
0x1
328+
```
329+
307330
## Debugging
308331

309332
To debug, increase the verbosity from the commandline with `-v`.

framework_lib/src/commandline/uefi.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -436,12 +436,16 @@ pub fn parse(args: &[String]) -> Cli {
436436
Some(HardwareDeviceType::RTM01)
437437
} else if console_arg == "rtm23" {
438438
Some(HardwareDeviceType::RTM23)
439+
} else if console_arg == "ac-left" {
440+
Some(HardwareDeviceType::AcLeft)
441+
} else if console_arg == "ac-right" {
442+
Some(HardwareDeviceType::AcRight)
439443
} else {
440444
println!("Invalid value for --device: {}", console_arg);
441445
None
442446
}
443447
} else {
444-
println!("Need to provide a value for --console. Either `follow` or `recent`");
448+
println!("Need to provide a value for --console. Possible values: bios, ec, pd0, pd1, rtm01, rtm23, ac-left, ac-right");
445449
None
446450
};
447451
}

0 commit comments

Comments
 (0)