View | Details | Raw Unified | Return to bug 239800
Collapse All | Expand All

(-)sysutils/flashrom/Makefile (-3 / +3 lines)
Lines 1-51 Link Here
1
# Created by: Alexander Logvinov <ports@logvinov.com>
1
# Created by: Alexander Logvinov <ports@logvinov.com>
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	flashrom
4
PORTNAME=	flashrom
5
PORTVERSION=	1.0
5
PORTVERSION=	1.1
6
PORTREVISION=	1
7
CATEGORIES=	sysutils
6
CATEGORIES=	sysutils
8
MASTER_SITES=	https://download.flashrom.org/releases/
7
MASTER_SITES=	https://download.flashrom.org/releases/
8
DISTVERSIONPREFIX=	v
9
9
10
MAINTAINER=	mizhka@gmail.com
10
MAINTAINER=	mizhka@gmail.com
11
COMMENT=	Utility for reading, writing, verifying, and erasing flash ROM chips
11
COMMENT=	Utility for reading, writing, verifying, and erasing flash ROM chips
12
12
13
LICENSE=	GPLv2
13
LICENSE=	GPLv2
14
LICENSE_FILE=	${WRKSRC}/COPYING
14
LICENSE_FILE=	${WRKSRC}/COPYING
15
15
16
NOT_FOR_ARCHS=		aarch64
16
NOT_FOR_ARCHS=		aarch64
17
NOT_FOR_ARCHS_REASON=	./hwaccess.h:126:2: error: Unable to determine endianness.
17
NOT_FOR_ARCHS_REASON=	./hwaccess.h:126:2: error: Unable to determine endianness.
18
18
19
LIB_DEPENDS=	libpci.so:devel/libpci
19
LIB_DEPENDS=	libpci.so:devel/libpci
20
20
21
USES=		gmake tar:bzip2
21
USES=		gmake tar:bzip2
22
22
23
MAKE_ENV=	WARNERROR=no
23
MAKE_ENV=	WARNERROR=no
24
24
25
PLIST_FILES=	bin/flashrom \
25
PLIST_FILES=	bin/flashrom \
26
		man/man8/flashrom.8.gz
26
		man/man8/flashrom.8.gz
27
PORTDOCS=	*
27
PORTDOCS=	*
28
28
29
OPTIONS_DEFINE=		BUSPIRATE DOCS FTDI
29
OPTIONS_DEFINE=		BUSPIRATE DOCS FTDI
30
OPTIONS_DEFINE_amd64=	DMIDECODE
30
OPTIONS_DEFINE_amd64=	DMIDECODE
31
OPTIONS_DEFINE_i386=	DMIDECODE
31
OPTIONS_DEFINE_i386=	DMIDECODE
32
OPTIONS_DEFAULT=	FTDI
32
OPTIONS_DEFAULT=	
33
OPTIONS_DEFAULT_amd64=	DMIDECODE
33
OPTIONS_DEFAULT_amd64=	DMIDECODE
34
OPTIONS_DEFAULT_i386=	DMIDECODE
34
OPTIONS_DEFAULT_i386=	DMIDECODE
35
35
36
DMIDECODE_DESC=		Use dmidecode to gather DMI information
36
DMIDECODE_DESC=		Use dmidecode to gather DMI information
37
FTDI_DESC=		Enable external FT2232SPI flasher support
37
FTDI_DESC=		Enable external FT2232SPI flasher support
38
38
39
DMIDECODE_RUN_DEPENDS=	dmidecode:sysutils/dmidecode
39
DMIDECODE_RUN_DEPENDS=	dmidecode:sysutils/dmidecode
40
40
41
FTDI_LIB_DEPENDS=	libftdi1.so:devel/libftdi1
41
FTDI_LIB_DEPENDS=	libftdi1.so:devel/libftdi1
42
FTDI_USES=		pkgconfig
42
FTDI_USES=		pkgconfig
43
43
44
do-install:
44
do-install:
45
	${INSTALL_PROGRAM} ${WRKSRC}/flashrom ${STAGEDIR}${PREFIX}/bin
45
	${INSTALL_PROGRAM} ${WRKSRC}/flashrom ${STAGEDIR}${PREFIX}/bin
46
	${INSTALL_MAN} ${WRKSRC}/flashrom.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
46
	${INSTALL_MAN} ${WRKSRC}/flashrom.8 ${STAGEDIR}${MAN8PREFIX}/man/man8
47
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
47
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
48
	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
48
	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
49
	cd ${WRKSRC}/Documentation && ${INSTALL_DATA} *.txt ${STAGEDIR}${DOCSDIR}
49
	cd ${WRKSRC}/Documentation && ${INSTALL_DATA} *.txt ${STAGEDIR}${DOCSDIR}
50
50
51
.include <bsd.port.mk>
51
.include <bsd.port.mk>
(-)sysutils/flashrom/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1514932004
1
TIMESTAMP = 1565613761
2
SHA256 (flashrom-1.0.tar.bz2) = 3702fa215ba5fb5af8e54c852d239899cfa1389194c1e51cb2a170c4dc9dee64
2
SHA256 (flashrom-v1.1.tar.bz2) = aeada9c70c22421217c669356180c0deddd0b60876e63d2224e3260b90c14e19
3
SIZE (flashrom-1.0.tar.bz2) = 321693
3
SIZE (flashrom-v1.1.tar.bz2) = 348458
(-)sysutils/flashrom/files/patch-serial.c (-28 lines)
Lines 1-28 Link Here
1
Avoid hang of serprog under FreeBSD
2
3
Use case is flashrom+serprog to read SPI flash (MX25L6406) via Arduino
4
Nano V3.  Actual command is:
5
6
/usr/local/bin/flashrom -p serprog:dev=/dev/cuaU0:57600 -c MX25L6406E/MX25L6408E -r tcw770.dump
7
8
Using flashrom 0.9.9 it hangs after 5 seconds on read from tty ("ttyin").
9
The problem is that kernel method "ttydisc_rint" ignore same bytes.  It
10
happens due to enabled IEXTEN local flag of termios.  TTY cuts few bytes,
11
Arduino reads 11264 bytes, but flashrom gets 11244 bytes (corrupted) and
12
waits for remaining 20 bytes.
13
14
The fix is simple: turn off IEXTEN local flag.
15
16
https://patchwork.coreboot.org/patch/4498/
17
18
--- serial.c.orig	2016-11-18 19:39:55 UTC
19
+++ serial.c
20
@@ -203,7 +203,7 @@ int serialport_config(fdtype fd, int bau
21
 	}
22
 	wanted.c_cflag &= ~(PARENB | CSTOPB | CSIZE | CRTSCTS);
23
 	wanted.c_cflag |= (CS8 | CLOCAL | CREAD);
24
-	wanted.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
25
+	wanted.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG | IEXTEN);
26
 	wanted.c_iflag &= ~(IXON | IXOFF | IXANY | ICRNL | IGNCR | INLCR);
27
 	wanted.c_oflag &= ~OPOST;
28
 	if (tcsetattr(fd, TCSANOW, &wanted) != 0) {

Return to bug 239800