Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jan 1999 17:30:39 +0100
From:      German Tischler <tanis@gaspode.franken.de>
To:        osa@etrust.ru
Cc:        current@FreeBSD.ORG, luigi@labinfo.iet.unipi.it
Subject:   Re: Can't compile ELF kernel...
Message-ID:  <19990104173039.A16036@gaspode.franken.de>
In-Reply-To: <Pine.BSF.4.05.9901041830560.38914-100000@ozz.etrust.ru>; from osa@etrust.ru on Mon, Jan 04, 1999 at 06:33:55PM %2B0300
References:  <19990104155427.A11667@gaspode.franken.de> <Pine.BSF.4.05.9901041830560.38914-100000@ozz.etrust.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 04, 1999 at 06:33:55PM +0300, osa@etrust.ru wrote:
> 
> On Mon, 4 Jan 1999, German Tischler wrote:
> 
> > On Mon, Jan 04, 1999 at 04:51:22PM +0300, majordom@FreeBSD.ORG wrote:
> > > 
> > > Hello!
> > > Today, after cvsup source tree for my 3.0-CURRENT i try to compile
> > > kernel in ELF
> > > .....
> > > loading kernel
> > > ad1848.o: In function `ad1816_attach':
> > > ad1848.o(.text+0x1a3): undefined reference to `ad1816_write'
> > > ad1848.o(.text+0x1b0): undefined reference to `ad1816_write'
> > > ad1848.o(.text+0x1bd): undefined reference to `ad1816_write'
> > > ad1848.o(.text+0x1cd): undefined reference to `ad1816_write'
> > > ad1848.o(.text+0x1da): undefined reference to `ad1816_write'
> > > ad1848.o(.text+0x1e7): more undefined references to `ad1816_write' follow
> > > ad1848.o: In function `ad1816_attach':
> > > ad1848.o(.text+0x1fd): undefined reference to `ad1816_reinit'
> > > ad1848.o(.text+0x203): undefined reference to `ad1816_mixer_reset'
> > > *** Error code 1
> > > 
> > > Stop.
> > 
> > Just tried with a freshly checked out source tree and it worked.
> > Try to clean up.
> > 
> what i must clean up?
> 
> # cd /sys/i386/conf
> # setenv KERNFORMAT elf
> # config -r <MY_KERNEL_NAME>
> # cd ../../compile/<MY_KERNEL_NAME>
> # make depend
> # make
> then i c that messages...

I just found the bug. Please try the following diff for ad1848.c :
(the ad1816 code is only compiles if you config pnp ).

--- ad1848.c.orig	Mon Jan  4 11:40:13 1999
+++ ad1848.c	Mon Jan  4 17:23:15 1999
@@ -79,6 +79,7 @@
 static void ad_write_cnt(snddev_info *d, int reg, u_short data);
 static int ad_read(snddev_info *d, int reg);
 
+#if NPNP > 0
 /* ad1816 prototypes */
 
 /* IO primitives */
@@ -97,6 +98,7 @@
 static void     ad1816_mixer_reset(snddev_info * d);
 
 /* ad1816 prototypes end */
+#endif
 
 /*
  * device descriptors for the boards supported by this module.
@@ -202,6 +204,8 @@
     return mss_detect(dev) ? 8 : 0 ; /* mss uses 8 regs */
 }
 
+#if NPNP > 0
+
 static int
 ad1816_attach(struct isa_device *dev)
 {
@@ -227,6 +231,8 @@
     return 0 ;
 }
 
+#endif
+
 /*
  * the address passed as io_base for mss_attach is also the old
  * MSS base address (e.g. 0x530). The codec is four locations ahead.
@@ -243,8 +249,10 @@
 	d->name, dev->id_unit,
 	d->io_base, d->irq, d->dbuf_out.chan, d->dbuf_in.chan, dev->id_flags);
 
+#if NPNP > 0
     if (d->bd_id == MD_AD1816)
 	return ad1816_attach(dev);
+#endif
 
     dev->id_alive = 8 ; /* number of io ports */
     /* should be already set but just in case... */

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990104173039.A16036>