1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-26 22:52:34 +02:00

22 Commits

Author SHA1 Message Date
Simon Arlott
81c21880a3 spidriver: Add support for the Excamera Labs SPIDriver programmer
This is a SPI hardware interface with a display (https://spidriver.com/),
connected as an FT230X USB serial device at a fixed baud rate of 460800.

Firmware: https://github.com/jamesbowman/spidriver
Protocol: https://github.com/jamesbowman/spidriver/blob/master/protocol.md

Most of the implementation is copied from the Bus Pirate programmer.

Tested with a SPIDriver v2 by reading FM25Q128A flash memory on Linux.

Change-Id: I07b23c1146d4ad3606b54a1e8dc8030cf4ebf57b
Signed-off-by: Simon Arlott <flashrom@octiron.net>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/86411
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2025-03-26 21:56:00 +00:00
Anastasia Klimchuk
73666de3f2 Enable authors list generation on Jenkins
Change-Id: Ia018ce4addb65273fe022ed1f1e9d38420c0e469
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/86678
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-03-06 02:35:40 +00:00
Anastasia Klimchuk
38ef3513cf build script: Add rpmc option to always be enabled on Jenkins
This needs libcrypto dependency to be present on CI container.

Change-Id: Ib736386a34d184f696a47272957b665c8fe26c06
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/85097
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2024-11-14 05:27:28 +00:00
Peter Marheine
133b112d09 Remove the Makefile
As was described in the version 1.4 release notes, this deletes the
Makefile and supporting elements leaving Meson as the only supported
buildsystem.

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: Ib3cf22cf636ef9b70527b734ffa34aead2a74edd
Reviewed-on: https://review.coreboot.org/c/flashrom/+/83673
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2024-08-12 00:09:12 +00:00
Anastasia Klimchuk
124b6eaf6b meson: Update CI script to enforce building man pages and docs
`test_build.sh` is used by Jenkins, therefore it should build
everything. Docker container for Jenkins is expected to have all
the dependencies installed, and if some of them are missing, script
should fail.

Recently we had a situation when docker image was missing sphinx
and flashrom Jenkins was silently skipping building man-pages and
documentation. This patch prevents this happening again, because
building man pages and docs will be enforced.

Change-Id: Ib89abddad27d1168cf0a621cf4bdb9f541266165
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/81665
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anton Samsonov <avscomputing@gmail.com>
2024-04-10 03:01:06 +00:00
Nicholas Chin
0facf12ca4 ch347_spi: Add initial support for the WCH CH347
Add support for the WCH CH347, a high-speed USB to bus converter
supporting multiple protocols interfaces including SPI. Currently only
mode 1 (vendor defined communication interface) is supported, mode 2
(USB HID communication interface) support will be added later. The code
is currently hard coded to use CS1 and a SPI clock of 15 MHz, though
there are 2 CS lines and 6 other GPIO lines available, as well as a
configurable clock divisor for up to 60MHz operation. Support for these
will be exposed through programmer parameters in later commits.

This currently uses the synchronous libusb API. Performance seems to be
alright so far, if it becomes an issue I may switch to the asynchronous
API.

Tested with a MX25L1606E flash chip

Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Change-Id: I31b86c41076cc45d4a416a73fa1131350fb745ba
Reviewed-on: https://review.coreboot.org/c/flashrom/+/70573
Reviewed-by: Thomas Heijligen <src@posteo.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-02-27 10:13:01 +00:00
Alex Badea
83b051a9b4 asm106x: add programmer for ASM106x SATA controllers
The ASMedia ASM106x series is a PCIe-SATA controller chip.  It supports
an attached SPI flash chip that can contain configuration and PCI option
ROM.  The interface is a simple shifter accessed via PCI config space,
up to 4 bytes at a time.  Add a programmer driver for it.

Tested on a G536PCE1061V11 IO-PCE1061-V1.1 PCIe card, and
a MPCE2ST-A01 VER006S mini-PCIe card, both with chips marked ASM1061,
both enumerate as:

	01:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 02) (prog-if 01 [AHCI 1.0])
	        Subsystem: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:1060]

Change-Id: I591b117be911bdb8249247c20530c1cf70f6e70d
Signed-off-by: Alex Badea <vamposdecampos@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/73037
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
2023-02-27 09:47:44 +00:00
Felix Singer
48e058983d test_build.sh: Switch to meson setup <dir>
Running the setup command as `meson [options]` instead of
`meson setup [options]` is ambiguous and deprecated.

Change-Id: I6e84997f910928d3973a4e5826a2d4196bdb2916
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/70242
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
2022-12-06 15:30:12 +00:00
Felix Singer
748575abb2 util/lint: Introduce linter for git sign-off-by line
For compliance and to check if the commit message matches the
development guidelines, add a linter checking for the sign-off-by line
in the commit message. Also, hook it up to the test_build.sh script
which is used for CI builds.

These scripts were copied from the coreboot repository and were adjusted
so that they work for flashrom.

Change-Id: I03f1827803f8492d60a0a44174d5822c2265bfcb
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/70079
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2022-12-02 00:39:45 +00:00
Jean THOMAS
001c87d901 dirtyjtag: Add DirtyJTAG programmer
Add a new programmer driver for the DirtyJTAG project (a USB-JTAG
firmware for STM32 MCUs).

Successfully tested with DirtyJTAG 1.4 running on an Olimex STM32-H103
development board and a SST25VF020B SPI flash chip.

