From patchwork Tue Sep 22 13:29:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 10261 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4hq1D93sHnz3wjb for ; Tue, 22 Sep 2026 13:29:45 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [IPv6:2001:678:b28::201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "YE1" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4hq1D86J6Dz6mf for ; Tue, 22 Sep 2026 13:29:44 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4hq1D85TLGz2xfT for ; Tue, 22 Sep 2026 13:29:44 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4hq1D60dkCz2xN8 for ; Tue, 22 Sep 2026 13:29:42 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4hq1D40Hvnz1TJ; Tue, 22 Sep 2026 13:29:39 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1790083780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GGne7xhLdgKn1lKiV+F60jXd6J17SDwdiG1OL9eSmZY=; b=gn5C0OgP6kuMLcU2SK/6ryM4iwvLthQWJy5DhbQ+Ubud5YsegBCxwvi8jrp9iKvBSA8OKa pjBoM/uZqdZPVSBg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1790083780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=GGne7xhLdgKn1lKiV+F60jXd6J17SDwdiG1OL9eSmZY=; b=HwrfbDEAG08qT/GD7nwh3+Ot9mEzhYOf2926P5YMl5a2dKtgQdL52Lt/iDtnOOiDEfAkCM UXRKrdBcK03eGV7LD6lgnesHEG4sJuUfCnwYOfHWy4w/v6JmIw83YIDs7IceRmfAsRR+sL uKh4ZW3PYNsmOw6dKzSH0cBud5cdsTBysAUOuJ5DZ/zSJK/7cH3cH23zhh1n7ydl+a3GWE Hjpb6CpJClZx1eRJfOUz6YGBcBkpNnc8XknQZ623blOW1/wvrbsfZTlX/IgOru2tnW/gE4 VrUyisOwBhigi7zO0IU3YJ4NTQol9fcYACnBCd76SekdYrlR9sLHE6UmaFBd+w== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH] flashrom: Update to version 1.8.0 Date: Tue, 22 Sep 2026 15:29:36 +0200 Message-ID: <20260922132936.3444466-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 - Update from version 1.7.0 to 1.8.0 - No change in rootfile - Changelog 1.8.0 New feature Repeated reads ``--read-repeated[=] []``: 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 -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 --- lfs/flashrom | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lfs/flashrom b/lfs/flashrom index 123161f8a..cb749f2b0 100644 --- a/lfs/flashrom +++ b/lfs/flashrom @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2019 IPFire Team # +# Copyright (C) 2007-2026 IPFire Team # # # # 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)