flashrom
flashrom identifies, reads, writes, verifies, and erases BIOS/ROM/flash chips. It supports in-system flashing on mainboards and external devices like network cards and programmers.
Description
flashrom is a utility for handling flash chips commonly used in BIOS/EFI/coreboot/firmware/optionROM images. It enables users to flash proprietary BIOS images or open-source alternatives like coreboot directly on supported mainboards. The tool also reads existing BIOS/firmware from chips for backup or analysis.
Common use cases include updating or replacing firmware on motherboards, network cards (NICs), SATA controllers, and graphics cards. It supports external flashing via various hardware programmers, making it versatile for hardware hacking and firmware reverse engineering.
flashrom detects a wide range of chip packages such as DIP32, PLCC32, SO8, and BGA using protocols like LPC, FWH, parallel flash, or SPI. This broad compatibility positions it as an essential tool for low-level system modification and recovery.
How It Works
flashrom probes for supported flash chips using specified programmers like internal (mainboard), external USB devices (ft2232_spi, ch341a_spi), or serial adapters (serprog). It communicates via protocols including SPI, LPC, FWH, and parallel flash to read chip contents, erase sectors, program new data, and verify integrity. Programmers handle hardware-specific access, such as /dev/spidev for Linux SPI or DDC for displays.
Installation
sudo apt install flashromFlags
Examples
flashrom -hflashrom -r backup.romflashrom -w newbios.romflashrom -v newbios.romflashrom -Eflashrom -p internalflashrom -p ft2232_spiflashrom