Subject: Re: MAKEDEV can't make /dev/audio* on Qube2
To: None <port-cobalt@netbsd.org>
From: Daniel C. Sinclair <daniel.c.sinclair@gmail.com>
List: port-cobalt
Date: 02/08/2005 20:06:17
On Wed, 9 Feb 2005 10:44:12 +1300 (NZDT), Matthew Luckie
<kluckie@ihug.co.nz> wrote:
> > If you read the MAKEDEV script, you find that it's mostly doing mknod.
> > The man page for mknod says to look here for more info about major
> > numbers:
> >
> > ``/usr/src/sys/arch/<arch>/<arch>/conf.c''
> >
> > But I just looked at a few architectures and conf.c doesn't exist.
>
> it does on my 1.6.1 system.
>
> /usr/src/sys/arch/cobalt/cobalt/conf.c
The <arch>/<arch>/conf.c files have apparently been replaced by a new
mechanism in 2.0. Each port has a 'majors' file. They are located in
<arch>/conf/majors.<arch>
> > But if you figure it out it would be nice to get smb devices built
> > too. I got the kernel to compile with SMBFS, but MAKEDEV doesn't build
> > the devices.
>
> there are currently no major numbers for audio or for smbfs (the
> major.i386 file references nsmb).
I found this post in the archives:
http://mail-index.netbsd.org/port-cobalt/2003/09/16/0000.html
I tried copying the 'audio' line from majors.i386 to majors.cobalt and
the audio* section from the i386 MAKEDEV to my Qube2's MAKEDEV. I
compiled the kernel and made the devices and it works! But it doesn't
work properly :(
I can play low quality sounds fine, but MP3s and 44KHz stereo WAVs
sound terrible. Even worse when I'm transferring stuff via the
network. I think this may be the PCI problem that has been mentioned
here recently. I will try that patch that was posted a while ago.
> i'm not sure what the process for obtaining a major number is. but i
> don't think it is as simple as getting one assigned and then the device
> magically working. someone else will have to field that one.
Following the advice in the link above worked (sort of) for me. But I
still don't know why different architectures have different device
numbers for the same device. I'm wondering what would happen if I
took the audio major number from a different architecture. For the
i386 port it was 42, but for others it's 36 or some other number.
Daniel