flashrom: Update to version 1.8.0
Commit Message
- Update from version 1.7.0 to 1.8.0
- No change in rootfile
- Changelog
1.8.0
New feature
Repeated reads
``--read-repeated[=<count>] [<file>]``: Read the flash chip multiple times
(default: 3, minimum: 3) and use majority voting to detect unstable
connections. Deduplicates read results to minimise memory usage. If a file
is given and a strict majority is found, saves the majority content to it.
Useful for diagnosing flaky SPI wiring or unreliable programmers.
Bugs fixed
Internal programmer no longer exits when ECAM is unavailable
On Intel PCH100+ systems the flash enable code opens a second libpci
accessor with ``PCI_ACCESS_ECAM``. Mapping the ECAM region requires access
to a physical range the kernel commonly reserves for a driver (PNP0C02),
which ``CONFIG_IO_STRICT_DEVMEM`` denies. libpci reports this through its
error handler, which by contract does not return and by default terminates
the process, so flashrom died with::
pcilib: Cannot map ecam region: Operation not permitted.
before probing anything, with no command line option to work around it.
Every kernel built with ``CONFIG_IO_STRICT_DEVMEM=y`` was affected, which
is the default in most distributions.
An ECAM initialisation failure is now caught and the 0xcf8/0xcfc port I/O
access is used instead. ECAM is still tried first, so machines that need
it keep using it.
See https://ticket.coreboot.org/issues/643
Programmers updates
New: fault injection for testing
``fault`` -- A fault injection programmer that wraps an existing backend
(e.g. ``dummy``) and injects deterministic, reproducible faults. Supports
bit corruption, short reads, write failures, write lies (silent no-ops),
and partial writes. Uses a seeded PRNG for reproducibility. Intended for
testing verification logic and retry mechanisms under realistic failure
conditions.
linux_mtd: ignore_read_errors parameter
Some controllers refuse to read firmware-protected ranges (e.g. Intel PCH protected range registers) and fail the
whole read. With the optional ``ignore_read_errors=yes`` parameter unreadable blocks are replaced by the erased
value (usually ``0xff``) and a warning is printed, allowing the accessible remainder of the flash to be dumped::
flashrom -p linux_mtd:dev=N,ignore_read_errors=yes -r dump.bin
Note that this suppresses every read error reported by the kernel, not only refusals caused by firmware-protected
ranges. Any block that cannot be read, for whatever reason, is replaced by the erased value, so the resulting dump
may differ from the actual flash contents.
dediprog: Support target 3 (socket)
Example to read W25R256JW with SF600::
flashrom -p dediprog:voltage=1.8V,target=3 -c W25R256JW -r dump.bin
libflashrom ===========
The error code ``ERROR_FLASHROM_PREPARE_FLASH_ACCESS`` (``-3``) is now returned
for all operations in case when ``prepare_flash_access`` failed and the
operation itself has not started.
``libflashrom.h`` updated to document the error code for:
``flashrom_flash_erase``
``flashrom_image_read``
``flashrom_image_write``
``flashrom_image_verify``
Added support
* Nova Lake SoC
* Sophos XG 230r2 board
* BY25D20/40
* FM25W128
* IS25LP032
* IS25LQ032
* MX25L3236D
* MX25LM51245G
* P25D32SH
* S25FL512S -> marked as tested
* ST M9532
* W25Q01JV
* W77{Q,T}128NW -> marked tested
* XM25RH128C
* XM25RU256C -> added WP support and mark tested
* ZB25VQ16
Special case:
ST M9532
This chip has to be used in a slightly different way than most SPI flash chips,
for two reasons:
* **No probing / auto-detection.** The M95320 has no ``RDID`` instruction and
therefore no electronic signature to read back, so flashrom cannot identify
it automatically. The chip must be selected explicitly on the command line
and forced, for example::
flashrom -p <programmer> -c M95320 --force -r backup.bin
Because the chip cannot be probed, running a plain probe (for instance while
probing every known chip) will report::
Probing for ST M95320, 4 kB: failed! flashrom has no probe function for
this flash chip.
This message is expected and simply means the chip cannot be detected on its
own; it does not indicate a hardware or connection problem. Use
``-c M95320 --force`` to talk to the chip.
* **2-byte addressing.** The M95320 uses a 16-bit (2-byte) address for its
read and program instructions instead of the usual 24-bit (3-byte) address.
Note that on this chip only reading has been verified on real hardware so far
while write and erase are implemented but untested.
New features of flashchips support
2-byte addressing
``FEATURE_ADDR_2BYTE`` marks a chip that uses a 16-bit (2-byte) address in
its read and program instructions rather than the default 24-bit (3-byte)
address. This is used by small SPI EEPROMs such as ``ST M95320`` (parts up
to 64 KiB in the M95xxx family).
When set, ``spi_prepare_address()`` emits only two address bytes.
New decoder function
New decoder function ``decode_range_spi25_bp3_to_1_16`` implements
protection range calculation for SPI chips where BP values below 3 mean no
protection and BP=3 starts at 1/16 of the chip.
Multi-die flash chips
Support is added for some of the multi-die flash chips.
Two new fields are added in the ``struct flashchip`` definition:
* ``.die_size`` - Size of a single die in kilobytes. Set for multi-die chips.
* ``.die_select`` - callback for die selection. Different vendors can use
different opcodes and methods to select active dies.
This enables future support for multi-die flash chips without affecting
existing single-die chip support.
New feature flag ``FEATURE_STATUS_PER_DIE`` supports multi-die chips which
have status register per die.
This flag need to be used together with new fields ``die_size`` and
``die_select``.
Feature currently enabled for models ``W77Q128NW`` and ``W77T128NW``.
Dropping old programmers
We made a list of old programmers that are candidates for being dropped in
v2.0.0 (Jan 2027):
* rayer_spi
* atavia
* atapromise
* nic3com
* gfxnvidia
* satasii
* nicrealtek
* nicnatsemi
* satamv
* drkaiser
* atahpt
* it8212
* developerbox_spi
The release v1.8.0 will be the last to have all of them. In the next release some of
them will be dropped.
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
lfs/flashrom | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2019 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2026 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -26,7 +26,7 @@ include Config
SUMMARY = A universal flash programming utility
-VER = 1.7.0
+VER = 1.8.0
THISAPP = flashrom-v$(VER)
DL_FILE = $(THISAPP).tar.xz
@@ -34,7 +34,7 @@ DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
PROG = flashrom
-PAK_VER = 3
+PAK_VER = 4
SUP_ARCH = x86_64
DEPS =
@@ -49,7 +49,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_BLAKE2 = 552fb17b7b79f2162dd9d31073dbc844f088d3c6a8471a11a16987515e565adce52502b9a4707752de0e02971bb032cadf079b7460881962dbeb226b9749c6ec
+$(DL_FILE)_BLAKE2 = 2c8e6554b0f81b51f82d3975e9db63340a7c9802beea10798a52834ecc48ee399de31b2afff3bf4f8b967815075974d37c14b39b3fc4ee08ab56e16826e8b62b
install : $(TARGET)
@@ -83,9 +83,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && meson setup \
- --prefix=/usr \
- --sysconfdir=/etc \
- builddir/
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ builddir/
cd $(DIR_APP) && ninja -C builddir/ $(MAKETUNING)
cd $(DIR_APP) && ninja -C builddir/ install
@rm -rf $(DIR_APP)