Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package framework_tool for openSUSE:Factory 
checked in at 2025-07-10 22:13:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/framework_tool (Old)
 and      /work/SRC/openSUSE:Factory/.framework_tool.new.7373 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "framework_tool"

Thu Jul 10 22:13:42 2025 rev:6 rq:1291654 version:0.4.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/framework_tool/framework_tool.changes    
2025-06-16 11:13:30.029826866 +0200
+++ /work/SRC/openSUSE:Factory/.framework_tool.new.7373/framework_tool.changes  
2025-07-10 22:13:45.759743307 +0200
@@ -1,0 +2,17 @@
+Wed Jul  9 11:23:08 UTC 2025 - Nico Krapp <nico.kr...@suse.com>
+
+- Update to 0.4.5
+  * Update blocklist of unsafe commands by @JohnAZoidberg in #187
+- Update to 0.4.4
+  * ccgx: derive Ord for AppVersion and BaseVersion by @JohnAZoidberg in #175
+  * Add support for EC_CMD_REBOOT_AP_ON_G3 by @JohnAZoidberg in #181
+  * --inputdeck: On FW16 also print sleep_l gpio state
+    by @JohnAZoidberg in #179
+  * Update docs by @JohnAZoidberg in #176
+  * Current and charge rate limit cannot be read by @JohnAZoidberg in #182
+  * uefi: Fix shell args when run from a script by @JohnAZoidberg in #185
+  * Add --feature readonly, to build a bin without risky commands
+    by @JohnAZoidberg in #141
+  * Bump to v0.4.4 by @JohnAZoidberg in #186
+
+-------------------------------------------------------------------

Old:
----
  framework_tool-0.4.3.tar.gz

New:
----
  framework_tool-0.4.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ framework_tool.spec ++++++
--- /var/tmp/diff_new_pack.U1y0T3/_old  2025-07-10 22:13:48.415853778 +0200
+++ /var/tmp/diff_new_pack.U1y0T3/_new  2025-07-10 22:13:48.431854443 +0200
@@ -20,7 +20,7 @@
 %define completion_dir_bash %{_datadir}/bash-completion/completions
 %define completion_dir_zsh %{_datadir}/zsh/functions/Completion
 Name:           framework_tool
-Version:        0.4.3
+Version:        0.4.5
 Release:        0
 Summary:        Rust tools to interact with the Framework Computer systems
 License:        BSD-3-Clause

++++++ framework_tool-0.4.3.tar.gz -> framework_tool-0.4.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/.github/workflows/ci.yml 
new/framework-system-0.4.5/.github/workflows/ci.yml
--- old/framework-system-0.4.3/.github/workflows/ci.yml 2025-06-06 
08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/.github/workflows/ci.yml 2025-07-02 
04:21:05.000000000 +0200
@@ -77,13 +77,17 @@
       run: rustup show
 
     - name: Build UEFI application (no ESP)
-      run: make -C framework_uefi build/x86_64-unknown-uefi/boot.efi
+      run: |
+        make -C framework_uefi build/x86_64-unknown-uefi/boot.efi
+        mv framework_uefi/build/x86_64-unknown-uefi/boot.efi 
framework_tool_full.efi
+        make -C framework_uefi FEATURES=readonly 
build/x86_64-unknown-uefi/boot.efi
+        cp framework_uefi/build/x86_64-unknown-uefi/boot.efi framework_tool.efi
 
     - name: Upload UEFI App
       uses: actions/upload-artifact@v4
       with:
