mirror of
https://review.coreboot.org/flashrom.git
synced 2025-10-26 19:10:13 +01:00
Original progress reporting implemented in CB:49643 and it has some
issues, for example:
size_t start_address = start;
size_t end_address = len - start;
End address is anything but length minus start address.
update_progress(flash,
FLASHROM_PROGRESS_READ,
/*current*/ start - start_address + to_read,
/*total*/ end_address);
Total should just be length if that's how current value is computed.
---
libflashrom needs to know total size ahead of time.
That's init_progress() and changed update_progress().
It also needs to store the last current value to be able to update it.
That's stage_progress in flashrom_flashctx.
Measuring accurately amount of data which will be read/erased/written
isn't easy because things can be skipped as optimizations. The next
patch in the chain aims to address this, there are TODO/FIXME
comments there.
---
CLI shares terminal with the rest of the code and has to maintain more
state to handle that reasonably well.
Similar to CB:64668, an effort is made to keep the progress on a
single line. Non-progress output is kept track of to know when
moving to a new line cannot be avoided.
---
A script to test the CLI:
\#!/bin/bash
t=${1:-rewW}
shift
if [[ $t =~ r ]]; then
echo ">>> READ"
./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz -r dump.rom --progress "$@"
echo
fi
if [[ $t =~ e ]]; then
echo ">>> ERASE"
./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz -E --progress "$@"
echo
fi
if [[ $t =~ w ]]; then
echo ">>> WRITE (without erase)"
dd if=/dev/zero of=zero.rom bs=1M count=16 2> /dev/null
./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz -w zero.rom --progress "$@"
echo
fi
if [[ $t =~ W ]]; then
echo ">>> WRITE (with erase)"
dd if=/dev/zero of=zero.rom bs=1M count=16 2> /dev/null
dd if=/dev/random of=random.rom bs=1M count=16 2> /dev/null
./flashrom -p dummy:emulate=W25Q128FV,freq=64mhz,image=random.rom -w zero.rom --progress "$@"
echo
fi
Co-developed-by: Anastasia Klimchuk <aklm@flashrom.org>
Co-developed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: If1e40fc97f443c4f0c0501cef11cff1f3f84c051
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/84102
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
43 lines
1.5 KiB
ReStructuredText
43 lines
1.5 KiB
ReStructuredText
===============================
|
|
Recent development (unreleased)
|
|
===============================
|
|
|
|
This document describes the major changes that are expected to be included in
|
|
the next release of flashrom and which are currently only available by source
|
|
code checkout (see :doc:`../dev_guide/building_from_source`). These changes
|
|
may be further revised before the next release.
|
|
|
|
Known issues
|
|
============
|
|
|
|
AMD-based PCs with FCH are unable to read flash contents for internal (BIOS
|
|
flash) chips larger than 16 MB, and attempting to do so may crash the system.
|
|
Systems with AMD "Promontory" IO extenders (mostly "Zen" desktop platforms) are
|
|
not currently supported.
|
|
|
|
https://ticket.coreboot.org/issues/370
|
|
|
|
Build only supported with Meson
|
|
===============================
|
|
|
|
As documented in the :doc:`v1.4 release notes <v_1_4>`, support for building
|
|
flashrom with make has been removed; all Makefiles have been deleted. Meson is
|
|
now the only supported tool for building flashrom from source.
|
|
|
|
New Feature
|
|
===========
|
|
Libpci 3.13.0 and onwards support ECAM to access pci registers. Flashrom will
|
|
be moved to ECAM from IO port 0xcf8/0xcfc if the libpci version is >= 3.13.0.
|
|
The ECAM has been supported for a very long time, most platforms should support
|
|
it. For those platforms don't support ECAM, libpci will terminate the process by
|
|
exit.
|
|
|
|
Progress display
|
|
================
|
|
|
|
Progress display feature is now working for all operations: read, erase, write.
|
|
|
|
Chipset support
|
|
===============
|
|
Added Raptor Point PCH support.
|