Change-Id: Ic43e9a014ed7d04e429e73b30c9dcfdde1a78913
Signed-off-by: Jean THOMAS <virgule@jeanthomas.me>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67878
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2022-10-15 18:17:38 +00:00
Felix Singer
5f326e43d2 test_build.sh: Use multiple cores if Make is used
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: Ia67e9202e49f1b4bc3301399a8ec741ac01c3ce0
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67244
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-09-23 20:42:12 +00:00
Felix Singer
46f94ba671 test_build.sh: Build all programmers individually using Meson
The test build script already builds each programmer individually when
Make is used. To check if the Meson build system is working properly,
build each programmer individually and in addition to that build-test
the programmer groups individually.

Builds are done in the directory `out`, while for each build a new
subdirectory with the name of the programmer option is created.

Also, return when scan-build is used and the group `all` isn't selected,
since it's not needed to run scan-build in combination with the other
options.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I703127a2dc31d316d3d1c842b5bcb0b22c39c0d4
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66475
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
2022-09-23 20:40:58 +00:00
Felix Singer
2307053d1d test_build.sh: Delete old build dir when Meson is used
Make sure to start from a clean environment when Meson is used. Also,
rename the variable "builddir" to "build_dir" for better readability and
to avoid typos.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I050ed916685728cbed9c10601a6bcad6d59a4eda
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67541
Reviewed-by: Thomas Heijligen <src@posteo.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-23 16:18:43 +00:00
Patrick Georgi
b867765f2d test_build.sh: Improve robustness when dealing with empty $CC
Add quotes so that = knows what to compare, otherwise the shell
complains:

    ./test_build.sh: 16: [: =: unexpected operator

Change-Id: Ia289b31291949f5cbc11484b8f1a7cb7a49bd2bb
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67740
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-09-21 14:51:17 +00:00
Patrick Georgi
b7c4024996 test_build.sh: Identify runs for Coverity Scan
For Coverity Scan[0] the same build rules apply as for scan-build.

[0] https://scan.coverity.com/projects/flashrom

Change-Id: I75147799b1c3213866e343a0384c94d0a1f5c249
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67739
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2022-09-21 14:51:07 +00:00
Felix Singer
c8b23a0902 test_build.sh: Enforce tests to be enabled
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I00c23a17926ed112522b083f8594596d051cf9f8
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67243
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-09-08 06:27:27 +00:00
Felix Singer
db026ea281 test_build.sh: Build all programmers individually using Make
While testing CB:63724, which reworks the Meson build system, it showed
that some programmers have dependency issues, which were invisible since
test_build.sh builds flashrom with all programmers enabled and thus all
sources are included. Building flashrom with each programmer
individually made these issues visible.

However, as commit 877b7741fcf9 and commit b6a439e45ef2 show, the Make
build system also had some similar issues, which were invisible for the
same reason.

Thus, in addition to building all programmers at once using the Make
build system, build each programmer individually.

Also, when clang analyzer is used, it's not needed to run it on each
programmer individually. Just return after flashrom was built with all
programmers enabled in this case.

An equivalent patch for the Meson build system is made separately.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I3bacb3ba9c6708f1e7ef5a111290d0ea3af36f1d
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66094
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2022-08-09 21:28:22 +00:00
Felix Singer
caed9f0d2e test_build.sh: Move commands into functions
In preparation to follow up commits, move the commands into functions
so that it's clear what belongs to what.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: Ia2dc6f1d4d53b4d6a1255ef31c66799a484302fc
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66093
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Thomas Heijligen <src@posteo.de>
2022-08-08 20:37:53 +00:00
Martin Roth
9ae0463fee test_build.sh: Allow WARNERROR to be overridden
Currently, WARNERROR is hardcoded to 'yes' which is what we want most of
the time, but there are cases (such as when building with -fanalyzer)
that we don't want it enabled, so we see the entire output of the build,
and it doesn't halt at the first error.  Removing the WARNERROR line
from the script allows the variable to be overridden from an environment
variable.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Iea931e57f2a6992762566dc3dbaae8bb8df5b226
Reviewed-on: https://review.coreboot.org/c/flashrom/+/62745
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-05-31 19:40:25 +00:00
Thomas Heijligen
485c335a34 test_build.sh: use -C option of ninja to specify the build directory
Change-Id: I04a0fdf9b5126b9f4006e8229c3926ceb1013456
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/51979
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-04-14 15:54:11 +00:00
Thomas Heijligen
ada10bb43d test_build.sh: use sh from env
Change-Id: I3897b8d980425ecbb89b238d4a766f628cf9d3e6
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/51978
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-04-14 15:53:58 +00:00
Patrick Georgi
07edbb9af4 test_build.sh: Move build test procedure to repository
Instead of hard coding the test procedure on qa.coreboot.org, allow
running a script in the repo instead. The server is already adapted
to do that, so once there's a test_build.sh file in the toplevel
directory, it's run in place of the default operation.

The content of this change mirrors the default operation exactly so
should serve as a good starting point.

The script is executed in an encapsulate[0] context with the workspace,
/tmp and $HOME/.ccache writable, everything else read-only and
network disabled.

It should return 0 on success, anything else on failure, as is normal
for UNIX processes.

[0] https://review.coreboot.org/cgit/encapsulate.git

Change-Id: I37a8e925d1b283c3b8f87cb3d0f1ed8920f2cf95
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/46894
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2020-11-03 06:46:17 +00:00