rm 915resolution, requested by Brad, "is dead" oga@
This commit is contained in:
parent
78325f3371
commit
250ca9ba7a
@ -1,35 +0,0 @@
|
|||||||
# $OpenBSD: Makefile,v 1.4 2007/09/17 12:14:11 kettenis Exp $
|
|
||||||
|
|
||||||
ONLY_FOR_ARCHS= i386 amd64
|
|
||||||
|
|
||||||
COMMENT= change resolution on available vbios modes for i8x5/9x5
|
|
||||||
|
|
||||||
DISTNAME= 915resolution-0.5.3
|
|
||||||
PKGNAME= ${DISTNAME}
|
|
||||||
CATEGORIES= x11
|
|
||||||
|
|
||||||
HOMEPAGE= http://www.geocities.com/stomljen/
|
|
||||||
|
|
||||||
MAINTAINER= Ben Lovett <ben@tilderoot.com>
|
|
||||||
|
|
||||||
# public domain
|
|
||||||
PERMIT_PACKAGE_CDROM= Yes
|
|
||||||
PERMIT_PACKAGE_FTP= Yes
|
|
||||||
PERMIT_DISTFILES_CDROM= Yes
|
|
||||||
PERMIT_DISTFILES_FTP= Yes
|
|
||||||
WANTLIB= c
|
|
||||||
|
|
||||||
MASTER_SITES= ${HOMEPAGE}
|
|
||||||
|
|
||||||
NO_REGRESS= Yes
|
|
||||||
|
|
||||||
pre-build:
|
|
||||||
cd ${WRKSRC} && make clean
|
|
||||||
|
|
||||||
do-install:
|
|
||||||
cd ${WRKBUILD} && \
|
|
||||||
${INSTALL_PROGRAM} 915resolution ${PREFIX}/sbin; \
|
|
||||||
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/915resolution; \
|
|
||||||
${INSTALL_DATA} README.txt ${PREFIX}/share/doc/915resolution
|
|
||||||
|
|
||||||
.include <bsd.port.mk>
|
|
@ -1,5 +0,0 @@
|
|||||||
MD5 (915resolution-0.5.3.tar.gz) = 7Sh3eKU9AsMaempSvBRikQ==
|
|
||||||
RMD160 (915resolution-0.5.3.tar.gz) = pAbGgQu/z5TFNS6hsekXivQHhYk=
|
|
||||||
SHA1 (915resolution-0.5.3.tar.gz) = N3oy0z8Zh63zcjQcjGZk1Wc9qbg=
|
|
||||||
SHA256 (915resolution-0.5.3.tar.gz) = tkyrg0teQQvKVV3J245p9i9vAklpQvNf9KaPPyfxtUI=
|
|
||||||
SIZE (915resolution-0.5.3.tar.gz) = 22583
|
|
@ -1,157 +0,0 @@
|
|||||||
$OpenBSD: patch-915resolution_c,v 1.3 2007/09/17 12:14:11 kettenis Exp $
|
|
||||||
--- 915resolution.c.orig Sun Apr 15 12:46:56 2007
|
|
||||||
+++ 915resolution.c Wed Sep 12 20:47:21 2007
|
|
||||||
@@ -22,7 +22,24 @@
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
+#if defined(__OpenBSD__)
|
|
||||||
+#if defined(__i386__)
|
|
||||||
+#include <i386/pio.h>
|
|
||||||
+#include <i386/sysarch.h>
|
|
||||||
+#define IOPL(x) i386_iopl(x)
|
|
||||||
+#elif defined(__amd64__)
|
|
||||||
+#include <amd64/pio.h>
|
|
||||||
+#include <amd64/sysarch.h>
|
|
||||||
+#define IOPL(x) amd64_iopl(x)
|
|
||||||
+#endif
|
|
||||||
+#define OUTL(x,y) outl(y,x)
|
|
||||||
+#define OUTB(x,y) outb(y,x)
|
|
||||||
+#else
|
|
||||||
#include <sys/io.h>
|
|
||||||
+#define IOPL(x) iopl(x)
|
|
||||||
+#define OUTL(x,y) outl(x,y)
|
|
||||||
+#define OUTB(x,y) outb(x,y)
|
|
||||||
+#endif
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
@@ -56,12 +73,12 @@ typedef unsigned int cardinal;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
CT_UNKWN, CT_830, CT_845G, CT_855GM, CT_865G, CT_915G, CT_915GM, CT_945G, CT_945GM,
|
|
||||||
- CT_946GZ, CT_G965, CT_Q965
|
|
||||||
+ CT_946GZ, CT_G965, CT_Q965, CT_GM965
|
|
||||||
} chipset_type;
|
|
||||||
|
|
||||||
char * chipset_type_names[] = {
|
|
||||||
"UNKNOWN", "830", "845G", "855GM", "865G", "915G", "915GM", "945G", "945GM",
|
|
||||||
- "946GZ", "G965", "Q965"
|
|
||||||
+ "946GZ", "G965", "Q965", "GM965"
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
@@ -165,7 +182,7 @@ typedef struct {
|
|
||||||
void initialize_system(char * filename) {
|
|
||||||
|
|
||||||
if (!filename) {
|
|
||||||
- if (iopl(3) < 0) {
|
|
||||||
+ if (IOPL(3) < 0) {
|
|
||||||
perror("Unable to obtain the proper IO permissions");
|
|
||||||
exit(2);
|
|
||||||
}
|
|
||||||
@@ -173,7 +190,7 @@ void initialize_system(char * filename) {
|
|
||||||
}
|
|
||||||
|
|
||||||
cardinal get_chipset_id(void) {
|
|
||||||
- outl(0x80000000, 0xcf8);
|
|
||||||
+ OUTL(0x80000000, 0xcf8);
|
|
||||||
return inl(0xcfc);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -225,6 +242,10 @@ chipset_type get_chipset(cardinal id) {
|
|
||||||
type = CT_Q965;
|
|
||||||
break;
|
|
||||||
|
|
||||||
+ case 0x2a008086:
|
|
||||||
+ type = CT_GM965;
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
default:
|
|
||||||
type = CT_UNKWN;
|
|
||||||
break;
|
|
||||||
@@ -350,6 +371,7 @@ vbios_map * open_vbios(char * filename, chipset_type f
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if 0
|
|
||||||
/*
|
|
||||||
* check if we have ATI Radeon
|
|
||||||
*/
|
|
||||||
@@ -398,6 +420,7 @@ vbios_map * open_vbios(char * filename, chipset_type f
|
|
||||||
close_vbios(map);
|
|
||||||
exit(2);
|
|
||||||
}
|
|
||||||
+#endif /* 0 */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Figure out where the mode table is
|
|
||||||
@@ -496,11 +519,11 @@ void unlock_vbios(vbios_map * map) {
|
|
||||||
break;
|
|
||||||
case CT_830:
|
|
||||||
case CT_855GM:
|
|
||||||
- outl(0x8000005a, 0xcf8);
|
|
||||||
+ OUTL(0x8000005a, 0xcf8);
|
|
||||||
map->b1 = inb(0xcfe);
|
|
||||||
|
|
||||||
- outl(0x8000005a, 0xcf8);
|
|
||||||
- outb(0x33, 0xcfe);
|
|
||||||
+ OUTL(0x8000005a, 0xcf8);
|
|
||||||
+ OUTB(0x33, 0xcfe);
|
|
||||||
break;
|
|
||||||
case CT_845G:
|
|
||||||
case CT_865G:
|
|
||||||
@@ -511,13 +534,14 @@ void unlock_vbios(vbios_map * map) {
|
|
||||||
case CT_946GZ:
|
|
||||||
case CT_G965:
|
|
||||||
case CT_Q965:
|
|
||||||
- outl(0x80000090, 0xcf8);
|
|
||||||
+ case CT_GM965:
|
|
||||||
+ OUTL(0x80000090, 0xcf8);
|
|
||||||
map->b1 = inb(0xcfd);
|
|
||||||
map->b2 = inb(0xcfe);
|
|
||||||
|
|
||||||
- outl(0x80000090, 0xcf8);
|
|
||||||
- outb(0x33, 0xcfd);
|
|
||||||
- outb(0x33, 0xcfe);
|
|
||||||
+ OUTL(0x80000090, 0xcf8);
|
|
||||||
+ OUTB(0x33, 0xcfd);
|
|
||||||
+ OUTB(0x33, 0xcfe);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -539,8 +563,8 @@ void relock_vbios(vbios_map * map) {
|
|
||||||
break;
|
|
||||||
case CT_830:
|
|
||||||
case CT_855GM:
|
|
||||||
- outl(0x8000005a, 0xcf8);
|
|
||||||
- outb(map->b1, 0xcfe);
|
|
||||||
+ OUTL(0x8000005a, 0xcf8);
|
|
||||||
+ OUTB(map->b1, 0xcfe);
|
|
||||||
break;
|
|
||||||
case CT_845G:
|
|
||||||
case CT_865G:
|
|
||||||
@@ -551,9 +575,10 @@ void relock_vbios(vbios_map * map) {
|
|
||||||
case CT_946GZ:
|
|
||||||
case CT_G965:
|
|
||||||
case CT_Q965:
|
|
||||||
- outl(0x80000090, 0xcf8);
|
|
||||||
- outb(map->b1, 0xcfd);
|
|
||||||
- outb(map->b2, 0xcfe);
|
|
||||||
+ case CT_GM965:
|
|
||||||
+ OUTL(0x80000090, 0xcf8);
|
|
||||||
+ OUTB(map->b1, 0xcfd);
|
|
||||||
+ OUTB(map->b2, 0xcfe);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -811,6 +836,9 @@ int parse_args(int argc, char *argv[], char ** filenam
|
|
||||||
}
|
|
||||||
else if (!strcmp(argv[index], "Q965")) {
|
|
||||||
*forced_chipset = CT_Q965;
|
|
||||||
+ }
|
|
||||||
+ else if (!strcmp(argv[index], "GM965")) {
|
|
||||||
+ *forced_chipset = CT_GM965;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
*forced_chipset = CT_UNKWN;
|
|
@ -1,26 +0,0 @@
|
|||||||
$OpenBSD: patch-Makefile,v 1.2 2007/03/31 15:32:20 sturm Exp $
|
|
||||||
--- Makefile.orig Thu Feb 2 15:01:38 2006
|
|
||||||
+++ Makefile Sat Mar 31 17:23:54 2007
|
|
||||||
@@ -1,15 +1,8 @@
|
|
||||||
-PRG=915resolution
|
|
||||||
+PROG= 915resolution
|
|
||||||
+SRCS= 915resolution.c
|
|
||||||
+LDADD= -l${MACHINE_ARCH}
|
|
||||||
+CFLAGS+= -Wall
|
|
||||||
+NOMAN= Yes
|
|
||||||
+BINDIR= ${PREFIX}/sbin
|
|
||||||
|
|
||||||
-SRCS=915resolution.c
|
|
||||||
-OBJS=${SRCS:.c=.o}
|
|
||||||
-
|
|
||||||
-CFLAGS:=-s -Wall -ggdb
|
|
||||||
-
|
|
||||||
-${PRG}: ${OBJS}
|
|
||||||
-
|
|
||||||
-clean:
|
|
||||||
- rm -f ${OBJS} ${PRG} *~
|
|
||||||
-
|
|
||||||
-install: ${PRG}
|
|
||||||
- cp ${PRG} /usr/sbin
|
|
||||||
-
|
|
||||||
+.include <bsd.prog.mk>
|
|
@ -1,6 +0,0 @@
|
|||||||
This software changes the resolution of an available vbios mode. It
|
|
||||||
patches only the RAM version of the video bios so the new resolution is
|
|
||||||
lost each time you reboot.
|
|
||||||
|
|
||||||
Because 915resolution requires write access to /dev/mem, the system must be
|
|
||||||
at a securelevel <= 0.
|
|
@ -1,7 +0,0 @@
|
|||||||
To set the resolution at reboot, add something like this to
|
|
||||||
rc.securelevel:
|
|
||||||
|
|
||||||
if [ -x ${PREFIX}/sbin/915resolution ]; then
|
|
||||||
echo -n ' 915resolution'
|
|
||||||
${PREFIX}/sbin/915resolution 4d 1440 900 > /dev/null
|
|
||||||
fi
|
|
@ -1,5 +0,0 @@
|
|||||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2006/05/20 16:32:05 sturm Exp $
|
|
||||||
@pkgpath x11/855resolution
|
|
||||||
sbin/915resolution
|
|
||||||
share/doc/915resolution/
|
|
||||||
share/doc/915resolution/README.txt
|
|
Loading…
x
Reference in New Issue
Block a user