NetBSD-Bugs archive

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

port-i386/43449: Patch required for system without PCI buses



>Number:         43449
>Category:       port-i386
>Synopsis:       Patch required for system without PCI buses
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 10 19:10:00 +0000 2010
>Originator:     Jarle Greipsland
>Release:        NetBSD 5.99.30
>Organization:
        
>Environment:
        
        
System: NetBSD darling.urc.uninett.no 5.99.30 NetBSD 5.99.30 (DARLING) #0: Thu 
Jun 10 20:15:59 CEST 2010 
jarle%darling.urc.uninett.no@localhost:/usr/obj/sys/arch/i386/compile/DARLING 
i386
Architecture: i386
Machine: i386
>Description:
For a memory-challenged old system I keep around, I normally build a
custom kernel with all of the non-needed stuff removed.  Thus the
config file has no references to PCI or USB or other modern devices.
Unfortunately the custom kernel would not build this time around.  I
had to apply the attached patches.
o The prototype for config_rootfound is declared in sys/device.h.  Without
  including this file the compiler complains about "implicit declaration"
  of said function.  Patch 1 explicitly includes sys/device.h in
  i386/i386/autoconf.c instead of hoping that some other header file
  will include it for us.
o The vga_posth variable is only used/referenced inside a #if NPCI>0/#endif
  block.  Arrange for the variable declaration to be enclosed similarly.
        
>How-To-Repeat:
        
>Fix:
Index: i386/i386/autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/autoconf.c,v
retrieving revision 1.95
diff -u -r1.95 autoconf.c
--- i386/i386/autoconf.c        21 Nov 2009 03:11:00 -0000      1.95
+++ i386/i386/autoconf.c        10 Jun 2010 18:53:04 -0000
@@ -56,6 +56,7 @@
 #include <sys/systm.h>
 #include <sys/buf.h>
 #include <sys/proc.h>
+#include <sys/device.h>
 
 #include <machine/pte.h>
 #include <machine/cpu.h>

Index: x86/x86/x86_autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/x86_autoconf.c,v
retrieving revision 1.50
diff -u -r1.50 x86_autoconf.c
--- x86/x86/x86_autoconf.c      24 Feb 2010 22:37:55 -0000      1.50
+++ x86/x86/x86_autoconf.c      10 Jun 2010 18:53:12 -0000
@@ -76,7 +76,7 @@
 static struct genfb_colormap_callback gfb_cb;
 static struct genfb_pmf_callback pmf_cb;
 #endif
-#ifdef VGA_POST
+#if defined(VGA_POST) && NPCI > 0
 static struct vga_post *vga_posth = NULL;
 #endif
 

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index