Port-i386 archive

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

compiling LAMB kernel



It should be nice to wrap some variables and function with
Nxxx macros for kernelof the platform that does not have
PCI bus or display device like i386/conf/LAMB in Attic.
This patch may help it.


Index: sys/arch/i386/i386/mainbus.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/mainbus.c,v
retrieving revision 1.84
diff -u -r1.84 mainbus.c
--- sys/arch/i386/i386/mainbus.c        17 Apr 2009 21:07:58 -0000      1.84
+++ sys/arch/i386/i386/mainbus.c        25 Apr 2009 01:32:21 -0000
@@ -190,7 +190,9 @@
        if (sc->sc_pci == child)
                sc->sc_pci = NULL;
 
+#if NPCI > 0
        mp_pci_childdetached(self, child);
+#endif
 }
 
 /*
Index: sys/arch/x86/x86/x86_autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/x86/x86/x86_autoconf.c,v
retrieving revision 1.38
diff -u -r1.38 x86_autoconf.c
--- sys/arch/x86/x86/x86_autoconf.c     17 Feb 2009 11:16:10 -0000      1.38
+++ sys/arch/x86/x86/x86_autoconf.c     25 Apr 2009 01:32:21 -0000
@@ -69,6 +69,7 @@
 struct disklist *x86_alldisks;
 int x86_ndisks;
 
+#if NWSDISPLAY > 0 && NGENFB > 0
 static void
 x86_genfb_set_mapreg(void *opaque, int index, int r, int g, int b)
 {
@@ -77,6 +78,7 @@
        outb(0x3c0 + VGA_DAC_PALETTE, (uint8_t)g >> 2);
        outb(0x3c0 + VGA_DAC_PALETTE, (uint8_t)b >> 2);
 }
+#endif
 
 static void
 handle_wedges(struct device *dv, int par)
@@ -502,7 +504,9 @@
 void
 device_register(struct device *dev, void *aux)
 {
+#if NPCI > 0 || (NWSDISPLAY > 0 && NGENFB > 0)
        static bool found_console = false;
+#endif
 
        /*
         * Handle network interfaces here, the attachment information is

-- 
<tkhr.hash%gmail.com@localhost>



Home | Main Index | Thread Index | Old Index