Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/25130 )
Change subject: Fix compilation with older MinGW versions
......................................................................
Fix compilation with older MinGW versions
The __MINGW_PRINTF_FORMAT constant has been defined back in 2012
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/77bc5d6103b5fb9f59fbddab15…
However older toolchains are still around and some user reported the
following compilation failure:
flash.h:336:1: error: '__MINGW_PRINTF_FORMAT' is an unrecognized format function type [-Werror=format=]
__attribute__((format(__MINGW_PRINTF_FORMAT, 2, 3)));
Fix this by defining the constant when it isn't already; the change does
not affect other compilers because it's guarded by "#ifdef __MINGW32__".
Setting __MINGW_PRINTF_FORMAT to gnu_printf is exactly what newer MinGW
versions do when __USE_MINGW_ANSI_STDIO is defined, which it is in
flashrom Makefile.
Change-Id: I48de3e4303b9a389c515a8ce230282d9210576fd
Tested-by: Miklos Marton <martonmiklosqdev(a)gmail.com>
Signed-off-by: Antonio Ospite <ao2(a)ao2.it>
Reviewed-on: https://review.coreboot.org/25130
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
---
M flash.h
1 file changed, 3 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
diff --git a/flash.h b/flash.h
index a80a9c2..40a7f1a 100644
--- a/flash.h
+++ b/flash.h
@@ -360,6 +360,9 @@
/* Let gcc and clang check for correct printf-style format strings. */
int print(enum flashrom_log_level level, const char *fmt, ...)
#ifdef __MINGW32__
+# ifndef __MINGW_PRINTF_FORMAT
+# define __MINGW_PRINTF_FORMAT gnu_printf
+# endif
__attribute__((format(__MINGW_PRINTF_FORMAT, 2, 3)));
#else
__attribute__((format(printf, 2, 3)));
--
To view, visit https://review.coreboot.org/25130
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I48de3e4303b9a389c515a8ce230282d9210576fd
Gerrit-Change-Number: 25130
Gerrit-PatchSet: 2
Gerrit-Owner: Antonio Ospite <ao2(a)ao2.it>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/25150 )
Change subject: linux_spi: Reduce maximum read chunksize
......................................................................
linux_spi: Reduce maximum read chunksize
It turned out that older kernels use a single buffer for combined
input and output data. So we have to account for the read command +
max 3 address bytes.
Change-Id: Ide50db38af1004fde09a70b15938e77f5e1285ac
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
Reviewed-on: https://review.coreboot.org/25150
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: David Hendricks <david.hendricks(a)gmail.com>
---
M linux_spi.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
build bot (Jenkins): Verified
David Hendricks: Looks good to me, approved
diff --git a/linux_spi.c b/linux_spi.c
index e51fbc4..d276402 100644
--- a/linux_spi.c
+++ b/linux_spi.c
@@ -183,7 +183,7 @@
unsigned int start, unsigned int len)
{
return spi_read_chunked(flash, buf, start, len,
- (unsigned int)getpagesize());
+ (unsigned int)getpagesize() - 4);
}
static int linux_spi_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
--
To view, visit https://review.coreboot.org/25150
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: 1.0.x
Gerrit-MessageType: merged
Gerrit-Change-Id: Ide50db38af1004fde09a70b15938e77f5e1285ac
Gerrit-Change-Number: 25150
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/25149 )
Change subject: linux_spi: Reduce maximum read chunksize
......................................................................
linux_spi: Reduce maximum read chunksize
It turned out that older kernels use a single buffer of `bufsiz` bytes
for combined input and output data. So we have to account for the read
command + max 4 address bytes.
Change-Id: Ide50db38af1004fde09a70b15938e77f5e1285ac
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
Tested-by: Julian von Mendel <git(a)jinvent.de>
Reviewed-on: https://review.coreboot.org/25149
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Julian von Mendel <git(a)jinvent.de>
Reviewed-by: David Hendricks <david.hendricks(a)gmail.com>
---
M linux_spi.c
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
build bot (Jenkins): Verified
David Hendricks: Looks good to me, approved
Julian von Mendel: Looks good to me, but someone else must approve
diff --git a/linux_spi.c b/linux_spi.c
index 1d3605a..714e612 100644
--- a/linux_spi.c
+++ b/linux_spi.c
@@ -221,8 +221,9 @@
static int linux_spi_read(struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len)
{
- /* Read buffer is fully utilized for data. */
- return spi_read_chunked(flash, buf, start, len, max_kernel_buf_size);
+ /* Older kernels use a single buffer for combined input and output
+ data. So account for longest possible command + address, too. */
+ return spi_read_chunked(flash, buf, start, len, max_kernel_buf_size - 5);
}
static int linux_spi_write_256(struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len)
--
To view, visit https://review.coreboot.org/25149
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ide50db38af1004fde09a70b15938e77f5e1285ac
Gerrit-Change-Number: 25149
Gerrit-PatchSet: 3
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Julian von Mendel <git(a)jinvent.de>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Hello Julian von Mendel, David Hendricks, Paul Menzel, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/25149
to look at the new patch set (#2).
Change subject: linux_spi: Reduce maximum read chunksize
......................................................................
linux_spi: Reduce maximum read chunksize
It turned out that older kernels use a single buffer of `bufsiz` bytes
for combined input and output data. So we have to account for the read
command + max 4 address bytes.
Change-Id: Ide50db38af1004fde09a70b15938e77f5e1285ac
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
Tested-by: Julian von Mendel <git(a)jinvent.de>
---
M linux_spi.c
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/49/25149/2
--
To view, visit https://review.coreboot.org/25149
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ide50db38af1004fde09a70b15938e77f5e1285ac
Gerrit-Change-Number: 25149
Gerrit-PatchSet: 2
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Julian von Mendel <git(a)jinvent.de>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
David Hendricks has posted comments on this change. ( https://review.coreboot.org/25127 )
Change subject: CONFIG_DEFAULT setting
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Looks good, just need to fix up the commit message.
https://review.coreboot.org/#/c/25127/1//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/25127/1//COMMIT_MSG@13
PS1, Line 13: Usage example:
: This will disable all programmers except dummy and nic3com.
Where is the example?
--
To view, visit https://review.coreboot.org/25127
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iccbe614c8dbee750ef88f7a53f70a23f5e5ab079
Gerrit-Change-Number: 25127
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 18 Mar 2018 22:53:02 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: Yes
David Hendricks has posted comments on this change. ( https://review.coreboot.org/25260 )
Change subject: platform: Add riscv to known platforms
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/25260
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I724a99e2493fcbf71c2fc2d9f6a1ad607c737087
Gerrit-Change-Number: 25260
Gerrit-PatchSet: 1
Gerrit-Owner: Khem Raj
Gerrit-Reviewer: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 18 Mar 2018 22:41:19 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes