Terry Lambert | 1 Dec 07:27 2002
Picon

Re: documentation on kernel locks, mutexes?

Robert Watson wrote:
> On Mon, 25 Nov 2002, Terry Lambert wrote:
> > Yury Tarasievich wrote:
> > > I need to port some driver from linux to freebsd and, somehow,
> > > I can't find documentation on kernel locks and mutexes.
> > > There are no man pages, links from handbook are broken, and search on
> > > freebsd site gives nothing (besides the handbook itself).
> > >
> > > Where can I find some docs?
> >
> > Kernel documentation is poor, because interfaces are not as fixed in
> > stone as you might expect them to be to encourage third party
> > developement and porting efforts like yours.
> 
> Funny, the SMPng primitives seem in general to be fairly well documented.
> See my previous e-mail to Yury with a list of man page references.  It's
> certainly true that the source is a good reference to look at existing
> locking strategies, but there certainly do appear to be man pages for the
> locking primitives.

I was thinking more in terms of device driver information.  All
of the "how to write a driver for newbus", "how to write a CAM
driver", "how to use devfs from the kernel", "what XXX to do in
FreeBSD, given YYY in Linux", "how to port a driver from Linux
to FreeBSD", etc., are missing.

While it's true that kernel locks and mutexes are documented for
SMPng, he posted to -hackers, not -current, and so he's probably
not interested in -current primitives that aren't available in
the 4.x -RELEASE and -STABLE branches.
(Continue reading)

Reinier Kleipool | 1 Dec 10:35 2002

question about shared libraries and the library cache.

Hello,

  I have a question about shared libraries. I have compiled a new library,
and installed it in /usr/local/lib. If I then ask ldconfig(8) to updates its
hints file, the new library is not listed in the hints file. In
/usr/local/lib I see two other libraries that also are not listed:
pam_ldap.so pam_smb_auth.so.

  My question: What is so special about these libraries that they are not
listed in the ldconfig hints files? And for my own library: What do I need
to do to make my own library listed in ldconfig? Are there special ld(1)
flags needed to get it listed?

Kind regards,
Reinier Kleipool

To Unsubscribe: send mail to majordomo <at> FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message

Terry Lambert | 1 Dec 11:46 2002
Picon

Re: question about shared libraries and the library cache.

Reinier Kleipool wrote:
>   I have a question about shared libraries. I have compiled a new library,
> and installed it in /usr/local/lib. If I then ask ldconfig(8) to updates its
> hints file, the new library is not listed in the hints file. In
> /usr/local/lib I see two other libraries that also are not listed:
> pam_ldap.so pam_smb_auth.so.
> 
>   My question: What is so special about these libraries that they are not
> listed in the ldconfig hints files? And for my own library: What do I need
> to do to make my own library listed in ldconfig? Are there special ld(1)
> flags needed to get it listed?

You have to add /usr/local/lib to the ldconfig search path, e.g.:

	ldconfig -m /usr/local/lib

If you want them to be there at boot time, you need to add:

	ldconfig_paths="/usr/lib /usr/local/lib"

in /etc/rc.conf.

-- Terry

To Unsubscribe: send mail to majordomo <at> FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message

Yar Tikhiy | 1 Dec 12:21 2002
Picon

Re: Review by USB wizard wanted

On Tue, Nov 26, 2002 at 03:26:19PM -0800, Nate Lawson wrote:
> I'm not a usb expert but I think your patch deserves some comments.

Thank you!

