Exclude /dev/fb code if no framebuffer is compiled into the system.

Adds a fb.h flag file with '#define NFB 1' if any such card is configured
in to the kernel.
This commit is contained in:
tv 1997-12-23 23:57:20 +00:00
parent 56b5c3db8d
commit 89e7595756
4 changed files with 27 additions and 16 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files.sparc,v 1.45 1997/10/17 23:59:57 gwr Exp $
# $NetBSD: files.sparc,v 1.46 1997/12/23 23:57:20 tv Exp $
# @(#)files.sparc 8.1 (Berkeley) 7/19/93
# sparc-specific configuration info
@ -125,39 +125,43 @@ file arch/sparc/sparc/amd7930intr.s audio
# Brooktree DAC attribute
define bt_dac
device bwtwo
# Include /dev/fb driver only if a framebuffer card is included
define fb
device bwtwo: fb
attach bwtwo at sbus, obio, vmes, vmel
file arch/sparc/dev/bwtwo.c bwtwo needs-flag
device cgtwo
device cgtwo: fb
attach cgtwo at sbus, obio, vmes
file arch/sparc/dev/cgtwo.c cgtwo needs-flag
device cgthree: bt_dac
device cgthree: bt_dac, fb
attach cgthree at sbus
file arch/sparc/dev/cgthree.c cgthree needs-flag
device cgfour: bt_dac
device cgfour: bt_dac, fb
attach cgfour at obio
file arch/sparc/dev/cgfour.c cgfour needs-flag
device cgsix: bt_dac
device cgsix: bt_dac, fb
attach cgsix at sbus, obio
file arch/sparc/dev/cgsix.c cgsix needs-flag
device cgeight: bt_dac
device cgeight: bt_dac, fb
attach cgeight at obio
file arch/sparc/dev/cgeight.c cgeight needs-flag
device tcx: bt_dac
device tcx: bt_dac, fb
attach tcx at sbus
file arch/sparc/dev/tcx.c tcx needs-flag
device cgfourteen
device cgfourteen: fb
attach cgfourteen at obio
file arch/sparc/dev/cgfourteen.c cgfourteen needs-flag
file arch/sparc/dev/bt_subr.c bt_dac
file arch/sparc/dev/fb.c fb needs-flag
# device definition in sys/conf/files
attach le at sbus, ledma, lebuffer, obio
@ -202,7 +206,6 @@ file arch/sparc/dev/isp_sbus.c isp_sbus
#
file dev/cons.c
file arch/sparc/dev/fb.c
file arch/sparc/fpu/fpu.c
file arch/sparc/fpu/fpu_add.c

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.c,v 1.51 1997/10/18 00:01:55 gwr Exp $ */
/* $NetBSD: conf.c,v 1.52 1997/12/23 23:57:22 tv Exp $ */
/*
* Copyright (c) 1992, 1993
@ -72,6 +72,7 @@
#include "zstty.h"
#include "fdc.h" /* has NFDC and NFD; see files.sparc */
#include "bwtwo.h"
#include "cgtwo.h"
#include "cgthree.h"
@ -80,6 +81,8 @@
#include "cgeight.h"
#include "tcx.h"
#include "cgfourteen.h"
#include "fb.h"
#include "xd.h"
#include "xy.h"
#include "md.h"
@ -140,7 +143,7 @@ struct cdevsw cdevsw[] =
cdev_ch_init(NCH,ch), /* 19: SCSI autochanger */
cdev_tty_init(NPTY,pts), /* 20: pseudo-tty slave */
cdev_ptc_init(NPTY,ptc), /* 21: pseudo-tty master */
cdev_fb_init(1,fb), /* 22: /dev/fb indirect driver */
cdev_fb_init(NFB,fb), /* 22: /dev/fb indirect driver */
cdev_disk_init(NCCD,ccd), /* 23: concatenated disk driver */
cdev_fd_init(1,filedesc), /* 24: file descriptor pseudo-device */
cdev_ipf_init(NIPFILTER,ipl), /* 25: ip-filter device */

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_interface.c,v 1.19 1997/12/10 23:12:17 pk Exp $ */
/* $NetBSD: db_interface.c,v 1.20 1997/12/23 23:57:23 tv Exp $ */
/*
* Mach Operating System
@ -57,6 +57,7 @@
#include <machine/ctlreg.h>
#include <sparc/sparc/asm.h>
#include "fb.h"
/*
* Read bytes from kernel address space for debugger.
@ -182,9 +183,9 @@ kdb_trap(type, tf)
int type;
register struct trapframe *tf;
{
#if NFB > 0
fb_unblank();
#endif
switch (type) {
case T_BREAKPOINT: /* breakpoint */
case -1: /* keyboard interrupt */

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.94 1997/12/04 15:33:42 tv Exp $ */
/* $NetBSD: machdep.c,v 1.95 1997/12/23 23:57:24 tv Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -130,6 +130,8 @@
#include <sparc/sparc/cache.h>
#include <sparc/sparc/vaddrs.h>
#include "fb.h"
vm_map_t buffer_map;
extern vm_offset_t avail_end;
@ -687,7 +689,9 @@ cpu_reboot(howto, user_boot_string)
romhalt();
}
#if NFB > 0
fb_unblank();
#endif
boothowto = howto;
if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
extern struct proc proc0;