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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • 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. How to use “yum downloadonly” to download a package without installing it
  2. Difference between absolute and relative paths in Linux
  3. What is ioremap()
  4. pacstrap: command not found
  5. physlock: command not found
  6. imagemagick for image optimization
  7. mke2fs: command not found
  8. bq: The bq command-line tool is a Python-based command-line tool for BigQuery
  9. arp-scan: Send ARP packets to hosts (specified as IP addresses or hostnames) to scan the local network
  10. CentOS / RHEL : Beginners guide to cron

You May Also Like

Primary Sidebar

Recent Posts

  • ctags: Generates an index (or tag) file of language objects found in source files for many popular programming languages
  • csvtool: Utility to filter and extract data from CSV formatted sources
  • csvstat: Print descriptive statistics for all columns in a CSV file
  • csvsql: Generate SQL statements for a CSV file or execute those statements directly on a database

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright