Linux command
flashrom 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Probe
flashrom -p [programmer]
Read
flashrom -p [programmer] -r [path/to/backup.bin]
Write
flashrom -p [programmer] -w [path/to/firmware.bin]
Verify
flashrom -p [programmer] -v [path/to/file.bin]
Erase
flashrom -p [programmer] -E
Example
flashrom -p linux_spi:dev=/dev/spidev0.0
Example
flashrom -p [programmer] -l [layout.txt] -i [region_name] -w [file.bin]
说明
Flashrom is a utility for identifying, reading, writing, verifying, and erasing flash chips. It supports BIOS/EFI firmware flashing directly on the motherboard (in-system programming) as well as external programmers connected via USB, SPI, or parallel port. The tool supports over 500 flash chips and 40+ programmer types including internal motherboard access, USB devices (CH341A, Dediprog), SPI programmers (Raspberry Pi, Bus Pirate), and network card-based programmers.
参数
- -p, --programmer _name:params_
- Specify programmer device (required for chip access)
- -r, --read _file_
- Read flash ROM contents and save to file
- -w, --write _file_
- Write file contents to flash ROM
- -v, --verify _file_
- Verify flash ROM contents against file
- -E, --erase
- Erase the entire flash chip
- -c, --chip _name_
- Probe only for a specific flash chip model
- -l, --layout _file_
- Read ROM layout from file for partial flashing
- -i, --include _region_
- Only read, write, or verify specified region
- -f, --force
- Override safety checks (use with caution)
- -n, --noverify
- Skip automatic verification after writing
- --flash-name
- Display detected flash chip name
- --flash-size
- Display detected flash chip size
FAQ
What is the flashrom command used for?
Flashrom is a utility for identifying, reading, writing, verifying, and erasing flash chips. It supports BIOS/EFI firmware flashing directly on the motherboard (in-system programming) as well as external programmers connected via USB, SPI, or parallel port. The tool supports over 500 flash chips and 40+ programmer types including internal motherboard access, USB devices (CH341A, Dediprog), SPI programmers (Raspberry Pi, Bus Pirate), and network card-based programmers.
How do I run a basic flashrom example?
Run `flashrom -p [programmer]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -p, --programmer _name:params_ do in flashrom?
Specify programmer device (required for chip access)