From Fedora Project Wiki

Revision as of 09:38, 27 August 2023 by Sumantrom (talk | contribs) (Created page with "{{QA/Test_Case |description=This test case aims to validate that `flashrom`, a utility for identifying, reading, writing, verifying, and erasing flash chips, works as expected. |setup= # Install `flashrom` package if not already installed using: `sudo dnf install flashrom` # Ensure you have root access, as most flashrom operations require it. |actions= # Open a terminal window. ## Identify Flash Chips # Use `flashrom` to identify the flash chips on your system: `sudo f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This test case aims to validate that flashrom, a utility for identifying, reading, writing, verifying, and erasing flash chips, works as expected.

Setup

  1. Install flashrom package if not already installed using: sudo dnf install flashrom
  2. Ensure you have root access, as most flashrom operations require it.

How to test

  1. Open a terminal window.
    1. Identify Flash Chips
  1. Use flashrom to identify the flash chips on your system: sudo flashrom -p internal
    1. Read Flash
  1. Attempt to read the current BIOS/UEFI/firmware image into a file: sudo flashrom -p internal -r backup.bin

> **Warning**: Be very cautious when performing write and erase operations, as they can brick your device if not done correctly.

    1. Verify Firmware (Optional)
  1. Verify the content of a chip against a given file: sudo flashrom -p internal -v backup.bin
    1. Write Flash (High Risk, Optional)
  1. To write a new BIOS/UEFI/firmware image (replace new_image.bin with the path to your new firmware image): sudo flashrom -p internal -w new_image.bin

Expected Results

  1. The flashrom package should install without errors.
  2. The flashrom should correctly identify the flash chips on the system.
  3. The read operation should complete without errors, and the backup.bin file should be created.
  4. The verify operation (if executed) should confirm that the content of the chip matches the given file.
  5. The write operation (if executed) should complete without errors, and the new BIOS/UEFI/firmware should function as expected.

Optional

For additional testing, you may try using flashrom to interact with external flash chips if you have the necessary hardware.