Linux-Development-Sys Digest #767, Volume #7 Thu, 13 Apr 00 14:13:19 EDT
Contents:
Re: device driver development and C++ (Kaz Kylheku)
Re: device driver development and C++ (Kaz Kylheku)
Re: How compatible is Linux with .. Linux (Klamer Schutte)
SEND_FD ioctl? (Konstantinos Agouros)
GUS PnP and Linux 2.2+
boot disk (customer)
is linux 2.3 available? (Yung-Hsiang Lu)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: device driver development and C++
Reply-To: [EMAIL PROTECTED]
Date: Thu, 13 Apr 2000 16:20:42 GMT
On 13 Apr 2000 07:56:10 GMT, Peter T. Breuer <[EMAIL PROTECTED]> wrote:
>Olivier Dufils <[EMAIL PROTECTED]> wrote:
>: I am developping a device driver for linux.
>: I first wrote it with the C language and it works perfectly.
>: I now need to have a C++-Class in my driver. I then gave the extension
>: ".cpp" to my driver file.
>: When i now try to compile the file (driver.cpp), i got a lot of
>: compiler-errors.
>
>: Can somebody help me?
>
>No. Think about it! Where is your memory handling coming from?
Memory handling can come from overriding operators new and delete in your
driver in terms of kmalloc and kfree. Anyway, who says that the driver has to
use new and delete? If they are not used, then the run time support won't be
required, any more than malloc, calloc, realloc and free required by
drivers written using C.
>And the exception handling? Got it yet?
Run-time exception handling support is not required by g++ generated code
unless you use the language feature.
The real problem is that nobody has sanitized the kernel header files
for use in C++.
--
#exclude <windows.h>
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: device driver development and C++
Reply-To: [EMAIL PROTECTED]
Date: Thu, 13 Apr 2000 16:22:08 GMT
On Thu, 13 Apr 2000 18:52:20 +1000, Mark McDougall <[EMAIL PROTECTED]> wrote:
>Olivier Dufils wrote:
>
>> I now need to have a C++-Class in my driver.
>
>Why do you *need* a C++ class in your driver?
>Was this your idea, or someone else's???
Why not? Maybe he already has a class that implements a significant part of
the driver logic.
--
#exclude <windows.h>
------------------------------
From: [EMAIL PROTECTED] (Klamer Schutte)
Crossposted-To: comp.os.linux.development.apps
Subject: Re: How compatible is Linux with .. Linux
Date: 13 Apr 2000 14:57:46 GMT
In article <8cf61b$2qi$[EMAIL PROTECTED]>, Peter T. Breuer wrote:
>If the library is compatible, it will have a compatible minor
>increment, else it will have an incompatible base version name
>(unless you are redhat, or a c++ compiler).
We were under the impression that glibc 2.1 should be a minor
increment to glibc 2.0 -- well not. So much for this reasoning.
And yes, that is my reason for still running a glibc2.0 system
with a fairly old egcs and glibc version -- if it ain't broken
don't fix it!
(interpretating ain't broken as: works for me without problems.)
Klamer
--
Klamer Schutte, E-mail: [EMAIL PROTECTED]
Electro-Optical Systems, TNO Physics and Electronics Laboratory
Tel: +31-70-3740469 -- Fax: +31-70-3740654 -- Mobile: +31-6-51316671
------------------------------
From: [EMAIL PROTECTED] (Konstantinos Agouros)
Subject: SEND_FD ioctl?
Date: 13 Apr 2000 07:48:07 +0200
Hi,
I recently came across the need to pass a fd from one process to another.
"Advanced programming in the Unix environment" gave me an answer with an
ioctl called sendfd. I searched /usr/include and /usr/src/linux and didn't
find it. Does this thing exist in Linux or how do I emulate this behaviour?
Thanks,
Konstantin
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: [EMAIL PROTECTED]
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
============================================================================
"Captain, this ship will not sustain the forming of the cosmos." B'Elana Torres
------------------------------
From: [EMAIL PROTECTED] ()
Subject: GUS PnP and Linux 2.2+
Date: 13 Apr 2000 17:48:06 GMT
I am having a problem getting the kernel to recognize my GUS PnP. Under
kernal 2.0.38 using isapnp it worked fine. Also, using the commercial OSS
driver it does work, but not all that well. For example, the mixer won't
control the mic input volume.
Specifically, following the linux/Documentation/sound/ultrasound documentation
I get the following error:
/lib/modules/2.2.14/misc/gus.o: init_module: Device or resource busy
when I try to load the sound module.
The following is the output from loading the commercial OSS drivers. Note
the resources addigned to the GUS card. I then rebooted the system
(including a power off) and tried to load the kernel drivers. No joy.
Output from that attempt is at the end of the file. (After the ======)
Any help appreciated.
Steve
[EMAIL PROTECTED]
OSS Output:
root:/root>soundon
This Open Sound System copy is licensed for limited evaluation use only.
You can order the permanent OSS license from http://www.opensound.com/order.html
*** The evaluation time is limited to 20 minutes ***
Your currently detected hardware combination works with the base OSS license
so you don't need to select any special options when ordering the permanent OSS
license.
Warning: Some of the devices failed to initialize.
See /usr/lib/oss/soundon.log for more info.
root:/root>cat /dev/sndstat
OSS/Linux 3.9.3h (C) 4Front Technologies 1996-2000
License serial number: E00000008
This Open Sound System copy is licensed for limited evaluation use only.
You can order the permanent OSS license from http://www.opensound.com/order.html
License will expire after: 12/2000
Options: ALL
*** Activity time of this evaluation version is limited ***
Build: 2.2.14-UP
Card config:
(Gravis Ultrasound at 0x210 irq 5 drq 5,6)
Audio devices:
Synth devices:
Midi devices:
Timers:
0: System clock
Mixers:
root:/root>cat /usr/lib/oss/soundon.log
Thu Apr 13 10:20:13 PDT 2000
Linux localhost.localdomain 2.2.14 #21 Wed Apr 12 09:36:54 PDT 2000 i586 unknown
This version (3.9.3h-000322) is compiled for Linux-2.2.14-UP
Kernel version: Linux localhost.localdomain 2.2.14 #21 Wed Apr 12 09:36:54 PDT 2000
i586 unknown
Modutils version: 2.1.121
=== Running /usr/local/bin/soundon ===
Install directory: /usr/lib/oss
Using the builtin sndshield module
Locally compiled sndshield Tue Apr 11 10:52:51 PDT 2000 Linux localhost.localdomain
2.3.99-pre3 #1 Tue Apr 11 08:44:06 PDT 2000 i586 unknown
Locally compiled sndshield Wed Apr 12 10:43:38 PDT 2000 Linux localhost.localdomain
2.2.14 #21 Wed Apr 12 09:36:54 PDT 2000 i586 unknown
sndshield loaded OK
soundbase loaded OK
midi loaded OK
ad1848 loaded OK
gus loaded OK
==== About to start the driver using the following config ===
/SECUREAUDIO OFF
/IRQEXCLUDE 3 4
/DMAEXCLUDE 2
-gus #Gravis Ultrasound
GUS ON P210 I5 D5 d6
++ pnpres.dat ++
Resources for PnP card #0
0000: 1e 56 00 01 e9 4e 00 00 32 0a 10 10 82 1d 00 47
0010: 72 61 76 69 73 20 55 6c 74 72 61 53 6f 75 6e 64
0020: 20 50 6c 75 67 20 26 20 50 6c 61 79 15 1e 56 00
0030: 00 02 82 0c 00 57 61 76 65 20 26 20 43 6f 64 65
0040: 63 31 00 22 00 98 2a 20 12 2a 80 12 47 01 20 02
0050: 20 02 01 10 47 01 20 03 20 03 01 08 47 01 2c 03
0060: 2c 03 01 04 31 01 22 00 9c 2a ea 19 2a ea 19 47
0070: 01 20 02 20 02 01 10 47 01 20 03 20 03 01 08 47
0080: 01 2c 03 2c 03 01 04 31 01 22 00 98 2a 20 12 2a
0090: 80 12 47 01 40 02 40 02 01 10 47 01 40 03 40 03
00a0: 01 08 47 01 4c 03 4c 03 01 04 31 01 22 00 9c 2a
00b0: ea 19 2a ea 19 47 01 40 02 40 02 01 10 47 01 40
00c0: 03 40 03 01 08 47 01 4c 03 4c 03 01 04 31 01 22
00d0: 00 9c 2a ea 19 2a ea 19 47 01 30 02 30 02 01 10
00e0: 47 01 30 03 30 03 01 08 47 01 3c 03 3c 03 01 04
00f0: 31 01 22 00 9c 2a ea 19 2a ea 19 47 01 50 02 50
0100: 02 01 10 47 01 50 03 50 03 01 08 47 01 5c 03 5c
0110: 03 01 04 31 01 22 00 9c 2a ea 19 2a ea 19 47 01
0120: 60 02 60 02 01 10 47 01 60 03 60 03 01 08 47 01
0130: 6c 03 6c 03 01 04 38 15 1e 56 00 01 02 82 0c 00
0140: 41 54 41 50 49 20 43 44 2d 52 4f 4d 1c 41 d0 06
0150: 00 31 00 22 00 1c 47 01 e8 01 e8 01 01 08 47 01
0160: ee 03 ee 03 01 02 31 01 22 00 1c 47 01 68 01 68
0170: 01 01 08 47 01 6e 03 6e 03 01 02 31 01 22 00 9c
0180: 47 01 70 01 70 01 01 08 47 01 76 03 76 03 01 02
0190: 38 15 1e 56 00 02 02 1c 41 d0 b0 2f 82 09 00 47
01a0: 61 6d 65 20 50 6f 72 74 47 01 01 02 01 02 01 01
01b0: 15 1e 56 00 03 02 82 08 00 53 42 20 41 75 64 69
01c0: 6f 22 a0 00 2a 02 08 47 01 88 03 88 03 01 02 15
01d0: 1e 56 00 04 02 82 08 00 47 4d 20 4d 75 73 69 63
01e0: 31 00 22 00 02 30 22 00 04 30 22 00 08 38 47 01
01f0: 30 03 36 03 02 02 79 12
++++
*** The evaluation time is limited to 20 minutes ***
Warning: Some of the devices failed to initialize
OSS/Linux 3.9.3h (C) 4Front Technologies 1996-2000
License serial number: E00000008
This Open Sound System copy is licensed for limited evaluation use only.
You can order the permanent OSS license from http://www.opensound.com/order.html
License will expire after: 12/2000
Options: ALL
*** Activity time of this evaluation version is limited ***
Build: 2.2.14-UP
Card config:
(Gravis Ultrasound at 0x210 irq 5 drq 5,6)
Audio devices:
Synth devices:
Midi devices:
Timers:
0: System clock
Mixers:
++++
crw------- 1 harringt sys 14, 3 Mar 31 10:14 /dev/dsp
crw-rw-rw- 1 harringt root 14, 3 Apr 1 14:37 /dev/dsp0
crw-rw-rw- 1 harringt sys 14, 19 Mar 31 10:14 /dev/dsp1
crw-rw-rw- 1 harringt root 14, 163 Apr 1 14:37 /dev/dsp10
crw-rw-rw- 1 harringt root 14, 179 Apr 1 14:37 /dev/dsp11
crw-rw-rw- 1 harringt root 14, 195 Apr 1 14:37 /dev/dsp12
crw-rw-rw- 1 harringt root 14, 211 Apr 1 14:37 /dev/dsp13
crw-rw-rw- 1 harringt root 14, 227 Apr 1 14:37 /dev/dsp14
crw-rw-rw- 1 harringt root 14, 243 Apr 1 14:37 /dev/dsp15
crw-rw-rw- 1 harringt root 14, 35 Apr 1 14:37 /dev/dsp2
crw-rw-rw- 1 harringt root 14, 51 Apr 1 14:37 /dev/dsp3
crw-rw-rw- 1 harringt root 14, 67 Apr 1 14:37 /dev/dsp4
crw-rw-rw- 1 harringt root 14, 83 Apr 1 14:37 /dev/dsp5
crw-rw-rw- 1 harringt root 14, 99 Apr 1 14:37 /dev/dsp6
crw-rw-rw- 1 harringt root 14, 115 Apr 1 14:37 /dev/dsp7
crw-rw-rw- 1 harringt root 14, 131 Apr 1 14:37 /dev/dsp8
crw-rw-rw- 1 harringt root 14, 147 Apr 1 14:37 /dev/dsp9
lrwxrwxrwx 1 root root 10 Apr 1 14:37 /dev/dspW -> /dev/dspW0
crw-rw-rw- 1 harringt root 14, 5 Apr 1 14:37 /dev/dspW0
crw-rw-rw- 1 harringt root 14, 21 Apr 1 14:37 /dev/dspW1
crw-rw-rw- 1 harringt root 14, 165 Apr 1 14:37 /dev/dspW10
crw-rw-rw- 1 harringt root 14, 181 Apr 1 14:37 /dev/dspW11
crw-rw-rw- 1 harringt root 14, 197 Apr 1 14:37 /dev/dspW12
crw-rw-rw- 1 harringt root 14, 213 Apr 1 14:37 /dev/dspW13
crw-rw-rw- 1 harringt root 14, 229 Apr 1 14:37 /dev/dspW14
crw-rw-rw- 1 harringt root 14, 245 Apr 1 14:37 /dev/dspW15
crw-rw-rw- 1 harringt root 14, 37 Apr 1 14:37 /dev/dspW2
crw-rw-rw- 1 harringt root 14, 53 Apr 1 14:37 /dev/dspW3
crw-rw-rw- 1 harringt root 14, 69 Apr 1 14:37 /dev/dspW4
crw-rw-rw- 1 harringt root 14, 85 Apr 1 14:37 /dev/dspW5
crw-rw-rw- 1 harringt root 14, 101 Apr 1 14:37 /dev/dspW6
crw-rw-rw- 1 harringt root 14, 117 Apr 1 14:37 /dev/dspW7
crw-rw-rw- 1 harringt root 14, 133 Apr 1 14:37 /dev/dspW8
crw-rw-rw- 1 harringt root 14, 149 Apr 1 14:37 /dev/dspW9
lrwxrwxrwx 1 root root 9 Apr 1 14:37 /dev/dspdefault -> /dev/dsp0
++++ dmesg printout follows ++++
Linux version 2.2.14 ([EMAIL PROTECTED]) (gcc version egcs-2.91.66
19990314/Linux (egcs-1.1.2 release)) #21 Wed Apr 12 09:36:54 PDT 2000
Detected 199906468 Hz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 79.87 BogoMIPS
Memory: 128132k/131072k available (1000k kernel code, 408k reserved, 1496k data, 36k
init)
Dentry hash table entries: 16384 (order 5, 128k)
Buffer cache hash table entries: 131072 (order 7, 512k)
Page cache hash table entries: 32768 (order 5, 128k)
CPU: Intel Pentium 75 - 200 stepping 0c
Checking 386/387 coupling... OK, FPU using exception 16 error reporting.
Checking 'hlt' instruction... OK.
Intel Pentium with F0 0F bug - workaround enabled.
POSIX conformance testing by UNIFIX
PCI: PCI BIOS revision 2.10 entry at 0xf04b0
PCI: Using configuration type 1
PCI: Probing PCI hardware
Linux NET4.0 for Linux 2.2
Based upon Swansea University Computer Society NET3.039
NET4: Unix domain sockets 1.0 for Linux NET4.0.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
TCP: Hash tables configured (ehash 131072 bhash 65536)
Starting kswapd v 1.5
parport0: PC-style at 0x378 [SPP]
Serial driver version 4.27 with no serial options enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
pty: 256 Unix98 ptys configured
lp0: using parport0 (polling).
ftape v3.04d 25/11/97 for Linux 2.2.14
[000] ftape-init.c (ftape_init) - installing QIC-117 floppy tape hardware drive ... .
[001] ftape-init.c (ftape_init) - ftape_init @ 0xc0219c4c.
[002] ftape-buffer.c (add_one_buffer) - buffer nr #1 @ c7fe1160, dma area @ c0008000.
[003] ftape-buffer.c (add_one_buffer) - buffer nr #2 @ c7fe1200, dma area @ c0018000.
[004] ftape-buffer.c (add_one_buffer) - buffer nr #3 @ c7fe12a0, dma area @ c0010000.
[005] ftape-calibr.c (time_inb) - inb() duration: 514 nsec.
[006] ftape-calibr.c (ftape_calibrate) - TC for `ftape_udelay()' = 555 nsec (at 10239
counts).
[007] ftape-calibr.c (ftape_calibrate) - TC for `fdc_wait()' = 2046 nsec (at 2559
counts).
Floppy drive(s): fd0 is 1.44M, fd1 is 1.2M
FDC 0 is a post-1991 82077
(scsi0) <Adaptec AHA-294X Ultra SCSI host adapter> found at PCI 11/0
(scsi0) Wide Channel, SCSI ID=7, 16/255 SCBs
(scsi0) Warning - detected auto-termination
(scsi0) Please verify driver detected settings are correct.
(scsi0) If not, then please properly set the device termination
(scsi0) in the Adaptec SCSI BIOS by hitting CTRL-A when prompted
(scsi0) during machine bootup.
(scsi0) Cables present (Int-50 YES, Int-68 NO, Ext-68 YES)
(scsi0) Downloading sequencer code... 413 instructions downloaded
scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.1.21/3.2.4
<Adaptec AHA-294X Ultra SCSI host adapter>
scsi : 1 host.
(scsi0:0:2:0) Synchronous at 20.0 Mbyte/sec, offset 15.
Vendor: TOSHIBA Model: CD-ROM XM-6401TA Rev: 1015
Type: CD-ROM ANSI SCSI revision: 02
Detected scsi CD-ROM sr0 at scsi0, channel 0, id 2, lun 0
(scsi0:0:3:0) Synchronous at 20.0 Mbyte/sec, offset 15.
Vendor: QUANTUM Model: VIKING 4.5 SCA Rev: 8600
Type: Direct-Access ANSI SCSI revision: 02
Detected scsi disk sda at scsi0, channel 0, id 3, lun 0
(scsi0:0:4:0) Synchronous at 10.0 Mbyte/sec, offset 8.
Vendor: QUANTUM Model: LIGHTNING 730S Rev: 241E
Type: Direct-Access ANSI SCSI revision: 02
Detected scsi disk sdb at scsi0, channel 0, id 4, lun 0
(scsi0:0:5:0) Synchronous at 10.0 Mbyte/sec, offset 8.
Vendor: MATSHITA Model: CD-R CW-7503 Rev: 1.08
Type: CD-ROM ANSI SCSI revision: 02
Detected scsi CD-ROM sr1 at scsi0, channel 0, id 5, lun 0
scsi : detected 2 SCSI cdroms 2 SCSI disks total.
Uniform CDROM driver Revision: 2.56
sr1: scsi3-mmc drive: 8x/20x writer cd/rw xa/form2 cdda tray
SCSI device sda: hdwr sector= 512 bytes. Sectors= 8899737 [4345 MB] [4.3 GB]
SCSI device sdb: hdwr sector= 512 bytes. Sectors= 1431760 [699 MB] [0.7 GB]
PPP: version 2.3.7 (demand dialling)
TCP compression code copyright 1989 Regents of the University of California
PPP line discipline registered.
Partition check:
sda: sda1 sda2 sda3 sda4
sdb: sdb1
VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 36k freed
Adding Swap: 132088k swap-space (priority -1)
VFS: Disk change detected on device sr(11,0)
ISO 9660 Extensions: RRIP_1991A
VFS: Disk change detected on device sr(11,0)
ISO 9660 Extensions: RRIP_1991A
registered device ppp0
Use of setserial/setrocket to set SPD_* flags is deprecated
OSS: 20 minutes of evaluation time left
++++++++
PCI devices found:
Bus 0, device 0, function 0:
Host bridge: Intel 82439HX Triton II (rev 3).
Medium devsel. Master Capable. Latency=32.
Bus 0, device 7, function 0:
ISA bridge: Intel 82371SB PIIX3 ISA (rev 1).
Medium devsel. Fast back-to-back capable. Master Capable. No bursts.
Bus 0, device 7, function 1:
IDE interface: Intel 82371SB PIIX3 IDE (rev 0).
Medium devsel. Fast back-to-back capable. Master Capable. No bursts.
I/O at 0xe800 [0xe801].
Bus 0, device 11, function 0:
SCSI storage controller: Adaptec AIC-7881U (rev 0).
Medium devsel. Fast back-to-back capable. IRQ 15. Master Capable. No bursts.
Min Gnt=8.Max Lat=8.
I/O at 0xe000 [0xe001].
Non-prefetchable 32 bit memory at 0xe6000000 [0xe6000000].
Bus 0, device 12, function 0:
VGA compatible controller: Matrox Millennium (rev 1).
Medium devsel. Fast back-to-back capable. IRQ 12.
Non-prefetchable 32 bit memory at 0xe5800000 [0xe5800000].
Prefetchable 32 bit memory at 0xe7000000 [0xe7000008].
processor : 0
vendor_id : GenuineIntel
cpu family : 5
model : 2
model name : Pentium 75 - 200
stepping : 12
cpu MHz : 199.906468
fdiv_bug : no
hlt_bug : no
sep_bug : no
f00f_bug : yes
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr mce cx8
bogomips : 79.87
++++
CPU0
0: 741713 XT-PIC timer
1: 13398 XT-PIC keyboard
2: 0 XT-PIC cascade
4: 188341 XT-PIC serial
13: 1 XT-PIC fpu
15: 13940 XT-PIC aic7xxx
NMI: 0
======================================================================
root:/root>modprobe sound
root:/root>insmod ad1848
root:/root>insmod gus io=0x210 irq=5 dma=5
/lib/modules/2.2.14/misc/gus.o: init_module: Device or resource busy
root:/root>cat /dev/sndstat
OSS/Free:3.8s2++-971130
Load type: Driver loaded as a module
Kernel: Linux localhost.localdomain 2.2.14 #21 Wed Apr 12 09:36:54 PDT 2000 i586
Config options: 0
Installed drivers:
Card config:
Audio devices:
Synth devices:
Midi devices:
Timers:
0: System clock
Mixers:
--
Steve
[EMAIL PROTECTED]
------------------------------
From: customer <[EMAIL PROTECTED]>
Subject: boot disk
Date: Thu, 13 Apr 2000 17:48:16 GMT
I am trying to install redhat 6.1, but the boot disk I created
boots, and starts and shows me the main menu. Once I select an option,
it starts to load and once it gets to the second file I get an error.
Does anyone know how I could get around this? Or what I could possibly
be doing wrong.
------------------------------
From: Yung-Hsiang Lu <[EMAIL PROTECTED]>
Subject: is linux 2.3 available?
Date: 13 Apr 2000 17:43:49 GMT
Hi,
I got a (experimental) package and it requires linux kernel 2.3. I
have seen some discussion about kernel 2.3 but I could not find it!
The latest version I found was 2.2.14 from redhat and slackware. Can
anybody help me figure out where to find 2.3? Is it stable enough to
try?
Thanks a lot!
Have a nice day.
--
Sincerely,
Yung-Hsiang Lu
[EMAIL PROTECTED]
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.development.system) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Development-System Digest
******************************