-        name: framework.efi
-        path: framework_uefi/build/x86_64-unknown-uefi/boot.efi
+        name: framework_efi.zip
+        path: ./*.efi
 
     - name: Install mtools to build ESP and ISO (Linux)
       run: sudo apt-get install -y mtools genisoimage
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/Cargo.lock 
new/framework-system-0.4.5/Cargo.lock
--- old/framework-system-0.4.3/Cargo.lock       2025-06-06 08:21:37.000000000 
+0200
+++ new/framework-system-0.4.5/Cargo.lock       2025-07-02 04:21:05.000000000 
+0200
@@ -408,7 +408,7 @@
 
 [[package]]
 name = "framework_lib"
-version = "0.4.3"
+version = "0.4.5"
 dependencies = [
  "built",
  "clap",
@@ -440,7 +440,7 @@
 
 [[package]]
 name = "framework_tool"
-version = "0.4.3"
+version = "0.4.5"
 dependencies = [
  "embed-resource",
  "framework_lib",
@@ -451,7 +451,7 @@
 
 [[package]]
 name = "framework_uefi"
-version = "0.4.3"
+version = "0.4.5"
 dependencies = [
  "framework_lib",
  "log",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/EXAMPLES.md 
new/framework-system-0.4.5/EXAMPLES.md
--- old/framework-system-0.4.3/EXAMPLES.md      2025-06-06 08:21:37.000000000 
+0200
+++ new/framework-system-0.4.5/EXAMPLES.md      2025-07-02 04:21:05.000000000 
+0200
@@ -234,6 +234,7 @@
 Chassis Closed:   true
 Input Deck State: On
 Touchpad present: true
+SLEEP# GPIO high: true
 Positions:
   Pos 0: GenericC
   Pos 1: KeyboardA
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/EXAMPLES_ADVANCED.md 
new/framework-system-0.4.5/EXAMPLES_ADVANCED.md
--- old/framework-system-0.4.3/EXAMPLES_ADVANCED.md     2025-06-06 
08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/EXAMPLES_ADVANCED.md     2025-07-02 
04:21:05.000000000 +0200
@@ -100,3 +100,68 @@
 # Update everything from a file
 > framework_tool --flash-gpu-descriptor-file pcie_4x2.bin
 ```
+
+## Analyzing binaries
+
+### EC
+
+Note that only since Framework 13 Intel Core Ultra (and later) the version 
number embedded in the ED binary is meaningful. As you can see below, in this 
example on Intel Core 12th/13th Gen (hx30) it's always 0.0.1.
+The commit hash though is accurate and reflects the git commit it was built 
from.
+
+```
+> framework-tool --ec--bin ec.bin
+File
+  Size:                     524288 B
+  Size:                        512 KB
+EC
+  Version:     hx30_v0.0.1-7a61a89
+  RollbackVer:                   0
+  Platform:                   hx30
+  Version:                   0.0.1
+  Commit:                  7a61a89
+  Size:                       2868 B
+  Size:                          2 KB
+```
+
+### PD
+
+```
+> framework_tool --pd-bin pd-0.1.14.bin
+File
+  Size:                      65536 B
+  Size:                         64 KB
+FW 1
+  Silicon ID:               0x3000
+  Version:                  0.1.14
+  Row size:                    128 B
+  Start Row:                    22
+  Rows:                         95
+  Size:                      12160 B
+  Size:                         11 KB
+FW 2
+  Silicon ID:               0x3000
+  Version:                  0.1.14
+  Row size:                    128 B
+  Start Row:                   118
+  Rows:                        381
+  Size:                      48768 B
+  Size:                         47 KB
+```
+
+### UEFI Capsule
+
+```
+> framework_tool --capsule retimer23.cap
+File
+  Size:                    2232676 B
+  Size:                       2180 KB
+Capsule Header
+  Capsule GUID: (ba2e4e6e, 3b0c, 4f25, [8a,59,4c,55,3f,c8,6e,a2])
+  Header size:                  28 B
+  Flags:                   0x50000
+    Persist across reset  (0x10000)
+    Initiate reset        (0x40000)
+  Capsule Size:            2232676 B
+  Capsule Size:               2180 KB
+  Type:   Framework Retimer23 (Right)
+```
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/README.md 
new/framework-system-0.4.5/README.md
--- old/framework-system-0.4.3/README.md        2025-06-06 08:21:37.000000000 
+0200
+++ new/framework-system-0.4.5/README.md        2025-07-02 04:21:05.000000000 
+0200
@@ -13,11 +13,32 @@
 
 ###### Operating System Support
 
-- [x] OS Tool (`framework_tool`)
-  - [x] Tested on Linux
-  - [x] Tested on Windows
-  - [x] Tested on FreeBSD
-- [x] UEFI Shell tool (`framework_uefi`)
+The following operating environments are supported.
+
+- Linux
+- Windows
+- UEFI
+- FreeBSD
+
+Most functionality depends communication with the EC.
+For Linux and Windows there are dedicated drivers.
+On UEFI and FreeBSD raw port I/O is used - on Linux this can also be used as a 
fallback, if the driver is not available or not working.
+
+|                     | Port I/O | Linux | Windows |
+|---------------------|----------| ------|---------|
+| Framework 12        |          |       |         |
+| Intel Core 12th Gen | Yes      | 
[6.12](https://github.com/torvalds/linux/commit/62be134abf4250474a7a694837064bc783d2b291)
 | Yes     |
+| Framework 13        |          |       |         |
+| Intel Core 11th Gen | Yes      | 
[6.11](https://github.com/torvalds/linux/commit/04ca0a51f1e63bd553fd4af8e9af0fe094fa4f0a)
 | Not yet |
+| Intel Core 12th Gen | Yes      | 
[6.13](https://github.com/torvalds/linux/commit/dcd59d0d7d51b2a4b768fc132b0d74a97dfd6d6a)
 | Not yet |
+| Intel Core 13th Gen | Yes      | 
[6.13](https://github.com/torvalds/linux/commit/dcd59d0d7d51b2a4b768fc132b0d74a97dfd6d6a)
 | Not yet |
+| AMD Ryzen 7040      | Yes      | 
[6.10](https://github.com/torvalds/linux/commit/c8f460d991df93d87de01a96b783cad5a2da9616)
 | Soon    |
+| Intel Core Ultra 1S | Yes      | 
[6.12](https://github.com/torvalds/linux/commit/62be134abf4250474a7a694837064bc783d2b291)
 | Soon    |
+| AMD Ryzen AI 300    | Yes      | 
[6.12](https://github.com/torvalds/linux/commit/62be134abf4250474a7a694837064bc783d2b291)
 | Yes     |
+| Framework 16        |          |       |         |
+| AMD Ryzen 7040      | Yes      | 
[6.10](https://github.com/torvalds/linux/commit/c8f460d991df93d87de01a96b783cad5a2da9616)
 | Soon    |
+| Framework Desktop   |          |       |         |
+| AMD Ryzen AI Max    | Yes      | 
[6.15](https://github.com/torvalds/linux/commit/d83c45aeec9b223fe6db4175e9d1c4f5699cc37a)
 | Yes     |
 
 ###### Firmware Information
 
@@ -205,61 +226,6 @@
 cargo build && sudo ./target/debug/framework_tool
 ```
 
-Dumping version information from firmware binaries:
-
-```
-# Dumping PD FW Binary Information:
->  cargo run -q -- --pd-bin pd-0.1.14.bin
-File
-  Size:                      65536 B
-  Size:                         64 KB
-FW 1
-  Silicon ID:               0x3000
-  Version:                  0.1.14
-  Row size:                    128 B
-  Start Row:                    22
-  Rows:                         95
-  Size:                      12160 B
-  Size:                         11 KB
-FW 2
-  Silicon ID:               0x3000
-  Version:                  0.1.14
-  Row size:                    128 B
-  Start Row:                   118
-  Rows:                        381
-  Size:                      48768 B
-  Size:                         47 KB
-
-# Dumping EC FW Binary Information
-> cargo run -q -- --ec--bin ec.bin
-File
-  Size:                     524288 B
-  Size:                        512 KB
-EC
-  Version:     hx30_v0.0.1-7a61a89
-  RollbackVer:                   0
-  Platform:                   hx30
-  Version:                   0.0.1
-  Commit:                  7a61a89
-  Size:                       2868 B
-  Size:                          2 KB
-
-# Dumping Capsule Binary Information:
-> cargo run -q -- --capsule retimer23.cap
-File
-  Size:                    2232676 B
-  Size:                       2180 KB
-Capsule Header
-  Capsule GUID: (ba2e4e6e, 3b0c, 4f25, [8a,59,4c,55,3f,c8,6e,a2])
-  Header size:                  28 B
-  Flags:                   0x50000
-    Persist across reset  (0x10000)
-    Initiate reset        (0x40000)
-  Capsule Size:            2232676 B
-  Capsule Size:               2180 KB
-  Type:   Framework Retimer23 (Right)
-```
-
 ###### Running on Windows
 
 On newly released systems since 2025 the Framework driver installer includes 
the EC driver.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/framework_lib/Cargo.toml 
new/framework-system-0.4.5/framework_lib/Cargo.toml
--- old/framework-system-0.4.3/framework_lib/Cargo.toml 2025-06-06 
08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_lib/Cargo.toml 2025-07-02 
04:21:05.000000000 +0200
@@ -1,6 +1,6 @@
 [package]
 name = "framework_lib"
-version = "0.4.3"
+version = "0.4.5"
 description = "Library to control Framework Computer systems"
 homepage = "https://github.com/FrameworkComputer/framework-system";
 repository = "https://github.com/FrameworkComputer/framework-system";
@@ -14,6 +14,7 @@
 
 [features]
 default = ["hidapi", "rusb"]
+readonly = [ ]
 rusb = ["dep:rusb"]
 hidapi = ["dep:hidapi"]
 uefi = [ "lazy_static/spin_no_std" ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/framework_lib/src/ccgx/mod.rs 
new/framework-system-0.4.5/framework_lib/src/ccgx/mod.rs
--- old/framework-system-0.4.3/framework_lib/src/ccgx/mod.rs    2025-06-06 
08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_lib/src/ccgx/mod.rs    2025-07-02 
04:21:05.000000000 +0200
@@ -110,7 +110,7 @@
     Ccg8 = 0x3580,
 }
 
-#[derive(Debug, PartialEq, Copy, Clone)]
+#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Copy, Clone)]
 pub struct BaseVersion {
     /// Major part of the version. X of X.Y.Z.BB
     pub major: u8,
@@ -154,7 +154,7 @@
     }
 }
 
-#[derive(Debug, PartialEq, Copy, Clone)]
+#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Copy, Clone)]
 pub enum Application {
     Notebook,
     Monitor,
@@ -162,7 +162,7 @@
     Invalid,
 }
 
-#[derive(Debug, PartialEq, Copy, Clone)]
+#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Copy, Clone)]
 pub struct AppVersion {
     pub application: Application,
     /// Major part of the version. X of X.Y.Z
@@ -309,3 +309,42 @@
         None
     }
 }
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    // Make sure deriving does what I expect, properly comparing with multiple 
fields
+    fn derive_ord() {
+        let v0_0_0 = AppVersion {
+            application: Application::Notebook,
+            major: 0,
+            minor: 0,
+            circuit: 0,
+        };
+        let v1_0_1 = AppVersion {
+            application: Application::Notebook,
+            major: 1,
+            minor: 0,
+            circuit: 1,
+        };
+        let v0_1_0 = AppVersion {
+            application: Application::Notebook,
+            major: 0,
+            minor: 1,
+            circuit: 0,
+        };
+        let v1_1_1 = AppVersion {
+            application: Application::Notebook,
+            major: 1,
+            minor: 1,
+            circuit: 1,
+        };
+        assert_eq!(v0_0_0, v0_0_0.clone());
+        assert!(v0_0_0 < v1_0_1);
+        assert!(v0_1_0 < v1_0_1);
+        assert!(v1_0_1 < v1_1_1);
+        assert!(v1_1_1 > v1_0_1);
+    }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/framework-system-0.4.3/framework_lib/src/chromium_ec/command.rs 
new/framework-system-0.4.5/framework_lib/src/chromium_ec/command.rs
--- old/framework-system-0.4.3/framework_lib/src/chromium_ec/command.rs 
2025-06-06 08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_lib/src/chromium_ec/command.rs 
2025-07-02 04:21:05.000000000 +0200
@@ -53,6 +53,9 @@
     /// Get information about PD controller power
     UsbPdPowerInfo = 0x0103,
     AdcRead = 0x0123,
+    ApReset = 0x0125,
+    LocateChip = 0x0126,
+    RebootApOnG3 = 0x0127,
     RgbKbdSetColor = 0x013A,
     RgbKbd = 0x013B,
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/framework-system-0.4.3/framework_lib/src/chromium_ec/commands.rs 
new/framework-system-0.4.5/framework_lib/src/chromium_ec/commands.rs
--- old/framework-system-0.4.3/framework_lib/src/chromium_ec/commands.rs        
2025-06-06 08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_lib/src/chromium_ec/commands.rs        
2025-07-02 04:21:05.000000000 +0200
@@ -879,6 +879,42 @@
     }
 }
 
+#[repr(C)]
+pub struct EcRequestApReset {}
+
+impl EcRequest<()> for EcRequestApReset {
+    fn command_id() -> EcCommands {
+        EcCommands::ApReset
+    }
+}
+
+#[repr(C)]
+pub struct EcRequestRebootApOnG3V0 {}
+
+impl EcRequest<()> for EcRequestRebootApOnG3V0 {
+    fn command_id() -> EcCommands {
+        EcCommands::RebootApOnG3
+    }
+    fn command_version() -> u8 {
+        0
+    }
+}
+
+#[repr(C)]
+pub struct EcRequestRebootApOnG3V1 {
+    /// Delay in seconds after entering G3 state
+    pub delay: u32,
+}
+
+impl EcRequest<()> for EcRequestRebootApOnG3V1 {
+    fn command_id() -> EcCommands {
+        EcCommands::RebootApOnG3
+    }
+    fn command_version() -> u8 {
+        1
+    }
+}
+
 // TODO: Actually 128, but if we go above ~80 EC returns REQUEST_TRUNCATED
 // At least when I use the portio driver
 pub const EC_RGBKBD_MAX_KEY_COUNT: usize = 64;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/framework-system-0.4.3/framework_lib/src/chromium_ec/mod.rs 
new/framework-system-0.4.5/framework_lib/src/chromium_ec/mod.rs
--- old/framework-system-0.4.3/framework_lib/src/chromium_ec/mod.rs     
2025-06-06 08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_lib/src/chromium_ec/mod.rs     
2025-07-02 04:21:05.000000000 +0200
@@ -603,9 +603,11 @@
     pub fn print_fw16_inputdeck_status(&self) -> EcResult<()> {
         let intrusion = self.get_intrusion_status()?;
         let status = self.get_input_deck_status()?;
+        let sleep_l = self.get_gpio("sleep_l")?;
         println!("Chassis Closed:   {}", !intrusion.currently_open);
         println!("Input Deck State: {:?}", status.state);
         println!("Touchpad present: {}", status.touchpad_present);
+        println!("SLEEP# GPIO high: {}", sleep_l);
         println!("Positions:");
         println!("  Pos 0: {:?}", status.top_row.pos0);
         println!("  Pos 1: {:?}", status.top_row.pos1);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/framework-system-0.4.3/framework_lib/src/commandline/clap_std.rs 
new/framework-system-0.4.5/framework_lib/src/commandline/clap_std.rs
--- old/framework-system-0.4.3/framework_lib/src/commandline/clap_std.rs        
2025-06-06 08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_lib/src/commandline/clap_std.rs        
2025-07-02 04:21:05.000000000 +0200
@@ -9,7 +9,7 @@
 use crate::chromium_ec::commands::SetGpuSerialMagic;
 use crate::chromium_ec::CrosEcDriverType;
 use crate::commandline::{
-    Cli, ConsoleArg, FpBrightnessArg, HardwareDeviceType, InputDeckModeArg, 
RebootEcArg,
+    Cli, ConsoleArg, FpBrightnessArg, HardwareDeviceType, InputDeckModeArg, 
LogLevel, RebootEcArg,
     TabletModeArg,
 };
 
@@ -167,14 +167,14 @@
     #[arg(long)]
     charge_limit: Option<Option<u8>>,
 
-    /// Get or set max charge current limit
+    /// Set max charge current limit
     #[arg(long)]
-    #[clap(num_args = ..=2)]
+    #[clap(num_args = 1..=2)]
     charge_current_limit: Vec<u32>,
 
-    /// Get or set max charge current limit
+    /// Set max charge current limit
     #[arg(long)]
-    #[clap(num_args = ..=2)]
+    #[clap(num_args = 1..=2)]
     charge_rate_limit: Vec<f32>,
 
     /// Get GPIO value by name or all, if no name provided
@@ -381,7 +381,7 @@
     };
 
     Cli {
-        verbosity: args.verbosity.log_level_filter(),
+        verbosity: LogLevel(args.verbosity.log_level_filter()),
         versions: args.versions,
         version: args.version,
         features: args.features,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/framework-system-0.4.3/framework_lib/src/commandline/mod.rs 
new/framework-system-0.4.5/framework_lib/src/commandline/mod.rs
--- old/framework-system-0.4.3/framework_lib/src/commandline/mod.rs     
2025-06-06 08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_lib/src/commandline/mod.rs     
2025-07-02 04:21:05.000000000 +0200
@@ -134,13 +134,22 @@
     }
 }
 
+#[derive(Debug)]
+pub struct LogLevel(log::LevelFilter);
+
+impl Default for LogLevel {
+    fn default() -> Self {
+        LogLevel(log::LevelFilter::Error)
+    }
+}
+
 /// Shadows `clap_std::ClapCli` with extras for UEFI
 ///
 /// The UEFI commandline currently doesn't use clap, so we need to shadow the 
struct.
 /// Also it has extra options.
-#[derive(Debug)]
+#[derive(Debug, Default)]
 pub struct Cli {
-    pub verbosity: log::LevelFilter,
+    pub verbosity: LogLevel,
     pub versions: bool,
     pub version: bool,
     pub features: bool,
@@ -212,9 +221,87 @@
 
 pub fn parse(args: &[String]) -> Cli {
     #[cfg(feature = "uefi")]
-    return uefi::parse(args);
+    let cli = uefi::parse(args);
     #[cfg(not(feature = "uefi"))]
-    return clap_std::parse(args);
+    let cli = clap_std::parse(args);
+
+    if cfg!(feature = "readonly") {
+        // Initialize a new Cli with no arguments
+        // Set all arguments that are readonly/safe
+        // We explicitly only cope the safe ones so that if we add new 
arguments in the future,
+        // which might be unsafe, we can't forget to exclude them from the 
safe set.
+        // TODO: Instead of silently ignoring blocked command, we should 
remind the user
+        Cli {
+            verbosity: cli.verbosity,
+            versions: cli.versions,
+            version: cli.version,
+            features: cli.features,
+            esrt: cli.esrt,
+            device: cli.device,
+            compare_version: cli.compare_version,
+            power: cli.power,
+            thermal: cli.thermal,
+            sensors: cli.sensors,
+            // fansetduty
+            // fansetrpm
+            // autofanctrl
+            pdports: cli.pdports,
+            privacy: cli.privacy,
+            pd_info: cli.version,
+            // pd_reset
+            // pd_disable
+            // pd_enable
+            dp_hdmi_info: cli.dp_hdmi_info,
+            // dp_hdmi_update
+            audio_card_info: cli.audio_card_info,
+            pd_bin: cli.pd_bin,
+            ec_bin: cli.ec_bin,
+            capsule: cli.capsule,
+            dump: cli.dump,
+            h2o_capsule: cli.h2o_capsule,
+            // dump_ec_flash
+            // flash_ec
+            // flash_ro_ec
+            // flash_rw_ec
+            driver: cli.driver,
+            test: cli.test,
+            dry_run: cli.dry_run,
+            // force
+            intrusion: cli.intrusion,
+            inputdeck: cli.inputdeck,
+            inputdeck_mode: cli.inputdeck_mode,
+            expansion_bay: cli.expansion_bay,
+            // charge_limit
+            // charge_current_limit
+            // charge_rate_limit
+            get_gpio: cli.get_gpio,
+            fp_led_level: cli.fp_led_level,
+            fp_brightness: cli.fp_brightness,
+            kblight: cli.kblight,
+            remap_key: cli.remap_key,
+            rgbkbd: cli.rgbkbd,
+            ps2_enable: cli.ps2_enable,
+            // tablet_mode
+            // touchscreen_enable
+            stylus_battery: cli.stylus_battery,
+            console: cli.console,
+            reboot_ec: cli.reboot_ec,
+            // ec_hib_delay
+            hash: cli.hash,
+            pd_addrs: cli.pd_addrs,
+            pd_ports: cli.pd_ports,
+            help: cli.help,
+            info: cli.info,
+            // flash_gpu_descriptor
+            // flash_gpu_descriptor_file
+            // allupdate
+            paginate: cli.paginate,
+            // raw_command
+            ..Default::default()
+        }
+    } else {
+        cli
+    }
 }
 
 fn print_single_pd_details(pd: &PdController) {
@@ -815,7 +902,7 @@
 pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
     #[cfg(feature = "uefi")]
     {
-        log::set_max_level(args.verbosity);
+        log::set_max_level(args.verbosity.0);
     }
     #[cfg(not(feature = "uefi"))]
     {
@@ -824,7 +911,7 @@
         //     .filter("FRAMEWORK_COMPUTER_LOG")
         //     .write_style("FRAMEWORK_COMPUTER_LOG_STYLE");
 
-        let level = args.verbosity.as_str();
+        let level = args.verbosity.0.as_str();
         
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or(level))
             .format_target(false)
             .format_timestamp(None)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/framework-system-0.4.3/framework_lib/src/commandline/uefi.rs 
new/framework-system-0.4.5/framework_lib/src/commandline/uefi.rs
--- old/framework-system-0.4.3/framework_lib/src/commandline/uefi.rs    
2025-06-06 08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_lib/src/commandline/uefi.rs    
2025-07-02 04:21:05.000000000 +0200
@@ -6,55 +6,27 @@
 use log::{debug, error, info, trace};
 use uefi::prelude::BootServices;
 use uefi::proto::shell_params::*;
-use uefi::table::boot::{OpenProtocolAttributes, OpenProtocolParams, 
SearchType};
-use uefi::Identify;
+use uefi::Handle;
 
 use crate::chromium_ec::commands::SetGpuSerialMagic;
 use crate::chromium_ec::{CrosEcDriverType, HardwareDeviceType};
-use crate::commandline::Cli;
+use crate::commandline::{Cli, LogLevel};
 
 use super::{ConsoleArg, FpBrightnessArg, InputDeckModeArg, RebootEcArg, 
TabletModeArg};
 
 /// Get commandline arguments from UEFI environment
-pub fn get_args(boot_services: &BootServices) -> Vec<String> {
-    // TODO: I think i should open this from the ImageHandle?
-    let shell_params_h =
-        
boot_services.locate_handle_buffer(SearchType::ByProtocol(&ShellParameters::GUID));
-    let shell_params_h = if let Ok(shell_params_h) = shell_params_h {
-        shell_params_h
+pub fn get_args(bs: &BootServices, image_handle: Handle) -> Vec<String> {
+    if let Ok(shell_params) = 
bs.open_protocol_exclusive::<ShellParameters>(image_handle) {
+        shell_params.get_args()
     } else {
-        error!("ShellParameters protocol not found");
-        return vec![];
-    };
-
-    for handle in &*shell_params_h {
-        let params_handle = unsafe {
-            boot_services
-                .open_protocol::<ShellParameters>(
-                    OpenProtocolParams {
-                        handle: *handle,
-                        agent: boot_services.image_handle(),
-                        controller: None,
-                    },
-                    OpenProtocolAttributes::GetProtocol,
-                )
-                .expect("Failed to open ShellParameters handle")
-        };
-
-        // Ehm why are there two and one has no args?
-        // Maybe one is the shell itself?
-        if params_handle.argc == 0 {
-            continue;
-        }
-
-        return params_handle.get_args();
+        // No protocol found if the application wasn't executed by the shell
+        vec![]
     }
-    vec![]
 }
 
 pub fn parse(args: &[String]) -> Cli {
     let mut cli = Cli {
-        verbosity: log::LevelFilter::Error,
+        verbosity: LogLevel(log::LevelFilter::Error),
         paginate: false,
         versions: false,
         version: false,
@@ -131,15 +103,15 @@
 
     for (i, arg) in args.iter().enumerate() {
         if arg == "-q" {
-            cli.verbosity = log::LevelFilter::Off;
+            cli.verbosity = LogLevel(log::LevelFilter::Off);
         } else if arg == "-v" {
-            cli.verbosity = log::LevelFilter::Warn;
+            cli.verbosity = LogLevel(log::LevelFilter::Warn);
         } else if arg == "-vv" {
-            cli.verbosity = log::LevelFilter::Info;
+            cli.verbosity = LogLevel(log::LevelFilter::Info);
         } else if arg == "-vvv" {
-            cli.verbosity = log::LevelFilter::Debug;
+            cli.verbosity = LogLevel(log::LevelFilter::Debug);
         } else if arg == "-vvvv" {
-            cli.verbosity = log::LevelFilter::Trace;
+            cli.verbosity = LogLevel(log::LevelFilter::Trace);
         } else if arg == "--versions" {
             cli.versions = true;
             found_an_option = true;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/framework_lib/src/lib.rs 
new/framework-system-0.4.5/framework_lib/src/lib.rs
--- old/framework-system-0.4.3/framework_lib/src/lib.rs 2025-06-06 
08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_lib/src/lib.rs 2025-07-02 
04:21:05.000000000 +0200
@@ -1,6 +1,7 @@
 //! A library to interact with [Framework Computer](https://frame.work) 
hardware and building tools to do so.
 
 #![cfg_attr(feature = "uefi", no_std)]
+#![allow(clippy::uninlined_format_args)]
 
 extern crate alloc;
 #[cfg(feature = "uefi")]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/framework_tool/Cargo.toml 
new/framework-system-0.4.5/framework_tool/Cargo.toml
--- old/framework-system-0.4.3/framework_tool/Cargo.toml        2025-06-06 
08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_tool/Cargo.toml        2025-07-02 
04:21:05.000000000 +0200
@@ -1,6 +1,6 @@
 [package]
 name = "framework_tool"
-version = "0.4.3"
+version = "0.4.5"
 description = "Tool to control Framework Computer systems"
 homepage = "https://github.com/FrameworkComputer/framework-system";
 repository = "https://github.com/FrameworkComputer/framework-system";
@@ -12,6 +12,10 @@
 name = "framework_tool"
 path = "src/main.rs"
 
+[features]
+default = [ ]
+readonly = [ "framework_lib/readonly" ]
+
 [dependencies.framework_lib]
 path = "../framework_lib"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/framework_uefi/Cargo.toml 
new/framework-system-0.4.5/framework_uefi/Cargo.toml
--- old/framework-system-0.4.3/framework_uefi/Cargo.toml        2025-06-06 
08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_uefi/Cargo.toml        2025-07-02 
04:21:05.000000000 +0200
@@ -1,6 +1,6 @@
 [package]
 name = "framework_uefi"
-version = "0.4.3"
+version = "0.4.5"
 description = "UEFI Tool to control Framework Computer systems"
 homepage = "https://github.com/FrameworkComputer/framework-system";
 repository = "https://github.com/FrameworkComputer/framework-system";
@@ -14,6 +14,10 @@
 name = "uefitool"
 path = "src/main.rs"
 
+[features]
+default = [ ]
+readonly = [ "framework_lib/readonly" ]
+
 [dependencies]
 uefi = { version = "0.20", features = ["alloc"] }
 uefi-services = "0.17"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/framework_uefi/Makefile 
new/framework-system-0.4.5/framework_uefi/Makefile
--- old/framework-system-0.4.3/framework_uefi/Makefile  2025-06-06 
08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_uefi/Makefile  2025-07-02 
04:21:05.000000000 +0200
@@ -1,5 +1,6 @@
 TARGET?=x86_64-unknown-uefi
 BUILD=build/$(TARGET)
+FEATURES?=''
 
 SRC_DIR=.
 
@@ -18,7 +19,7 @@
 iso: $(BUILD)/UEFI-Shell-fwk.iso
 
 clean:
-       rm -r $(BUILD)
+       rm -rf $(BUILD)
 
 qemu: $(BUILD)/boot.img
        $(QEMU) $(QEMU_FLAGS) $<
@@ -38,6 +39,9 @@
        mkfs.vfat $@.tmp
        mmd -i $@.tmp efi
        mmd -i $@.tmp efi/boot
+       echo 'efi\boot\bootx64.efi --version' > startup.nsh
+       mcopy -i $@.tmp startup.nsh ::efi/boot/startup.nsh
+       rm -f startup.nsh
        mcopy -i $@.tmp $< ::efi/boot/bootx64.efi
        mv $@.tmp $@
 
@@ -58,6 +62,7 @@
          mkdir -p $(BUILD)
                cargo rustc \
                --target $(TARGET) \
+               --features $(FEATURES) \
                --release \
                -- \
                --emit link=framework_uefi/$@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/framework-system-0.4.3/framework_uefi/src/main.rs 
new/framework-system-0.4.5/framework_uefi/src/main.rs
--- old/framework-system-0.4.3/framework_uefi/src/main.rs       2025-06-06 
08:21:37.000000000 +0200
+++ new/framework-system-0.4.5/framework_uefi/src/main.rs       2025-07-02 
04:21:05.000000000 +0200
@@ -12,11 +12,11 @@
 use framework_lib::commandline;
 
 #[entry]
-fn main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
+fn main(image_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
     uefi_services::init(&mut system_table).unwrap();
     let bs = system_table.boot_services();
 
-    let args = commandline::uefi::get_args(bs);
+    let args = commandline::uefi::get_args(bs, image_handle);
     let args = commandline::parse(&args);
     if commandline::run_with_args(&args, false) == 0 {
         return Status::SUCCESS;

++++++ vendor.tar.zst ++++++
/work/SRC/openSUSE:Factory/framework_tool/vendor.tar.zst 
/work/SRC/openSUSE:Factory/.framework_tool.new.7373/vendor.tar.zst differ: char 
7, line 1

Reply via email to