> On Mon, 25 Nov 2002, Yar Tikhiy wrote:
> > First, sometimes (especially, if twitching a memory stick out of
> > the reader while the device is being detected) a transfer to the
> > umass device is initiated *after* the device is already gone.  System
> > panic follows.  The transfer is initiated when destroying the default
> > pipe to the device.  Indeed, the current usb_subr.c code will detach
> > child devices first and destroy the default pipe then.  Reverting
> > this order eliminates the panic.
> > 
> > Second, twitching a memory stick can cause CAM jam.  That happens
> > because the umass detach routine won't wake up the upper layer when
> > processing a device with a pending transfer on it.
> > 
> > Patches addressing the above problems are attached below.
> > [...]
> > --- usb_subr.c.orig	Sat Nov 16 12:07:50 2002
> > +++ usb_subr.c	Fri Nov 22 15:45:35 2002
> >  <at>  <at>  -1292,8 +1292,6  <at>  <at> 
> >  {
> >  	int ifcidx, nifc;
> >  
> > -	if (dev->default_pipe != NULL)
> > -		usbd_kill_pipe(dev->default_pipe);
> >  	if (dev->ifaces != NULL) {
> >  		nifc = dev->cdesc->bNumInterface;
(Continue reading)

David Yeske | 1 Dec 14:56 2002
Picon

cvs -rbranch:date + val-tags

I am working on getting cvs more usable so I don't have to worry about val-tags when I have read
only media, and so I can do stuff like this.

cvs update -rRELENG_4:2002/10/01

cvs diff -rRELENG_4:2002/09/01 -rRELENG_4:2002/09/30

I would appreciate any testing or feedback.  I have tested this some, but it probably has bugs.

http://pigseye.kennesaw.edu/~dyeske/freebsd/patch-src_contrib_cvs

I have also tried modifying the HEAD branch of cvs/ccvs from cvshome, but it seems to blow away
the $FreeBSD$ tag with or without my patch.

Regards,
David Yeske

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

To Unsubscribe: send mail to majordomo <at> FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message

David Yeske | 1 Dec 15:13 2002
Picon

Option 60: Vendor class identifier = "FreeBSD:i386:pxeboot"

Pxeboot currently sends "PXEclient" for option 60, so it is not easy to differentiate between
pxeboot and a real pxe client.

I modified libstand to follow the pattern per src/sys/nfsclient/bootp_subr.c, although maybe I
should ask for MACHINE and ostype.

I would appreciate any testing or feedback.  I have tested this some, but it probably has bugs.

http://pigseye.kennesaw.edu/~dyeske/freebsd/patch-src_lib_libstand

Regards,
David Yeske

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

To Unsubscribe: send mail to majordomo <at> FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message

Hiten Pandya | 1 Dec 15:36 2002

Re: documentation on kernel locks, mutexes?

--- Terry Lambert <tlambert2 <at> mindspring.com> wrote:
 > I was thinking more in terms of device driver information.  All
 > of the "how to write a driver for newbus", "how to write a CAM
 > driver", "how to use devfs from the kernel", "what XXX to do in
 > FreeBSD, given YYY in Linux", "how to port a driver from Linux
 > to FreeBSD", etc., are missing.

Well, there is a chapter, that gives a good introduction to newbus 
in the Developers Handbook.  IMHO, it gives enough pointers to the 
reader, so he can begin his journey on Newbus Avenue.

I will continue documenting it, as I learn more.  Once my exams are 
over, I will start looking into how ACPI affects Newbus etc, and 
things like that.  We lack information on bus_space(9) and 
bus_dma(9), the latter one is mostly finished, and I will resume on 
it, as time permits. URL:
http://www.FreeBSD.ORG/doc/en/books/developers-handbook/newbus.html

	on -CURRENT:
	# apropos 9 | less

Indicates that we have a good deal of manual pages, which document 
kernel interfaces.  Its just a matter of someone putting their time 
in documenting it for the Developers-Handbook.  Thanks to Doug 
Rabson for the excellent set of VFS manual pages and many others! 
FWIW, there is a doc, somewhere on the net, in which R. Watson has 
documented the VOP table, which is better than nothing.

Regarding "what XXX to do in FreeBSD, given YYY in Linux", is quite 
a difficult topic to cover, because, documenting each opposite will 
(Continue reading)

Felix Schlesinger | 1 Dec 15:52 2002
Picon

Interrupt Timeouts Zoltrix pcm card

Hi

I have a Zoltrix Nightingale (CMI8738) PCI card in my PC. It is detected
by pcm, but when any sound is played, I only get interrupt timeouts
("pcm0:play:0: play interrupt timeout, channel dead" from the
kernel). Its interessting that mpg123 e.g. exits after a few seconds
without generating an error (Decoding of ... finished).
With the OSS drivers its exactly the same, just the error-message is a
little different) I tested with different configurations (GENERIC or
custom (minimal) kernel, removing all other cards, chaning PCI-slots,
...) but nothing seemed to have any effect on the problem, so its not
due to IRQ-sharing or something like that. The card is known to work
under FreeBSD, but some people reported problems with the CMI8738-Chip
in connection with APM and laptops that lead to the same message. This
however is not the case here. I included all relevant output below, if I
forgot anything please tell me, and I will post it.

%uname -pr
4.7-STABLE i386
%dmesg (boot -v)
Copyright (c) 1992-2002 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
	The Regents of the University of California. All rights reserved.
FreeBSD 4.7-STABLE #2: Sun Dec  1 12:05:35 CET 2002
    root <at> felix.schlesinger.dyndns.org:/usr/src/sys/compile/kern2
Calibrating clock(s) ... TSC clock: 349058787 Hz, i8254 clock: 1193153 Hz
CLK_USE_I8254_CALIBRATION not specified - using default frequency
Timecounter "i8254"  frequency 1193182 Hz
CLK_USE_TSC_CALIBRATION not specified - using old calibration method
Timecounter "TSC"  frequency 349069023 Hz
(Continue reading)

Peter Pentchev | 1 Dec 16:59 2002
Picon

Re: question about shared libraries and the library cache.

On Sun, Dec 01, 2002 at 02:46:16AM -0800, Terry Lambert wrote:
> Reinier Kleipool wrote:
> >   I have a question about shared libraries. I have compiled a new library,
> > and installed it in /usr/local/lib. If I then ask ldconfig(8) to updates its
> > hints file, the new library is not listed in the hints file. In
> > /usr/local/lib I see two other libraries that also are not listed:
> > pam_ldap.so pam_smb_auth.so.
> > 
> >   My question: What is so special about these libraries that they are not
> > listed in the ldconfig hints files? And for my own library: What do I need
> > to do to make my own library listed in ldconfig? Are there special ld(1)
> > flags needed to get it listed?
> 
> You have to add /usr/local/lib to the ldconfig search path, e.g.:
> 
> 	ldconfig -m /usr/local/lib
> 
> If you want them to be there at boot time, you need to add:
> 
> 	ldconfig_paths="/usr/lib /usr/local/lib"
> 
> in /etc/rc.conf.

I think that /etc/defaults/rc.conf's ldconfig_paths variable has
contained /usr/local/lib since at least February 1999, which is the
start of the src/etc/defaults/rc.conf CVS history.  Thus, all you need
to worry about is running ldconfig(8) by hand, in which case you should
not forget /usr/X11R6/lib, /usr/local/lib, and any other library
directories where ports might have installed stuff, such as MySQL's
/usr/local/lib/mysql/.
(Continue reading)

Adam Migus | 1 Dec 19:01 2002

ports building question

When building selected ports for other systems on a main server
I've run into a problem.  The main server fulfills runtime and
library dependencies while the client I'm installing on doesn't.
 I wish to build all the ports necessary for a particular port,
regardless of the build system.  I want this so that I can "make
install" on the client, without failing dependencies and/or
compiling anything.
I've managed to work around this by writing a script to
calculate and run around compiling all the dependancies.  But if
there's some way this is done without doing this, it would be
helpful.
--
Adam Migus (adam <at> migus.org) (amigus <at> TrustedBSD.org)
TrustedBSD (http://www.trustedbsd.org) | The Power To Secure

To Unsubscribe: send mail to majordomo <at> FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message


Gmane