Index: head/sysutils/flashrom/Makefile =================================================================== --- head/sysutils/flashrom/Makefile (revision 434486) +++ head/sysutils/flashrom/Makefile (revision 434487) @@ -1,58 +1,59 @@ # Created by: Alexander Logvinov # $FreeBSD$ PORTNAME= flashrom PORTVERSION= 0.9.9 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://download.flashrom.org/releases/ MAINTAINER= nukama+maintainer@gmail.com COMMENT= Utility for reading, writing, verifying, and erasing flash ROM chips LICENSE= GPLv2 LIB_DEPENDS= libpci.so:devel/libpci OPTIONS_DEFINE= BUSPIRATE DMIDECODE DOCS FTDI OPTIONS_DEFAULT= DMIDECODE FTDI BUSPIRATE_DESC= Enable buspirate support (broken) DMIDECODE_DESC= Use dmidecode to gather DMI information FTDI_DESC= Enable external FT2232SPI flasher support USES= gmake tar:bzip2 MAKE_ENV= CONFIG_BUSPIRATE_SPI=no \ WARNERROR=no ONLY_FOR_ARCHS= amd64 i386 PORTDOCS= * DOCSRCDIR1= ${WRKSRC} DOC_FILES1= ChangeLog README DOCSRCDIR2= ${WRKSRC}/Documentation DOCSDIR2= ${DOCSDIR}/Documentation DOC_FILES2= *.txt PLIST_FILES= bin/${PORTNAME} \ man/man8/${PORTNAME}.8.gz BUSPIRATE_MAKE_ENV= CONFIG_BUSPIRATE_SPI=yes DMIDECODE_RUN_DEPENDS+= dmidecode:sysutils/dmidecode FTDI_LIB_DEPENDS= libftdi1.so:devel/libftdi1 FTDI_USES= pkgconfig do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/ @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR} @${MKDIR} ${STAGEDIR}${DOCSDIR2} ${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR2} .include Index: head/sysutils/flashrom/files/patch-serial.c =================================================================== --- head/sysutils/flashrom/files/patch-serial.c (nonexistent) +++ head/sysutils/flashrom/files/patch-serial.c (revision 434487) @@ -0,0 +1,28 @@ +Avoid hang of serprog under FreeBSD + +Use case is flashrom+serprog to read SPI flash (MX25L6406) via Arduino +Nano V3. Actual command is: + +/usr/local/bin/flashrom -p serprog:dev=/dev/cuaU0:57600 -c MX25L6406E/MX25L6408E -r tcw770.dump + +Using flashrom 0.9.9 it hangs after 5 seconds on read from tty ("ttyin"). +The problem is that kernel method "ttydisc_rint" ignore same bytes. It +happens due to enabled IEXTEN local flag of termios. TTY cuts few bytes, +Arduino reads 11264 bytes, but flashrom gets 11244 bytes (corrupted) and +waits for remaining 20 bytes. + +The fix is simple: turn off IEXTEN local flag. + +https://patchwork.coreboot.org/patch/4498/ + +--- serial.c.orig 2016-11-18 19:39:55 UTC ++++ serial.c +@@ -203,7 +203,7 @@ int serialport_config(fdtype fd, int bau + } + 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) { Property changes on: head/sysutils/flashrom/files/patch-serial.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property