← 输入框|github.com|刷新
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: FrameworkComputer/framework-system
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: FrameworkComputer/framework-system
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: windows-fixes
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 13 commits
  • 12 files changed
  • 2 contributors

Commits on Nov 23, 2026

  1. ci: Run clippy and tests on Windows too

    The lints and test jobs run on Linux only, so none of the cfg(windows)
    code was ever linted or tested. That is how the io_other_error lint in
    smart_battery's Windows read_password made it in.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    5e2fa65 View commit details
    Browse the repository at this point in the history
  2. chromium_ec: Pass a real lpBytesReturned pointer in read_memory

    `Some(retb as *mut u32)` casts the u32 value 0 into a pointer, so the
    driver was handed a NULL lpBytesReturned. DeviceIoControl documents that
    as not allowed when lpOverlapped is NULL, even for operations whose
    returned byte count is meaningless.
    
    send_command a few lines below already does this correctly, so just
    match it.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    2558b45 View commit details
    Browse the repository at this point in the history
  3. chromium_ec: Drop redundant pointer cast in send_command

    &mut u32 coerces to *mut u32 on its own, and read_memory now passes
    Some(&mut returned) without the cast, so match that.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    26069ab View commit details
    Browse the repository at this point in the history
  4. chromium_ec: Return an error instead of panicking on failed IOCTLs

    Both DeviceIoControl calls ended in unwrap(), so any driver-level failure
    aborted the whole tool instead of surfacing as an EcError. The Linux
    cros_ec backend already maps its ioctl errors to EcError::DeviceError.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    46ef6d2 View commit details
    Browse the repository at this point in the history
  5. commandline: Don't panic when the EC flash dump can't be written

    --dump-ec-flash unwrapped both the flash read and the file write, so a
    path that can't be created aborted the tool:
    
      $ framework_tool --dump-ec-flash Z:\nope\dump.bin
      panicked at commandline/mod.rs: Os { code: 3, kind: NotFound, .. }
    
    Create the file before reading the flash, so a bad path is reported
    immediately rather than after dumping all 512 KB. dump_dgpu_eeprom right
    below already handled this gracefully.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    34635a5 View commit details
    Browse the repository at this point in the history
  6. touchscreen: Stop reading past the report buffer on Windows

    HidD_SetOutputReport was told the report is one byte longer than the
    0x40 byte buffer it was given, so the driver read one byte past the end
    of the stack buffer. The firmware does need that extra byte, so make
    the buffer 0x41 long instead of lying about its size.
    
    While here, stop treating failures as success:
    
    - ReadFile's result and bytes_read were only logged, so a failed or
      short read returned the zero-initialized buffer as if the device had
      answered. Return None instead.
    - Bound the response slice, which panicked when a caller asked for more
      than fits into a report.
    - HidD_SetOutputReport/HidD_GetFeature return values were ignored.
    - Device paths that aren't UTF-8 no longer panic.
    - Close the device HANDLE on drop.
    
    Untested on hardware, this system has no touchscreen.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    ee65a2f View commit details
    Browse the repository at this point in the history
  7. chromium_ec: Only offer drivers that are built for the platform

    All three CrosEcDriverType variants were always compiled, so on Windows
    clap advertised drivers whose modules don't even exist there:
    
      $ framework_tool.exe --driver
        [possible values: portio, cros-ec, windows]
      $ framework_tool.exe --driver portio --power
      Selected driver Portio not available.
    
    Gate the variants the same way the modules are gated. Portio is only
    gated on the OS and not the architecture, so that non-x86_64 targets
    still have at least one variant and the enum never ends up empty. Those
    fall through to the existing "No EC driver available" arm, hence the
    unreachable_patterns allows.
    
    The help text claimed portio is the default, which was only true for
    Linux and UEFI. Regenerate completions and the man page for the new
    wording and value list.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    708a58a View commit details
    Browse the repository at this point in the history
  8. commandline: Only touch the touchscreen and stylus on Laptop 12

    Laptop 12 is the only system with a touchscreen and stylus, but
    --stylus-battery, --touchscreen-enable and the touchscreen part of
    --versions ran everywhere.
    
    --stylus-battery was the worst of them: print_stylus_battery_level
    looped forever, only logging at debug level when no stylus answered. On
    a Laptop 16 it never returned, it had to be killed. Gate it on the
    platform and bound the retries, so it also terminates on a Laptop 12
    with no stylus paired.
    
    print_himax_fw_ver was likewise called on every platform in --versions,
    while print_fw_ver next to it was already gated.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    ae320f3 View commit details
    Browse the repository at this point in the history
  9. chromium_ec: Match the Windows driver's read_memory bounds

    crosecbus rejects a memory map read when offset >= EC_MEMMAP_SIZE - bytes,
    so a read ending exactly at the end of the 255 byte map fails, even
    though the shared check in CrosEc::read_memory lets it through.
    
    Check the same bound up front so the user gets an error saying why
    instead of a generic IOCTL failure. The other drivers can still read the
    whole map.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    JohnAZoidberg committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    11c5684 View commit details
    Browse the repository at this point in the history
  10. commandline: Show the Himax touchscreen version on Laptop 13 again

    The previous commit gated print_himax_fw_ver behind the Laptop 12 check,
    but the Himax touchscreen is the one Laptop 13 can have, so --versions
    stopped showing it there.
    
    On Laptop 12 print_fw_ver already prints the Himax version itself, so
    calling both printed it twice. Call print_fw_ver on Laptop 12 and
    print_himax_fw_ver everywhere else.
    
    Rename has_touchscreen to has_ili_touchscreen, because it is only about
    the ILI touchscreen and stylus.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    JohnAZoidberg and claude committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    eeeca28 View commit details
    Browse the repository at this point in the history
  11. EXAMPLES: Update the --driver help text

    It changed when the driver enum was gated by platform. The help output
    shown here is from Linux, where --driver now only accepts portio and
    cros-ec. Passing --driver windows is rejected by the argument parser
    instead of failing later when the driver is not found.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    JohnAZoidberg and claude committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    f7ffc71 View commit details
    Browse the repository at this point in the history
  12. commandline: Remove the empty dump file when the EC flash read fails

    The dump file is now created before reading the flash, so a failed read
    left an empty file behind, which could be mistaken for a dump. Remove
    it again. It has to be closed first, otherwise Windows can't delete it.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    JohnAZoidberg and claude committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    771081e View commit details
    Browse the repository at this point in the history
  13. power: Don't report 0% charge before an update when LFCC is 0

    charge_percentage falls back to 0 when the last full charge capacity is
    0. print_battery_information already says the level is unknown in that
    case, but check_update_ready printed "Current charge is: 0%". Say it's
    unknown there too. The update is still refused, as before.
    
    Signed-off-by: Daniel Schaefer <dhs@frame.work>
    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    JohnAZoidberg and claude committed Nov 23, 2026
    Configuration menu
    Copy the full SHA
    ed1fd83 View commit details
    Browse the repository at this point in the history
Loading