[coreboot] [flashrom] r445 - trunk

svn at coreboot.org svn at coreboot.org
Tue Apr 28 14:56:04 CEST 2009


Author: hailfinger
Date: 2009-04-28 14:56:04 +0200 (Tue, 28 Apr 2009)
New Revision: 445

Modified:
   trunk/flash.h
   trunk/flashrom.c
Log:
There are still some tweaks necessary to get Flashrom to build on
DragonFly, but this helps a lot.

Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>
Acked-by: Stefan Reinauer <stepan at coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>


Modified: trunk/flash.h
===================================================================
--- trunk/flash.h	2009-04-26 19:47:23 UTC (rev 444)
+++ trunk/flash.h	2009-04-28 12:56:04 UTC (rev 445)
@@ -34,7 +34,7 @@
 #define __DARWIN__
 #endif
 
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
   #include <machine/cpufunc.h>
   #define off64_t off_t
   #define lseek64 lseek

Modified: trunk/flashrom.c
===================================================================
--- trunk/flashrom.c	2009-04-26 19:47:23 UTC (rev 444)
+++ trunk/flashrom.c	2009-04-28 12:56:04 UTC (rev 445)
@@ -344,7 +344,7 @@
 	int force = 0;
 	int read_it = 0, write_it = 0, erase_it = 0, verify_it = 0;
 	int ret = 0, i;
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 	int io_fd;
 #endif
 
@@ -462,7 +462,7 @@
 	/* First get full io access */
 #if defined (__sun) && (defined(__i386) || defined(__amd64))
 	if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) != 0) {
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined (__DragonFly__)
 	if ((io_fd = open("/dev/io", O_RDWR)) < 0) {
 #else
 	if (iopl(3) != 0) {





More information about the coreboot mailing list