DragonFly submit List (threaded) for 2007-02
DragonFly BSD
DragonFly submit List (threaded) for 2007-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: 915resolution support for DragonFly


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Mon, 05 Feb 2007 21:58:52 +0100

Simon 'corecode' Schubert wrote:
Last night I have been porting 915resolution to DragonFly. It works well on my laptop.
The patch against pkgsrc was sent to pkgsrc-users@ and here is the reply:

oops :)


I ported that last year so that i could use my laptop. somehow i forgot to share it, and now I lost it :) well, once again I guess.

Hah, found it. I even created proper patches! See attached and submit to pkgsrc at your discretion.


cheers
 simon

--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
? 915-dragonfly.diff
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/915resolution/Makefile,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile
--- Makefile	13 Nov 2006 04:15:02 -0000	1.2
+++ Makefile	5 Feb 2007 20:56:43 -0000
@@ -9,7 +9,7 @@ MAINTAINER=	pkgsrc-users@NetBSD.org
 HOMEPAGE=	http://www.geocities.com/stomljen/
 COMMENT=	BIOS VESA resolution utility for 8XX/9XX Intel chips
 
-ONLY_FOR_PLATFORM=	NetBSD-*-i386 NetBSD-*-x86_64 Linux-*-i386
+ONLY_FOR_PLATFORM=	NetBSD-*-i386 NetBSD-*-x86_64 Linux-*-i386 DragonFly-*-i386
 
 USE_TOOLS+=	gmake
 
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/915resolution/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo	13 Nov 2006 04:15:02 -0000	1.2
+++ distinfo	5 Feb 2007 20:56:43 -0000
@@ -3,5 +3,5 @@ $NetBSD: distinfo,v 1.2 2006/11/13 04:15
 SHA1 (915resolution-0.5.2.tar.gz) = 9f26eb1b728ca0b2d28c948207b034a49b477089
 RMD160 (915resolution-0.5.2.tar.gz) = 722b352a83f41f0e9822ed4e096e8064f239dcc1
 Size (915resolution-0.5.2.tar.gz) = 21183 bytes
-SHA1 (patch-aa) = 8556275046ccc2a9ebabe03b422b2b764bacbc9d
-SHA1 (patch-ab) = b65a38c9c7edd95f295619c9cdedc26449b3f177
+SHA1 (patch-aa) = 8edaeab4a17a230f3460581a77f291c58605658a
+SHA1 (patch-ab) = 52fd75d1fdec7f9bc04809643545417876e3f5c7
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/915resolution/patches/patch-aa,v
retrieving revision 1.2
diff -u -p -r1.2 patch-aa
--- patches/patch-aa	13 Nov 2006 04:15:02 -0000	1.2
+++ patches/patch-aa	5 Feb 2007 20:56:43 -0000
@@ -1,8 +1,8 @@
 $NetBSD: patch-aa,v 1.2 2006/11/13 04:15:02 obache Exp $
 
---- 915resolution.c.orig	2006-02-02 23:28:34.000000000 +0900
+--- 915resolution.c.orig	2006-02-02 15:28:34.000000000 +0100
 +++ 915resolution.c
-@@ -22,7 +22,22 @@
+@@ -22,11 +22,58 @@
  #include <string.h>
  #include <sys/mman.h>
  #include <fcntl.h>
@@ -22,10 +22,46 @@ $NetBSD: patch-aa,v 1.2 2006/11/13 04:15
 +#define OUTL(a, b)     outl(b, a)
 +#define OUTB(a, b)     outb(b, a)
 +#endif
++#ifdef __DragonFly__
++#include <machine/cpufunc.h>
++#define iopl(a) open("/dev/io", O_RDWR)
++#define OUTL(a, b)	outl(b, a)
++#define OUTB(a, b)	outb(b, a)
++#endif
  #include <unistd.h>
  #include <assert.h>
  
-@@ -169,7 +184,7 @@ void initialize_system(char * filename) 
+ 
++#ifdef __DragonFly__
++void *
++memmem(const void *large, size_t llen, const void *small, size_t slen)
++{
++	void *hit;
++	size_t pos;
++
++	if (slen == 0)
++		return NULL;
++
++	for (;;) {
++		hit = memchr(large, *(unsigned char*)small, llen);
++		if (hit == NULL)
++			return NULL;
++		pos = (uintptr_t)hit - (uintptr_t)large;
++		llen -= pos;
++		if (llen < slen)
++			return NULL;
++		if (memcmp(hit, small, slen) == 0)
++			return hit;
++		large = (const void *)((uintptr_t)hit + 1);
++		llen--;
++	}
++}
++#endif
++
+ 
+ #define NEW(a) ((a *)(calloc(1, sizeof(a))))
+ #define FREE(a) (free(a))
+@@ -169,7 +216,7 @@ void initialize_system(char * filename) 
  }
  
  cardinal get_chipset_id(void) {
@@ -34,7 +70,7 @@ $NetBSD: patch-aa,v 1.2 2006/11/13 04:15
      return inl(0xcfc);
  }
  
-@@ -476,11 +491,11 @@ void unlock_vbios(vbios_map * map) {
+@@ -476,11 +523,11 @@ void unlock_vbios(vbios_map * map) {
          case CT_UNKWN:
              break;
          case CT_855GM:
@@ -49,7 +85,7 @@ $NetBSD: patch-aa,v 1.2 2006/11/13 04:15
              break;
          case CT_845G:
          case CT_865G:
-@@ -488,13 +503,13 @@ void unlock_vbios(vbios_map * map) {
+@@ -488,13 +535,13 @@ void unlock_vbios(vbios_map * map) {
          case CT_915GM:
          case CT_945G:
          case CT_945GM:
@@ -67,7 +103,7 @@ $NetBSD: patch-aa,v 1.2 2006/11/13 04:15
              break;
          }
      }
-@@ -526,8 +541,8 @@ void relock_vbios(vbios_map * map) {
+@@ -526,8 +573,8 @@ void relock_vbios(vbios_map * map) {
          case CT_UNKWN:
              break;
          case CT_855GM:
@@ -78,7 +114,7 @@ $NetBSD: patch-aa,v 1.2 2006/11/13 04:15
              break;
          case CT_845G:
          case CT_865G:
-@@ -535,9 +550,9 @@ void relock_vbios(vbios_map * map) {
+@@ -535,9 +582,9 @@ void relock_vbios(vbios_map * map) {
          case CT_915GM:
          case CT_945G:
          case CT_945GM:

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]