Imported Upstream version 1.15.1
[deb_xorg-server.git] / hw / xfree86 / os-support / solaris / apSolaris.shar
CommitLineData
a09e091a
JB
1#!/bin/sh
2#
3# This is a shell archive. Save it in a file, remove anything before
4# this line, and then unpack it by entering "sh file". Note, it may
5# create directories; files and directories will be owned by you and
6# have default permissions.
7# Made on Sun Jun 25 20:24:59 CEST 2006 by Martin Bochnig at martux.org
8#
9# This archive contains:
10#
11# ./aperture
12#
13# ./aperture/Makefile
14# ./aperture/Makefile.amd64
15# ./aperture/Makefile.sparcv9
16# ./aperture/README
17# ./aperture/aperture.c
18# ./aperture/aperture.conf
19# ./aperture/devlink.tab
20#
21echo c - ./aperture
22mkdir -p ./aperture > /dev/null 2>&1
23#
24echo x - ./aperture/Makefile
25sed 's/^X//' >./aperture/Makefile << 'END-of-./aperture/Makefile'
26X#
27X# File: makefile for aperture Framebuffer Driver
28X# Author: Doug Anson (danson@lgc.com)
29X# Date: 2/15/94
30X# Modified: David Holland (davidh@use.com)
31X# Date: 2/23/94
32X# - Changed name, and debugging structure
33X# Modified: Marc Aurele La France (tsi@xfree86.org)
34X# Date: 2001.06.08
35X# - SPARC support, cleanup and turf aptest.
36X#
37X# >>NOTE<< Have a look at Makefile.sparcv9 for specifics.
38X#
39X# Modified: Martin Bochnig (martin@martux.org)
40X# Date: 2006.06.24
41X# - Slightly modified to also build on Solaris 10 and 11.
42X# - amd64 64 bit kernel support
43X# - cosmetical changes to also support sun4v, not only sun4u
44X#
45X# >>NOTE<< Have a look at Makefile.amd64 for amd64 specifics.
46X#
47X# GNU gcc compiler
48XCC=gcc
49XCFLGS=-fno-builtin -Wall -O3
50X
51X#
52X# SUNWspro compiler
53X#CC=/opt/SUNWspro/bin/cc
54X#CFLGS=-Xa -xnolib -xO3
55X
56X#
57X# Debug error reporting
58X#DEBUG_FLG=
59X#DEBUG_FLG=-DAPERTURE_DEBUG
60X
61X#
62X# Files and object declarations
63XKERNEL_FLGS=-D_KERNEL -DSUNDDI
64XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
65XCFILES= aperture.c
66XOBJS= aperture.o
67XDRIVER= aperture
68X
69X#
70X# Make rules
71Xall: $(DRIVER)
72X
73X$(DRIVER): $(OBJS)
74X @if [ -f "Makefile.`isainfo -k`" ]; then \
75X make -f Makefile.`isainfo -k` $(DRIVER); \
76X else \
77X rm -f $(DRIVER); \
78X ld -r -o $(DRIVER) $(OBJS); \
79X fi
80X
81Xinstall: $(DRIVER)
82X @if [ -f "Makefile.`isainfo -k`" ]; then \
83X make -f Makefile.`isainfo -k` install; \
84X else \
85X cp aperture.conf /kernel/drv; \
86X cp $(DRIVER) /kernel/drv; \
87X fi
88X
89Xadd_drv:
90X @if [ -f "Makefile.`isainfo -k`" ]; then \
91X make -f Makefile.`isainfo -k` add_drv; \
92X else \
93X add_drv aperture; \
94X fi
95X
96Xclean:
97X rm -f *% *.BAK $(OBJS) $(DRIVER) core
98X
99X.SUFFIXES: .i
100X
101X.c.i:
102X $(CC) -E $(CFLAGS) $*.c > $@
103X
104X.c.o:
105X @if [ -f "Makefile.`isainfo -k`" ]; then \
106X make -f Makefile.`isainfo -k` $@; \
107X else \
108X rm -f $@; \
109X $(CC) -c $(CFLAGS) $*.c -o $@; \
110X fi
111END-of-./aperture/Makefile
112echo x - ./aperture/Makefile.amd64
113sed 's/^X//' >./aperture/Makefile.amd64 << 'END-of-./aperture/Makefile.amd64'
114X#
115X# File: Makefile for aperture Framebuffer Driver
116X# Author: Doug Anson (danson@lgc.com)
117X# Date: 2/15/94
118X# Modified: David Holland (davidh@use.com)
119X# Date: 2/23/94
120X# - Changed name, and debugging structure
121X# Modified: Marc Aurele La France (tsi@xfree86.org)
122X# Date: 2001.06.08
123X# - SPARC support, cleanup and turf aptest.
124X# Modified: Martin Bochnig (martin@martux.org)
125X# - amd64 64 bit kernel support, cosmetics and also
126X# supporting sun4v (and arbitrary sparcv9) platforms
127X# as well as SunOS 5.10 or higher now
128X# - Changed name
129X#
130X
131X#
132X# GNU gcc compiler, version 3.2 or later
133X#
134XCC=gcc
135XCFLGS=-fno-builtin -Wall -O3 -m64 -mcmodel=kernel
136X
137X#
138X# SUNWspro compiler (untested, might not properly work for amd64 here)
139X#CC=/opt/SUNWspro/bin/cc
140X#CFLGS=-Xa -xarch=v9 -xnolib -xO3
141X
142X#
143X# Debug error reporting
144X#DEBUG_FLG=
145X#DEBUG_FLG=-DAPERTURE_DEBUG
146X
147X#
148X# Files and object declarations
149XKERNEL_FLGS=-D_KERNEL -DSUNDDI
150XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
151XCFILES= aperture.c
152XOBJS= aperture.o
153XDRIVER= aperture
154X
155X#
156X# Make rules
157Xall: $(DRIVER)
158X
159X$(DRIVER): $(OBJS)
160X rm -f $(DRIVER)
161X ld -r -o $(DRIVER) $(OBJS)
162X
163Xinstall: $(DRIVER)
164X cp aperture.conf /kernel/drv
165X cp $(DRIVER) /kernel/drv/amd64
166X
167Xadd_drv:
168X add_drv aperture
169X
170Xclean:
171X rm -f *% *.BAK $(OBJS) $(DRIVER) core
172X
173X.SUFFIXES: .i
174X
175X.c.i:
176X $(CC) -E $(CFLAGS) $*.c > $@
177END-of-./aperture/Makefile.amd64
178echo x - ./aperture/Makefile.sparcv9
179sed 's/^X//' >./aperture/Makefile.sparcv9 << 'END-of-./aperture/Makefile.sparcv9'
180X#
181X# File: makefile for aperture Framebuffer Driver
182X# Author: Doug Anson (danson@lgc.com)
183X# Date: 2/15/94
184X# Modified: David Holland (davidh@use.com)
185X# Date: 2/23/94
186X# - Changed name, and debugging structure
187X# Modified: Marc Aurele La France (tsi@xfree86.org)
188X# Date: 2001.06.08
189X# - SPARC support, cleanup and turf aptest.
190X# Modified: Martin Bochnig (martin@martux.org)
191X# Date: 2006.06.24
192X# - Changed name for generic sparcv9 support
193X# - updated to better work with Solaris 10 and 11
194X#
195X
196X#
197X# GNU gcc compiler, version 3.2 or later
198X#
199XCC=gcc
200XCFLGS=-fno-builtin -Wall -O3 -m64
201X
202X#
203X# SUNWspro compiler
204X#CC=/opt/SUNWspro/bin/cc
205X#CFLGS=-Xa -xarch=v9 -xnolib -xO3
206X
207X#
208X# Debug error reporting
209X#DEBUG_FLG=
210X#DEBUG_FLG=-DAPERTURE_DEBUG
211X
212X#
213X# Files and object declarations
214XKERNEL_FLGS=-D_KERNEL -DSUNDDI
215XCFLAGS= $(CFLGS) $(KERNEL_FLGS) $(DEBUG_FLG)
216XCFILES= aperture.c
217XOBJS= aperture.o
218XDRIVER= aperture
219X
220X#
221X# Make rules
222Xall: $(DRIVER)
223X
224X$(DRIVER): $(OBJS)
225X rm -f $(DRIVER)
226X ld -r -o $(DRIVER) $(OBJS)
227X
228Xinstall: $(DRIVER)
229X cp aperture.conf /kernel/drv
230X cp $(DRIVER) /kernel/drv/sparcv9
231X
232Xadd_drv:
233X add_drv aperture
234X
235Xclean:
236X rm -f *% *.BAK $(OBJS) $(DRIVER) core
237X
238X.SUFFIXES: .i
239X
240X.c.i:
241X $(CC) -E $(CFLAGS) $*.c > $@
242END-of-./aperture/Makefile.sparcv9
243echo x - ./aperture/README
244sed 's/^X//' >./aperture/README << 'END-of-./aperture/README'
245XFramebuffer aperture driver.
246X
247XThis driver was written to provide a device that, unlike /dev/mem, allows
248Xmmap()'ing of ranges beyond installed memory.
249X
250XThe original x86-based version of this driver was the collaborative work of
251XDoug Anson (danson@lgc.com), and David Holland (davidh@use.com). It has since
252Xbeen rewritten to also work on sparc machines and - later on - also on sparcv9
253Xand recently amd64 64 bit kernels.
254XIt flawlessly compiles and installs on Solaris 10 and 11 now.
255X
256X
257XInstallation instructions:
258X
259X1) Check the Makefile, for appropriate CC, and CFLAGS definitions. Compiling
260X with APERTURE_DEBUG defined means the driver will generate reams of
261X debugging output. You'll probably want to leave this off...
262X
263X2) Type 'make' (or 'gmake'). Both the driver and test program should compile
264X without any problems. No warning messages should be generated.
265X
266X3) Become 'root'.
267X
268X4) Type 'make install' and 'make add_drv'. The screen should look something
269X like this:
270X
271X # make install
272X cp aperture aperture.conf /kernel/drv
273X # make add_drv
274X add_drv aperture
275X
276X On a sparcv9 machine this will mention the /kernel/drv/sparcv9 directory
277X instead of /kernel/drv. Similarily /kernel/drv/amd64 should be used on amd64.
278X
279X This installs the driver to the system.
280X
281X5) While as root modify the file /etc/devlink.tab, adding these lines:
282X
283X# The following entry is for the framebuffer driver
284Xtype=ddi_pseudo;name=aperture fbs/\M0
285X
286X Add that line exactly as shown. You may also simply add the
287X contents of the devlink.tab file supplied to /etc/devlink.tab.
288X It contains the lines as well. (Yes, that is a tab between
289X aperture and fbs, not spaces - very important)
290X
291X6) Perform a reconfiguration boot of the system.
292X
293X # touch /reconfigure
294X # init 6
295X
296XBug reports, questions, suggestions, etc can be sent to xfree86@xfree86.org.
297END-of-./aperture/README
298echo x - ./aperture/aperture.c
299sed 's/^X//' >./aperture/aperture.c << 'END-of-./aperture/aperture.c'
300X/*
301X * Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved.
302X *
303X * Permission is hereby granted, free of charge, to any person obtaining a copy
304X * of this software and associated documentation files (the "Software"), to
305X * deal in the Software without restriction, including without limitation the
306X * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
307X * sell copies of the Software, and to permit persons to whom the Software is
308X * furnished to do so, subject to the following conditions:
309X *
310X * The above copyright notice and this permission notice shall be included in
311X * all copies or substantial portions of the Software.
312X *
313X * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
314X * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
315X * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
316X * XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
317X * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
318X * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
319X *
320X * Except as contained in this notice, the name of the XFree86 Project shall
321X * not be used in advertising or otherwise to promote the sale, use or other
322X * dealings in this Software without prior written authorization from the
323X * XFree86 Project.
324X */
325X
326X/*
327X * Aperture driver for Solaris.
328X */
329X
330X/*
331X * Modified: Martin Bochnig (martin@martux.org)
332X * Log: Commented out obsolete kernel interfaces DDI_IDENTIFIED and DDI_NOT_IDENTIFIED
333X * not supported by SunOS 5.10 or higher anymore,
334X * see http://docs.sun.com/app/docs/doc/819-2255/6n4ibnffr?a=view
335X */
336X
337X#include <sys/conf.h>
338X#include <sys/ddi.h>
339X#include <sys/modctl.h>
340X#include <sys/open.h>
341X#include <sys/stat.h>
342X#include <sys/sunddi.h>
343X
344X#define DEV_IDENT "aperture"
345X#define DEV_BANNER "XFree86 aperture driver"
346X
347X#ifndef D_64BIT
348X#define D_64BIT 0
349X#endif
350X
351X#ifndef NULL
352X#define NULL ((void *)0)
353X#endif
354X
355X/*
356X * open(9E)
357X */
358X/*ARGSUSED*/
359Xstatic int
360Xaperture_open
361X(
362X#ifdef __STDC__
363X dev_t *devp,
364X int flag,
365X int typ,
366X struct cred *cred
367X#endif
368X)
369X#ifndef __STDC__
370X dev_t *devp;
371X int flag;
372X int typ;
373X struct cred *cred;
374X#endif
375X{
376X int error;
377X
378X#ifdef APERTURE_DEBUG
379X
380X cmn_err(CE_CONT, DEV_IDENT ": entering open()\n");
381X
382X#endif
383X
384X if ((typ != OTYP_CHR) || (getminor(*devp)))
385X error = EINVAL;
386X else
387X error = 0;
388X
389X#ifdef APERTURE_DEBUG
390X
391X cmn_err(CE_CONT, DEV_IDENT ": leaving open() = %d\n", error);
392X
393X#endif
394X
395X return error;
396X}
397X
398X/*
399X * mmap(9E)
400X */
401X/*ARGSUSED*/
402Xstatic int
403Xaperture_mmap
404X(
405X#ifdef __STDC__
406X dev_t dev,
407X off_t off,
408X int prot
409X#endif
410X)
411X#ifndef __STDC__
412X dev_t dev;
413X off_t off;
414X int prot;
415X#endif
416X{
417X pfn_t pf;
418X int error;
419X
420X#ifdef APERTURE_DEBUG
421X
422X cmn_err(CE_CONT, DEV_IDENT ": entering mmap(0x%016lx)\n", off);
423X
424X#endif
425X
426X pf = btop((unsigned long)off);
427X
428X /* Deal with mmap(9E) interface limits */
429X error = (int)pf;
430X if ((error < 0) || (pf != (pfn_t)error))
431X error = -1;
432X
433X#ifdef APERTURE_DEBUG
434X
435X cmn_err(CE_CONT, DEV_IDENT ": leaving mmap() = 0x%08lx", error);
436X
437X#endif
438X
439X return error;
440X}
441X
442Xstatic struct cb_ops aperture_cb_ops =
443X{
444X aperture_open, /* open */
445X nulldev, /* close */
446X nodev, /* strategy */
447X nodev, /* print */
448X nodev, /* dump */
449X nodev, /* read */
450X nodev, /* write */
451X nodev, /* ioctl */
452X nodev, /* devmap */
453X aperture_mmap, /* mmap */
454X ddi_segmap, /* segmap */
455X nochpoll, /* poll */
456X ddi_prop_op, /* cb_prop_op */
457X 0, /* streamtab */
458X D_NEW | D_MP | D_64BIT /* Driver compatibility flag */
459X};
460X
461X
462Xstatic dev_info_t *aperture_dip; /* private copy of devinfo pointer */
463X
464X/*
465X * getinfo(9E)
466X */
467X/*ARGSUSED*/
468Xstatic int
469Xaperture_getinfo
470X(
471X#ifdef __STDC__
472X dev_info_t *dip,
473X ddi_info_cmd_t infocmd,
474X void *arg,
475X void **result
476X#endif
477X)
478X#ifndef __STDC__
479X dev_info_t *dip;
480X ddi_info_cmd_t infocmd;
481X void *arg;
482X void **result;
483X#endif
484X{
485X int error;
486X
487X#ifdef APERTURE_DEBUG
488X
489X cmn_err(CE_CONT, DEV_IDENT ": entering getinfo()\n");
490X
491X#endif
492X
493X switch (infocmd) {
494X case DDI_INFO_DEVT2DEVINFO:
495X *result = aperture_dip;
496X error = DDI_SUCCESS;
497X break;
498X case DDI_INFO_DEVT2INSTANCE:
499X *result = NULL;
500X error = DDI_SUCCESS;
501X break;
502X default:
503X error = DDI_FAILURE;
504X }
505X
506X#ifdef APERTURE_DEBUG
507X
508X cmn_err(CE_CONT, DEV_IDENT ": leaving getinfo() = %d\n", error);
509X
510X#endif
511X
512X return error;
513X}
514X
515X/*
516X * identify(9E)
517X */
518X/*ARGSUSED*/
519Xstatic int
520Xaperture_identify
521X(
522X#ifdef __STDC__
523X dev_info_t *dip
524X#endif
525X)
526X#ifndef __STDC__
527X dev_info_t *dip;
528X#endif
529X{
530X int error;
531X
532X#ifdef APERTURE_DEBUG
533X
534X cmn_err(CE_CONT, DEV_IDENT ": entering identify()\n");
535X
536X#endif
537X
538X if (strcmp(ddi_get_name(dip), DEV_IDENT))
539X error = 1 /* DDI_NOT_IDENTIFIED obsolete since SunOS 5.10 */ ;
540X else
541X error = 2 /* DDI_IDENTIFIED obsolete since SunOS 5.10 */ ;
542X
543X#ifdef APERTURE_DEBUG
544X
545X cmn_err(CE_CONT, DEV_IDENT ": leaving identify() = %d\n", error);
546X
547X#endif
548X
549X return error;
550X}
551X
552X/*
553X * attach(9E)
554X */
555X/*ARGSUSED*/
556Xstatic int
557Xaperture_attach
558X(
559X#ifdef __STDC__
560X dev_info_t *dip,
561X ddi_attach_cmd_t cmd
562X#endif
563X)
564X#ifndef __STDC__
565X dev_info_t *dip;
566X ddi_attach_cmd_t cmd;
567X#endif
568X{
569X int error;
570X
571X#ifdef APERTURE_DEBUG
572X
573X cmn_err(CE_CONT, DEV_IDENT ": entering attach()\n");
574X
575X#endif
576X
577X if (cmd != DDI_ATTACH)
578X {
579X
580X#ifdef APERTURE_DEBUG
581X
582X cmn_err(CE_CONT, DEV_IDENT ": not attach(, DDI_ATTACH)\n");
583X
584X#endif
585X
586X error = DDI_FAILURE;
587X }
588X else
589X {
590X error = ddi_create_minor_node(dip, ddi_get_name(dip), S_IFCHR,
591X (minor_t)ddi_get_instance(dip),
592X NULL, 0 /* NODESPECIFIC_DEV obsolete since SunOS 5.10 */ );
593X
594X if (error == DDI_SUCCESS)
595X {
596X aperture_dip = dip;
597X ddi_report_dev(dip);
598X }
599X }
600X
601X#ifdef APERTURE_DEBUG
602X
603X cmn_err(CE_CONT, DEV_IDENT ": leaving attach() = %d\n", error);
604X
605X#endif
606X
607X return error;
608X}
609X
610X/*
611X * detach(9E)
612X */
613Xstatic int
614Xaperture_detach
615X(
616X#ifdef __STDC__
617X dev_info_t *dip,
618X ddi_detach_cmd_t cmd
619X#endif
620X)
621X#ifndef __STDC__
622X dev_info_t *dip;
623X ddi_detach_cmd_t cmd;
624X#endif
625X{
626X int error;
627X
628X#ifdef APERTURE_DEBUG
629X
630X cmn_err(CE_CONT, DEV_IDENT ": entering detach()\n");
631X
632X#endif
633X
634X if (cmd != DDI_DETACH)
635X {
636X error = DDI_FAILURE;
637X }
638X else
639X {
640X ddi_remove_minor_node(dip, NULL);
641X aperture_dip = NULL;
642X error = DDI_SUCCESS;
643X }
644X
645X#if APERTURE_DEBUG
646X
647X cmn_err(CE_CONT, DEV_IDENT ": leaving detach() = %d\n", error);
648X
649X#endif
650X
651X return error;
652X}
653X
654X
655Xstatic struct dev_ops aperture_ops =
656X{
657X DEVO_REV, /* revision */
658X 0, /* refcnt */
659X aperture_getinfo, /* getinfo */
660X aperture_identify, /* identify */
661X nulldev, /* probe */
662X aperture_attach, /* attach */
663X aperture_detach, /* detach */
664X nodev, /* reset */
665X &aperture_cb_ops, /* driver operations */
666X NULL /* bus operations */
667X};
668X
669X
670Xstatic struct modldrv modldrv =
671X{
672X &mod_driverops, /* mod_ops structure pointer */
673X DEV_BANNER, /* driver banner string */
674X &aperture_ops, /* dev_ops structure pointer */
675X};
676X
677X
678Xstatic struct modlinkage modlinkage =
679X{
680X MODREV_1, /* module API revision */
681X {
682X &modldrv, /* module driver structure pointer */
683X NULL /* list termination */
684X }
685X};
686X
687X
688X/*
689X * _init(9E)
690X */
691Xint
692X_init
693X(
694X#ifdef __STDC__
695X void
696X#endif
697X)
698X{
699X int error;
700X
701X#ifdef APERTURE_DEBUG
702X
703X cmn_err(CE_CONT, DEV_IDENT ": entering _init()\n");
704X
705X#endif
706X
707X error = mod_install(&modlinkage);
708X
709X#ifdef APERTURE_DEBUG
710X
711X cmn_err(CE_CONT, DEV_IDENT ": leaving _init() = %d\n", error);
712X
713X#endif
714X
715X return error;
716X}
717X
718X/*
719X * _info(9E)
720X */
721Xint
722X_info
723X(
724X#ifdef __STDC__
725X struct modinfo *modinfop
726X#endif
727X)
728X#ifndef __STDC__
729X struct modinfo *modinfop;
730X#endif
731X{
732X int error;
733X
734X#ifdef APERTURE_DEBUG
735X
736X cmn_err(CE_CONT, DEV_IDENT ": entering _info()\n");
737X
738X#endif
739X
740X error = mod_info(&modlinkage, modinfop);
741X
742X#ifdef APERTURE_DEBUG
743X
744X cmn_err(CE_CONT, DEV_IDENT ": leaving _info() = %d\n", error);
745X
746X#endif
747X
748X return error;
749X}
750X
751X/*
752X * _fini(9E)
753X */
754Xint
755X_fini
756X(
757X#ifdef __STDC__
758X void
759X#endif
760X)
761X{
762X int error;
763X
764X#ifdef APERTURE_DEBUG
765X
766X cmn_err(CE_CONT, DEV_IDENT ": entering _fini()\n");
767X
768X#endif
769X
770X error = mod_remove(&modlinkage);
771X
772X#ifdef APERTURE_DEBUG
773X
774X cmn_err(CE_CONT, DEV_IDENT ": leaving _fini() = %d\n", error);
775X
776X#endif
777X
778X return error;
779X}
780END-of-./aperture/aperture.c
781echo x - ./aperture/aperture.conf
782sed 's/^X//' >./aperture/aperture.conf << 'END-of-./aperture/aperture.conf'
783X#
784X# Copyright 1994 Doug Anson, danson@lgc.com & David Holland, davidh@use.com
785X#
786X# File: aperture.conf
787X# Author: Doug Anson (danson@lgc.com)
788X#
789X# Modified: David Holland (davidh@use.com)
790X# Log: Change comments 02/23/94
791X# Change defaults/comments 09/25/94
792X#
793X# Modified: Marc Aurele La France (tsi@xfree86.org)
794X# Log: SPARC changes 2001.09
795X#
796X# Purpose: This conf file is used by the aperture driver.
797X#
798Xname="aperture" parent="pseudo";
799END-of-./aperture/aperture.conf
800echo x - ./aperture/devlink.tab
801sed 's/^X//' >./aperture/devlink.tab << 'END-of-./aperture/devlink.tab'
802X# The following entry is for the aperture driver
803Xtype=ddi_pseudo;name=aperture fbs/\M0
804END-of-./aperture/devlink.tab
805exit
806