Problem:
Found ch341a flashing sw have virus, so move to Ubuntu 16.04 flashing.
Env:
apt-get install flashrom
gd25Q64
ch341a flasher
Steps:
1. help info
sudo flashrom -p ch341a_spi --help
flashrom v0.9.9-rc1-r1942 on Linux 4.4.0-87-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org
Please note that the command line interface for flashrom has changed between
0.9.5 and 0.9.6 and will change again before flashrom 1.0.
Usage: flashrom [-h|-R|-L|-p <programmername>[:<parameters>] [-c <chipname>]
[-E|(-r|-w|-v) <file>] [-l <layoutfile> [-i <imagename>]...] [-n] [-f]]
[-V[V[V]]] [-o <logfile>]
-h | --help print this help text
-R | --version print version (release)
-r | --read <file> read flash and save to <file>
-w | --write <file> write <file> to flash
-v | --verify <file> verify flash against <file>
-E | --erase erase flash memory
-V | --verbose more verbose output
-c | --chip <chipname> probe only for specified flash chip
-f | --force force specific operations (see man page)
-n | --noverify don't auto-verify
-l | --layout <layoutfile> read ROM layout from <layoutfile>
-i | --image <name> only flash image <name> from flash layout
-o | --output <logfile> log output to <logfile>
-L | --list-supported print supported devices
-p | --programmer <name>[:<param>] specify the programmer device. One of
internal, dummy, nic3com, nicrealtek, gfxnvidia, drkaiser, satasii, atavia,
it8212, serprog, buspirate_spi, dediprog, rayer_spi, pony_spi, nicintel,
nicintel_spi, nicintel_eeprom, ogp_spi, satamv, linux_spi, pickit2_spi,
ch341a_spi.
2. device detect
sudo flashrom -p ch341a_spi
flashrom v0.9.9-rc1-r1942 on Linux 4.4.0-87-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org
Calibrating delay loop... OK.
Found GigaDevice flash chip "GD25Q64(B)" (8192 kB, SPI) on ch341a_spi.
3. nor wirte
sudo flashrom -p ch341a_spi -w FULL_FIRM_8M.bin
flashrom v0.9.9-rc1-r1942 on Linux 4.4.0-87-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org
Calibrating delay loop... OK.
Found GigaDevice flash chip "GD25Q64(B)" (8192 kB, SPI) on ch341a_spi.
Reading old flash chip contents... done.
Erasing and writing flash chip... Erase/write done.
Verifying flash... VERIFIED.
4. nor read
sudo flashrom -p ch341a_spi -r temp.bin
flashrom v0.9.9-rc1-r1942 on Linux 4.4.0-87-generic (x86_64)
flashrom is free software, get the source code at https://flashrom.org
Calibrating delay loop... OK.
Found GigaDevice flash chip "GD25Q64(B)" (8192 kB, SPI) on ch341a_spi.
Reading flash... done.