Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing output while doing flash write on apu2 #41

Closed
pietrushnic opened this issue Jun 7, 2024 · 5 comments
Closed

Confusing output while doing flash write on apu2 #41

pietrushnic opened this issue Jun 7, 2024 · 5 comments
Assignees
Labels
good first issue Good for newcomers
Milestone

Comments

@pietrushnic
Copy link
Contributor

% osfv_cli rte --rte_ip 192.168.10.172 flash write --rom apu2_v24.05.00.01.rom
DUT model retrieved from snipeit: APU2
Writing apu2_v24.05.00.01.rom to flash...
Executing command: flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=16000 -c W25Q64JV-.Q -w /tmp/write.rom
flashrom v1.3.0 on Linux 5.4.69 (armv7l)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).

No EEPROM/flash device found.
Note: flashrom can never write if the flash chip isn't found automatically.


Flash written
@SergiiDmytruk
Copy link
Member

This looks like a duplicate of #15.

@pietrushnic
Copy link
Contributor Author

This is a different problem. What I'm reporting here is not that it didn't flash but that it reports the confusing status Flash written despite the fact that it was not written because of bug #15. Of course, the correct implementation of #15 could solve this issue, but it does not guarantee it. We essentially should test against output for the cases for both successful and unsuccessful outcomes of the tool while flashing.

@macpijan macpijan added this to the v0.4.3 milestone Jun 10, 2024
@macpijan macpijan added the good first issue Good for newcomers label Jun 10, 2024
@macpijan
Copy link
Contributor

macpijan commented Jun 10, 2024

We always print it no matter what the result was: https://github.com/Dasharo/osfv-scripts/blob/main/osfv_cli/osfv_cli/osfv_cli.py#L253

Should be an easy fix to pass (return) flashing result from the library to the CLI.

@JanPrusinowski
Copy link
Contributor

JanPrusinowski commented Jun 20, 2024

This issue still occurs when flash device is not found:

osfv_cli rte --rte_ip 192.168.10.110 flash write --rom /home/janprusinowski/Downloads/protectli_vp66xx_v0.9.0-rc5.rom
DUT model retrieved from snipeit: VP6670
Writing /home/janprusinowski/Downloads/protectli_vp66xx_v0.9.0-rc5.rom to flash...
Executing command: flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=16000 -c MX25L12833F/MX25L12835F/MX25L12845E/MX25L12865E/MX25L12873F -w /tmp/write.rom
flashrom v1.3.0 on Linux 5.4.69 (armv7l)
flashrom is free software, get the source code at https://flashrom.org


Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).

No EEPROM/flash device found.
Note: flashrom can never write if the flash chip isn't found automatically.


Flash written

@SebastianCzapla
Copy link
Contributor

SebastianCzapla commented Sep 5, 2024

#62

Added PR which makes the script respect flashrom's return code.
Here's an example of failure when provided with invalid ROM size.

(venv) sczapla in ~/Dasharo/osfv-scripts/osfv_cli on fix_flashing_messages λ osfv_cli rte --rte_ip 192.168.10.225 flash write --rom /home/sczapla/Dasharo/coreboot/xad
DUT model retrieved from snipeit: Optiplex 7010
Using rte command is invasive action, checking first if the device is not used...
Asset 105 is already checked out by you
Writing /home/sczapla/Dasharo/coreboot/xad to flash...
Executing command: flashrom -p linux_spi:dev=/dev/spidev1.0,spispeed=16000 -c MX25L3205D/MX25L3208D -w /tmp/write.rom
flashrom v1.3.0 on Linux 5.4.69 (armv7l)
flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 1, resolution: 1ns).
Found Macronix flash chip "MX25L3205D/MX25L3208D" (4096 kB, SPI) on linux_spi.
===
This flash part has status UNTESTED for operations: WP
The test status of this chip may have been updated in the latest development
version of flashrom. If you are running the latest development version,
please email a report to [email protected] if any of the above operations
work correctly for you with this flash chip. Please include the flashrom log
file for all operations you tested (see the man page for details), and mention
which mainboard or programmer you tested in the subject line.
Thanks for your help!
Error: Image size (8388608 B) doesn't match the expected size (4194304 B)!
Flash write failed with code 1
Since the asset 105 has been checkout manually by you prior running this script, it will NOT be checked in automatically. Please return the device when work is finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants