• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

flashrom Command Examples in Linux

by Deepika

Flashrom is a free and open-source command-line tool for reading, writing, verifying and erasing flash chips. It is primarily used for firmware updates and BIOS/UEFI replacement on computers and other electronic devices. Flashrom is a low-level tool that can communicate directly with the flash chip on a device’s motherboard, allowing it to read and write the firmware directly. This is useful for updating firmware on devices that do not have a firmware update utility built-in, or for creating backups of firmware before making changes.

Flashrom supports a wide variety of flash chips and is compatible with many different types of devices, including laptops, desktops, servers, and embedded systems. It also support different protocols like LPC, FWH, parallel, and SPI. Flashrom has the ability to detect the type of flash chip in a device and automatically select the correct programmer to use. It also has built-in support for hardware-based flash programmers, which allows it to write to the flash chip at a very high speed, reducing the chance of power interruption during the process. It also allows you to verify and compare the contents of the flash chip with a file, and it can also erase the contents of the flash chip.

flashrom Command Examples

1. Probe the chip, ensuring the wiring is correct:

# flashrom --programmer programmer

2. Read flash and save it to a file:

# flashrom -p programmer --read path/to/file

3. Write a file to the flash:

# flashrom -p programmer --write path/to/file

4. Verify the flash against a file:

# flashrom -p programmer --verify path/to/file

5. Probe the chip using Raspberry Pi:

# flashrom -p linux_spi:dev=/dev/spidev0.0

Filed Under: Linux

Some more articles you might also be interested in …

  1. license Command Examples
  2. keep-header Command Examples
  3. What is the purpose of .bash_profile file under User Home Directory In Linux
  4. mkfs.vfat: command not found
  5. How to resize (extend) a partition-based file system in Linux
  6. fprintd-enroll Command Examples in Linux
  7. How to uninstall Ansible software package in Ubuntu
  8. autorandr: command not found
  9. Understanding the /proc/mounts, /etc/mtab and /proc/partitions files
  10. How to Start, Stop, Restart, Check Status IIS Service by Command Line

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright