Stefan Tauner has uploaded this change for review. ( https://review.coreboot.org/21919
Change subject: Fix serprog on FreeBSD
......................................................................
Fix serprog on FreeBSD
Using serprog on FreeBSD to read an SPI flash (MX25L6406) via an
Arduino Nano V3 with flashrom hangs after 5 seconds while reading. The
problem is that kernel method "ttydisc_rint" ignores some bytes. It
happens due to enabled IEXTEN local flag of termios. TTY cuts a few
bytes, Arduino reads 11264 bytes, but flashrom gets only 11244 bytes
and waits for the remaining 20 bytes.
The fix is simple: turn off the IEXTEN local flag.
Tested on Arduino Nano V3 + FreeBSD 12-CURRENT.
Change-Id: I7aa6a283d523c544d9b8923cd4c622bf08c0fb3f
Signed-off-by: Michael Zhilin <mizhka(a)gmail.com>
---
M serial.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/19/21919/1
diff --git a/serial.c b/serial.c
index a64a51d..1b14fb5 100644
--- a/serial.c
+++ b/serial.c
@@ -203,7 +203,7 @@
}
wanted.c_cflag &= ~(PARENB | CSTOPB | CSIZE | CRTSCTS);
wanted.c_cflag |= (CS8 | CLOCAL | CREAD);
- wanted.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
+ wanted.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG | IEXTEN);
wanted.c_iflag &= ~(IXON | IXOFF | IXANY | ICRNL | IGNCR | INLCR);
wanted.c_oflag &= ~OPOST;
if (tcsetattr(fd, TCSANOW, &wanted) != 0) {
--
To view, visit https://review.coreboot.org/21919
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7aa6a283d523c544d9b8923cd4c622bf08c0fb3f
Gerrit-Change-Number: 21919
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Tauner <stefan.tauner(a)gmx.at>
Stefan Tauner has posted comments on this change. ( https://review.coreboot.org/21886 )
Change subject: squash! Convert flashrom to git
......................................................................
Patch Set 1:
(1 comment)
> (1 comment)
>
> I'll take it as is, do we also want it on staging? As it wouldn't
> affect patch compatibility, I don't care.
Doesn't make that much sense IMHO. I just did not know how to publish it better than this.
I'd welcome it if I could have some say on the order of stable commits so that we can share the commits between 0.9.9.1 and the next release. Your proposed order puts some of the fixes rather late.
https://review.coreboot.org/#/c/21886/1//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/21886/1//COMMIT_MSG@11
PS1, Line 11: Convert flashrom to git
> > and I thought I did already... :) No, subject of sane length can
> > really cover all the topics specifically IMHO.
>
> Yep, it's hard when you don't focus your commits on specific
> changes.
You say that as if it would be something negative. And that's were we won't agree. If the git transition would have been spread out into commits targeting "specific changes" instead of one concise and presumably accurate enough subject for most purposes one would have to read about one to two dozens.
> > The change converts
> > (various aspects of) the build system in form of the makefile and
> > getrevision script (to exploit various aspects of git)... which
> is
> > basically what I would expect when a commit of a software
> projects
> > that is known to be using svn contains a subject "Convert
> flashrom
> > to git", don't you?
> >
> > Would something like this suit you better?
> > Migrate build system to git and add client-side hooks
>
> No, the hooks I'd expect anyway, I was rather nagging about the
> unrelated changes instead. Though, I don't remember accurately
> what the commit does now and what not.
Pretty much everything my hijacking PS2 on the stable branch's git patch suggested minus the bugs we fixed in the refinements due to your reviews and the s/-U/-u/.
> I'm also not sure if we
> still argue about the -U? I've just realized that it's not a
> parent of this commit.
Just because empty commits are a nuisance when working in git. I'd still rather see it in than not but in the end it is merely the shortcut of an unused code path in a build time tool, so... if you insist on your -2 then we will do it later if need be.
Please tell me so that I can rebase + squash for stable.
--
To view, visit https://review.coreboot.org/21886
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: I325edb7d9890c412a44ecacb5161268d3dbccc57
Gerrit-Change-Number: 21886
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sun, 08 Oct 2017 02:35:30 +0000
Gerrit-HasComments: Yes
Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/21834 )
Change subject: fixup! Convert flashrom to git
......................................................................
fixup! Convert flashrom to git
refine the pre-push hook:
- get rid of the concept of precious brances - all of them on the
upstream repos are precious (this is a change in the face of
using gerrit instead of a native git repository for staging purposes)
- likewise, only allow new versioned stable branches and no feature
branches there
Change-Id: I1d4b4a7ef2673cabee980ec4a7d7d5fbebdcaed1
Signed-off-by: Stefan Tauner <stefan.tauner(a)gmx.at>
Reviewed-on: https://review.coreboot.org/21834
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
---
M util/git-hooks/pre-push
1 file changed, 20 insertions(+), 19 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
diff --git a/util/git-hooks/pre-push b/util/git-hooks/pre-push
index 5bae8d2..b5f4620 100755
--- a/util/git-hooks/pre-push
+++ b/util/git-hooks/pre-push
@@ -22,15 +22,21 @@
zero=0000000000000000000000000000000000000000
upstream_pattern="github\.com.flashrom/flashrom(\.git)?|flashrom\.org.git/flashrom(\.git)?"
-precious_branches="stable staging"
-# Only care about the upstream repository
+# Only care about the upstream repositories
if echo "$url" | grep -q -v -E "$upstream_pattern" ; then
exit 0
fi
while read local_ref local_sha remote_ref remote_sha ; do
- if [ "$remote_ref" != "refs/heads/staging" -a "$remote_ref" != "refs/heads/stable" ]; then
+
+ # Only allow the stable and staging branches as well as versioned stable branches (e.g., 0.0.x).
+ # The matching expression's RE is always anchored to the first character (^ is undefined).
+ # The outer parentheses are needed to print out the whole matched string.
+ version=$(expr ${remote_ref#*refs/heads/} : '\(\([0-9]\+\.\)\{2,\}x\)$')
+ if [ "$remote_ref" != "refs/heads/staging" ] && \
+ [ "$remote_ref" != "refs/heads/stable" ] && \
+ [ -z "$version" ]; then
echo "Feature branches not allowed ($remote_ref)." >&2
exit 1
fi
@@ -40,14 +46,10 @@
exit 1
fi
- if [ "$remote_sha" = "$zero" ]; then
- echo "No new branches allowed." >&2
- exit 1
- fi
-
# Check for Signed-off-by and Acked-by
commit=$(git rev-list -n 1 --all-match --invert-grep -E \
- --grep '^Signed-off-by: .+ <.+@.+\..+>$' --grep '^Acked-by: .+ <.+@.+\..+>$' \
+ --grep '^Signed-off-by: .+ <.+@.+\..+>$' \
+ --grep '^Acked-by: .+ <.+@.+\..+>$' \
"$remote_sha..$local_sha")
if [ -n "$commit" ]; then
echo "Commit $local_sha in $local_ref is missing either \"Signed-off-by\"" \
@@ -55,17 +57,16 @@
exit 1
fi
- # Make _really_ sure we do not rewrite precious history
- for lbranch in $precious_branches ; do
- if [ "$remote_ref" = "refs/heads/$lbranch" ]; then
- nonreachable=$(git rev-list $remote_sha ^$local_sha | head -1)
- if [ -n "$nonreachable" ]; then
- echo "Only fast-forward pushes are allowed on $lbranch." >&2
- echo "$nonreachable is not included in $remote_sha while pushing to $remote_ref" >&2
- exit 1
- fi
+ # Make _really_ sure we do not rewrite history of any head/branch
+ if [ "${remote_ref#*refs/heads/}" != "$remote_ref" ]; then
+ nonreachable=$(git rev-list $remote_sha ^$local_sha | head -1)
+ if [ -n "$nonreachable" ]; then
+ echo "Only fast-forward pushes are allowed on branches." >&2
+ echo "At least $nonreachable is not included in $remote_sha while pushing to " \
+ "$remote_ref" >&2
+ exit 1
fi
- done
+ fi
# FIXME: check commit log format (subject without full stop at the end etc).
# FIXME: do buildbot checks if authorized?
--
To view, visit https://review.coreboot.org/21834
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: merged
Gerrit-Change-Id: I1d4b4a7ef2673cabee980ec4a7d7d5fbebdcaed1
Gerrit-Change-Number: 21834
Gerrit-PatchSet: 6
Gerrit-Owner: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Nico Huber has posted comments on this change. ( https://review.coreboot.org/21886 )
Change subject: squash! Convert flashrom to git
......................................................................
Patch Set 1:
(1 comment)
I'll take it as is, do we also want it on staging? As it wouldn't
affect patch compatibility, I don't care.
https://review.coreboot.org/#/c/21886/1//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/21886/1//COMMIT_MSG@11
PS1, Line 11: Convert flashrom to git
> and I thought I did already... :) No, subject of sane length can
> really cover all the topics specifically IMHO.
Yep, it's hard when you don't focus your commits on specific changes.
> The change converts
> (various aspects of) the build system in form of the makefile and
> getrevision script (to exploit various aspects of git)... which is
> basically what I would expect when a commit of a software projects
> that is known to be using svn contains a subject "Convert flashrom
> to git", don't you?
>
> Would something like this suit you better?
> Migrate build system to git and add client-side hooks
No, the hooks I'd expect anyway, I was rather nagging about the
unrelated changes instead. Though, I don't remember accurately
what the commit does now and what not. I'm also not sure if we
still argue about the -U? I've just realized that it's not a
parent of this commit.
--
To view, visit https://review.coreboot.org/21886
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: I325edb7d9890c412a44ecacb5161268d3dbccc57
Gerrit-Change-Number: 21886
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Fri, 06 Oct 2017 08:34:53 +0000
Gerrit-HasComments: Yes
Stefan Tauner has posted comments on this change. ( https://review.coreboot.org/21886 )
Change subject: squash! Convert flashrom to git
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/21886/1//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/21886/1//COMMIT_MSG@11
PS1, Line 11: Convert flashrom to git
> Please find a phrase that covers (at least most of) the changes.
and I thought I did already... :) No, subject of sane length can really cover all the topics specifically IMHO. The change converts (various aspects of) the build system in form of the makefile and getrevision script (to exploit various aspects of git)... which is basically what I would expect when a commit of a software projects that is known to be using svn contains a subject "Convert flashrom to git", don't you?
Would something like this suit you better?
Migrate build system to git and add client-side hooks
That being said, we could split off the hooks part if that makes anybody more comfortable, but it seems rather pointless to me.
--
To view, visit https://review.coreboot.org/21886
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: I325edb7d9890c412a44ecacb5161268d3dbccc57
Gerrit-Change-Number: 21886
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Fri, 06 Oct 2017 00:46:17 +0000
Gerrit-HasComments: Yes