From Fedora Project Wiki
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.
How to test
- Open a terminal window.
- Identify Flash Chips
- Use
flashrom
to identify the flash chips on your system:sudo flashrom -p internal
- Read Flash
- 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.
- Verify Firmware (Optional)
- Verify the content of a chip against a given file:
sudo flashrom -p internal -v backup.bin
- Write Flash (High Risk, Optional)
- 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
- The
flashrom
package should install without errors. - The
flashrom
should correctly identify the flash chips on the system. - The read operation should complete without errors, and the
backup.bin
file should be created. - The verify operation (if executed) should confirm that the content of the chip matches the given file.
- 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.