Linux-Development-Sys Digest #269, Volume #8 Thu, 9 Nov 00 20:13:17 EST
Contents:
Re: What is Linux equivalent of Mac Toolbox? (T)
Re: syslog() in kernel module (Nick Maclaren)
Re: mmap() vs. lseek() on /dev/mem ("Spam Me Not")
Device driver for RS422 ("Anh Ngo")
Re: Is that process a thread? (Rich Walker)
Re: mmap() vs. lseek() on /dev/mem (Gary Parnes)
Re: Device driver for RS422 (Pete Zaitcev)
vector containers in g++? ("Christoper McClan")
Re: linux doesn't detect my LNE100TX ethernet card (HomerWelch)
Re: What C++ compiler to use for dev if you don't want to give away source for
your program? (Martin von Loewis)
Re: non-portable port (George MacDonald)
Re: Where can find the source code for the bash or ash? (George MacDonald)
Re: porting from SCO to linux problems? (George MacDonald)
Man-pages - section 9 (kernel reference guide) -- would someone please help me?!?
(Rui Antunes)
Re: Man-pages - section 9 (kernel reference guide) -- would someone please help
me?!? ("The infamous \"Brian\"")
Re: Is that process a thread? (Ulrich Weigand)
Re: Kernel Mismatch Right out of the Box (Rui Antunes)
Re: Man-pages - section 9 (kernel reference guide) -- would someone please help
me?!? (Rui Antunes)
Driver for SIIG multiport serial/parallel card (Kenneth Porter)
----------------------------------------------------------------------------
From: T <[EMAIL PROTECTED]>
Subject: Re: What is Linux equivalent of Mac Toolbox?
Date: Thu, 09 Nov 2000 10:10:35 -0800
Given your idea of <draw some graphs and show some PICTs in Linux>,
you might benefit by looking into SVGALib. It's a c library of
graphics functions you can use and not have to get into X window
programming. I'm not out to promote it because I'm kinda new to Linux
too, but I think Doom uses it and my favorite graphics viewer, zgv, is
based on it too, I believe.
On Sat, 07 Oct 2000 15:28:58 -0400, [EMAIL PROTECTED]
(jazz) wrote:
>Hi,
>
>I want to draw some graphs and show some PICTs in Linux, as I did on
>Macintoshes. What is built in or available to do this kind of graphics?
>
>Thanks
>Jazz
------------------------------
From: [EMAIL PROTECTED] (Nick Maclaren)
Subject: Re: syslog() in kernel module
Date: 9 Nov 2000 18:24:02 GMT
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Pete
Zaitcev) writes:
|>
|> When Nick posts stuff like the above, he asks for a discussion
|> akin to one that happened between Linus Torvalds and Andy
|> Tannenbaum about the merits of microkernel.
Perhaps. But that wasn't my point. I was objecting to the claim
that someone doesn't want something because the provider doesn't
want to provide it. This leads to brain-rot - for example:
From the late 1970s, I was a prophet crying in the wilderness
saying that MS-DOS was unsuitable for personal computers, and
that a proper operating system was needed. Virtually everybody
outside computer science research said that ordinary users did
not want their systems to have protection, as it would prevent
their applications from doing everything that was wanted.
This majority viewpoint caused the application developers and
end users to reject any attempt at adding protection, and
several systems deliberately disabled it in order to try to
get acceptance. It took nearly 20 years for that mindset to
be eroded - and guess which system was responsible for doing
the erosion? :-)
Anyway, the rest of your response indicates that you are thinking
about a different era of designs from the ones that I was thinking
of. But, no matter, because it is irrelevant to my main point,
which was the one above.
Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QG, England.
Email: [EMAIL PROTECTED]
Tel.: +44 1223 334761 Fax: +44 1223 334679
------------------------------
From: "Spam Me Not" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: mmap() vs. lseek() on /dev/mem
Date: Thu, 9 Nov 2000 10:49:31 -0800
>
> Mmmmmm, when I remove the range check, copy_to_user() chokes, and I get an
> EFAULT.
>
> I guess there are subtleties of the Linux MMU that are going over my head.
In
> any case, thanks for the pointer. It was worth a shot...
>
> --Gary Parnes
> [EMAIL PROTECTED]
>
>
I didn't bother reading further into the function as soon as I saw the
first line of code that explained why it didn't work for you... :)
Yeah, there's probably more to do to get it to work, perhaps you
must read the memory yourself (using bus addresses and the official
functions that are used to access bus addresses (readb/writeb)),
store it in a kernel buffer, then copy that to user, or something...
------------------------------
From: "Anh Ngo" <[EMAIL PROTECTED]>
Subject: Device driver for RS422
Date: Thu, 9 Nov 2000 11:12:58 -0800
Hi,
I am looking for the device driver for the RS422, 1.5 Mbit/sec. Anybody
knows where to find it?
Thank you
------------------------------
Subject: Re: Is that process a thread?
From: Rich Walker <[EMAIL PROTECTED]>
Date: 09 Nov 2000 16:11:42 +0000
Reply-To: Rich Walker <[EMAIL PROTECTED]>
Maciej Golebiewski <[EMAIL PROTECTED]> writes:
> George MacDonald wrote:
>
> > I agree with your approach, my question was more about the capabilities of
> > Linux specifically. Can Linux lock pages in memory, either at the kernel
> > level or in user land? Hmm, I think I'll go look at the code! How many
> > times have I done that now!!!
>
> man mlock
>
> But I have no idea if, and how, you could use it to use it for locking shlib
> (and I believe the kernel will unlock it automatically when the
> process dies).
So, ask the watchdog process to lock the memory down?
cheers, Rich.
--
rich walker | technical person | Shadow Robot Company | [EMAIL PROTECTED]
front-of-tshirt space to let 251 Liverpool Road |
London N1 1LX | +UK 20 7700 2487
------------------------------
From: Gary Parnes <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: mmap() vs. lseek() on /dev/mem
Date: Thu, 09 Nov 2000 13:13:23 -0600
The light bulb just ignited above my head...
I was examining some drivers that performed slave mode PCI memory accesses. In
all cases, they had to use ioremap() to get the card's physical region mapped
into the MMU. The end result of ioremap() is a manipulation of the page table
entries (PTE's). So I examined /dev/mem's mmap method to figure out what it
does. Sure enough, it achieves its magic via manipulating PTE's.
So now it makes sense. You can't mmap() the RAM space because it would require
a change in the page tables, and if you do that to the kernel's memory space,
Bad Things(tm) can happen.
And I suppose that means that an lseek method to a PCI device could work if and
only if it has a driver doing an ioremap() on its behalf first.
--Gary Parnes
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Pete Zaitcev)
Subject: Re: Device driver for RS422
Date: Thu, 09 Nov 2000 19:47:47 GMT
On Thu, 9 Nov 2000 11:12:58 -0800, Anh Ngo <[EMAIL PROTECTED]> wrote:
> Hi,
> I am looking for the device driver for the RS422, 1.5 Mbit/sec. Anybody
> knows where to find it?
> Thank you
RS422 is just a fancy serial port, not even multidrop.
Search for a driver for your chip.
--Pete
------------------------------
From: "Christoper McClan" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development
Subject: vector containers in g++?
Date: Thu, 09 Nov 2000 21:20:37 +0000
I'm running Mandrake 7.1, and am trying to use vector structures. I
understand that this is possible as it is included in the STL (Standard
Template Library). However, I don't seem to have "vector.h", I managed
to get a copy of stl.zip from HP's web site but the include files in that
wanted "iostream.h" which strangley I don't seem to have either...
What am I missing or doing wrong?
Thanks,
CIM.
------------------------------
From: HomerWelch <[EMAIL PROTECTED]>
Subject: Re: linux doesn't detect my LNE100TX ethernet card
Date: Thu, 09 Nov 2000 21:22:12 GMT
Sudhindra Suresh Bengeri wrote:
>
> Hi,
>
> I just isntalled kernel 2.2.17 hoping that it would have support for my
> LinkSys LNE100TX Fast Ethernet Adapter. But is didn't.
>
> I tried 2 things:
> 1. I found the code for the linksys pci cards in
> /usr/src/linux/drivers/net/tulip.c, it was also compiled during make. I
> copied the tulip.o to the /lib/modules/2.2.17/net
>
> But /sbin/depmod -a <- did not find it, I tried to force it to look for in
> that dir by including the following in /etc/modules.conf
> path[net]=/lib/modules/2.2.17/net
>
> even this did not work.
>
> 2. I downloaded tulip.c/kern_compat.h as directed by the driver disk that
> came along with the ethernet card. This could not be compiled. From the
> error messages it looked like the code with accessing non existant members
> of a struct or some like that.
>
> Pls. lemme know what should I do next??
>
>
Check out: http://www.scyld.com/network/tulip.html
It should have the latest drivers and instructions on how to
install it.
--
Homer J. Welch [EMAIL PROTECTED]
Troy, Michigan
------------------------------
From: Martin von Loewis <[EMAIL PROTECTED]>
Subject: Re: What C++ compiler to use for dev if you don't want to give away source
for your program?
Date: 09 Nov 2000 22:32:35 +0100
"D. Stimits" <[EMAIL PROTECTED]> writes:
> If you directly copy someone's code into yours, then you have to follow
> their licensing.
Sure. But you should know what "their licensing" is. From crtstuff.c:
<quote>
In addition to the permissions in the GNU General Public License, the
Free Software Foundation gives you unlimited permission to link the
compiled version of this file into combinations with other programs,
and to distribute those combinations without any restriction coming
from the use of this file. (The General Public License restrictions
do apply in other respects; for example, they cover modification of
the file, and distribution when not linked into a combine
executable.)
</quote>
> I have no doubts at all though that libgcc.a would be owned by the
> same entity that created gcc/g++, just talking aloud here.
There is nothing wrong with talking aloud per se; please try to check
the facts before you do so the next time, though.
Regards,
Martin
------------------------------
From: George MacDonald <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps
Subject: Re: non-portable port
Date: Thu, 09 Nov 2000 21:46:41 GMT
Josef Moellers wrote:
>
> George MacDonald wrote:
> >
> > Josef Moellers wrote:
> > >
> > > George MacDonald wrote:
> > > >
> > > > T wrote:
> > > > >
> > > > > I'd like to revive an old dos project that used inline assembly calls
> > > > > to BIOS and direct screen writes. Trying to get up to speed with Linux
> > > > > programming, I've been looking at some sources and reading what I can
> > > > > find. It looks like both (BIOS calls and direct screen writes) are
> > > > > verboten and in the domain of the Linux kernel. Learning about modules
> > > > > and kernel will take too long although I plan to keep at it. I looked
> > > > > at SVGALib, but my app doesn't need graphics-- it writes to text
> > > > > screen. Are there any viable approaches (other than give it up:~) and
> > > > > stuff like curses?
> > > >
> > > > Try
> > > >
> > > > man console_codes
> > >
> > > Just don't!
> >
> > Hey dufus, read all of my posting(and understand it) before commenting. Perhaps
>
> Sorry, the name's Josef and I prefer to be called that way (Alternatives
> are "Herr M�llers", "Mr. M�llers", "M. M�llers", "M�llers-san", in
> another context "Sensei" might be acceptable, to name but a few). I did
> use a real name in the "From" part, although umlauts are not supported.
>
Oops, sorry for being so impolite, I must have been tired. Lack of sleep
and civility due to electionitis. I must add USENET posting to the
list(programming, playing chess, ...) of things *not* to do on 4 hr's
sleep.
IMHO I don't think reading a man page is *too* harmful to ones programming
style. I certainly agree that one should leverage code as much as possible
as long as it is reasonable to do so. If you notice the general tone of the
article was to *not* prejudge his particular situation. Instead I offered
information related to the historical aspects of how those sorts of
problems have been solved before and some of the reasons why.
If someone asked me about how to direct output to the printer like you do
in the dos shell. I would explain about the very different mechanism
used on Linux, including reasons for spooling ... Then I would breifly
explain about the environment and the PRINTER variable. I'd very
probably send them to a man page for more details, i.e.
man bash
hopefully that might clue them in a bit.
G-san
--
We stand on the shoulders of those giants who coded before.
Build a good layer, stand strong, and prepare for the next wave.
Guide those who come after you, give them your shoulder, lend them your code.
Code well and live! - [EMAIL PROTECTED] (7th Coding Battalion)
------------------------------
From: George MacDonald <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To:
comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.questions
Subject: Re: Where can find the source code for the bash or ash?
Date: Thu, 09 Nov 2000 23:15:31 GMT
Alan Po wrote:
>
> Dear all
>
> Where can I find the source code for the bash?
It's usually bundled with the source for your distribution. For
eaxmple if you are running Red Hat it's on one of their distribution
disks. You can also go to their web site and grab a source RPM.
> When the bash start?
Usualy Friday about 4:00 p.m. Er, oh you mean the shell, ah well
that's usually started when you login! Although the system also
uses the shell when booting to start up the background programs(demons).
> Can I
> select another shell at the boot time?
Boot or login?
--
We stand on the shoulders of those giants who coded before.
Build a good layer, stand strong, and prepare for the next wave.
Guide those who come after you, give them your shoulder, lend them your code.
Code well and live! - [EMAIL PROTECTED] (7th Coding Battalion)
------------------------------
From: George MacDonald <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps
Subject: Re: porting from SCO to linux problems?
Date: Thu, 09 Nov 2000 23:38:00 GMT
Martin Collins wrote:
>
> Hi,
>
> I've gotten the job of porting a set of programs and
> a daemon from SCO Opendesktop to Caldera linux.
> Some of the software is in ansi C and the rest in C++.
> There is no X interface. Sockets are used however.
>
> Does anybody have any experience in this line and can
> point out possible sources of difficulty. I'm supposed to
> estimate the effort invloved.
Estimating porting efforts are very difficult. There are many
factors that effect the result:
Size of code
Complixity of code
How "portable" the code was written
Usage of platform specific features
Knowledge of the code
Your knowledge of porting in general
Your knowledge of the two platforms
In reality there is no way to know for sure until the job is
done. I have ported code in a couple of weeks that others
could never figure out how to do because of the code complexity.
The nice thing about porting to Linux, is that you know it can
always be done, since you can rewrite parts of the kernel if required!
Lastly, if you don't know the code then it is sometimes easier(and
always more fun) to rewrite it.
--
We stand on the shoulders of those giants who coded before.
Build a good layer, stand strong, and prepare for the next wave.
Guide those who come after you, give them your shoulder, lend them your code.
Code well and live! - [EMAIL PROTECTED] (7th Coding Battalion)
------------------------------
From: [EMAIL PROTECTED] (Rui Antunes)
Crossposted-To: alt.os.linux
Subject: Man-pages - section 9 (kernel reference guide) -- would someone please help
me?!?
Date: Thu, 09 Nov 2000 23:37:20 GMT
I have RedHat 7.0 that comes without the section 9 (kernel reference
guide) of the man-pages. Where can I find those man-pages?
Thanks in advance,
Rui Antunes
------------------------------
From: "The infamous \"Brian\"" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux
Subject: Re: Man-pages - section 9 (kernel reference guide) -- would someone please
help me?!?
Date: Thu, 09 Nov 2000 23:46:32 GMT
Hi Rui:
Rui Antunes wrote in message <[EMAIL PROTECTED]>...
>I have RedHat 7.0 that comes without the section 9
>(kernel reference guide) of the man-pages. Where can
>I find those man-pages?
Try;
www.linuxdoc.org/
To learn about the Linux kernel, try;
www.linuxhq.com/guides/TLK/tlk.html
Best regards,
Brian
------------------------------
From: [EMAIL PROTECTED] (Ulrich Weigand)
Subject: Re: Is that process a thread?
Date: 10 Nov 2000 01:10:55 +0100
Maciej Golebiewski <[EMAIL PROTECTED]> writes:
>George MacDonald wrote:
>>
>> Maciej Golebiewski wrote:
>> >
>> > Not really! Consider this: you have a process A that in its main thread
>> >
>> > pthread_create (...) ---> creates thread that is a process B
>> > fork () ---> forks process C
>> >
>> > Then /proc/#/maps for all A,B and C process (and the additional process which
>> > is the thread manager for A) will contain libpthread. So following your logic
>> > C would get classified as a thread for A (libpthread in maps nad PPID == A)
>> > even though it was fork'ed and not pthread_create'ed!
>> What is C then? If B was running in a thread context then so will C once it is
>> forked, no? Unless it calls routines to "end" that thread. If it does terminate the
>> "thread" will C then terminate the B thread?
>I was sure that C is a separate process with no interference with lock/threads
>created by A, but a few experiments have shown I'm wrong. I.e. C can call
>pthread_detach on B and it will return no error, even though B should not be
>known to C (IMHO at least). Moreover, if there are mutexes, C will be able to lock
>them only if they were unlocked at the moment of fork.
>If C call pthread_kill on B (with SIGTERM for example), A, B and the thread
>manager will terminate, but C will keep running.
>Funny, eh? I'm not sure how much of that is specific to linux implementation
>of pthreads... I wonder how does it look like on Solaris or other platforms...
Well, you shouldn't do this ;-) If you think about what's going on here,
it should become clear why you are seeing strange effects:
The fork() call creates a new address space that initially contains an
exact *copy* of the old address space shared by A and B (this is of course
implemented not by actually copying, but by employing copy-on-write).
This new address space thus contains a *copy* of the internal data
structures maintained by libpthread, so that if you call pthread
routines from within C, the library will think it is still a sibling
thread of A (and B). However, if it tries to actually interact with
its 'siblings', things will fail because it's PID is in fact unknown
to the library, and shared data structures will simply diverge ...
Similarly, a mutex is just a word in memory, so if a mutex is in the
locked state, its copy in C will also be in the locked state. However,
once the mutex holder (A or B) releases its lock, only the copy of the
mutex in the A/B address space will get updated, the copy in C will remain
locked forever.
--
Dr. Ulrich Weigand
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Rui Antunes)
Crossposted-To: linux.redhat
Subject: Re: Kernel Mismatch Right out of the Box
Date: Fri, 10 Nov 2000 00:01:22 GMT
On Fri, 03 Nov 2000 19:26:49 -0800, root <[EMAIL PROTECTED]> wrote:
>I just purchased RedHat 7 Professional Version ( $180!!!! ) I figured
>I'd bite the bullet, not get the $30 or the $60 version.
>
>Enough already. I install the damn thing and when I recompile my device
>drivers from scratch, I get a
>Kernel Mismatch warning error during installation. Saying the driver was
>compiled for 2.2.16-22 and this kernel is 2.4.something.
>
>I redefine UTS_RELEASE to be 2.2.16-22 for the hell of it, and my
>drivers compiled and installed correctly. But they don't work.
>
>Can someone tell me what the f I am doing incorrectly? During the
>installation I happened to glance at the
>kernel version and it was 2.2.16-22. Why does this version think it is
>2.4?
>
>Also, maybe I am no longer with the program, but why does everything on
>RedHat point to BUY NOW? I can't get the support I want. I called up,
>and after navigation through the phone system, the phone "mysteriously"
>hung up on me after I selected tech support.
>
>Is this what Linux has become? Is this how it is now? I really had my
>hopes high on Linux but I can smell the
>yearnings for corporate profit ahead. This will surely doom Linux, or
>hopefully only RedHat.
>
>-Joseph Virzi
>
I had the same problem. I first thought that it was a bug - however I
found that if you use the directory /usr/src/linux/include instead of
the usual /usr/include (as your include directory:
CFLAGS = -I$(INCLUDE_DIRECTORY) that error vanished! (I still get a
warning about the assembler changing attributes in .modinfo or
something...)
Rui Antunes
------------------------------
From: [EMAIL PROTECTED] (Rui Antunes)
Crossposted-To: alt.os.linux
Subject: Re: Man-pages - section 9 (kernel reference guide) -- would someone please
help me?!?
Date: Fri, 10 Nov 2000 00:33:14 GMT
On Thu, 09 Nov 2000 23:46:32 GMT, "The infamous \"Brian\""
<[EMAIL PROTECTED]> wrote:
>Hi Rui:
>
>Rui Antunes wrote in message <[EMAIL PROTECTED]>...
>>I have RedHat 7.0 that comes without the section 9
>>(kernel reference guide) of the man-pages. Where can
>>I find those man-pages?
>
>
>Try;
>
>www.linuxdoc.org/
This site has many man-pages - but all without section 9!
>
>To learn about the Linux kernel, try;
>
>www.linuxhq.com/guides/TLK/tlk.html
I've already downloaded it (but thanks anyway)
>
>Best regards,
>
>Brian
Thanks,
Rui Antunes
------------------------------
From: [EMAIL PROTECTED] (Kenneth Porter)
Subject: Driver for SIIG multiport serial/parallel card
Date: Fri, 10 Nov 2000 00:58:16 -0000
Are any of the drivers provided with the 2.2 kernel suitable for the SIIG
PCI multiport cards? I've got some for Windows machines and wanted to
divert one for use in my Linux server to get a couple more serial ports.
For reference, here's SIIG's driver page, with a link to the technical
details (PCI registers, etc.) at the bottom:
http://www.siig.com/drivers/io_drivers.html
ftp://www.siig.com/Cyber20x.htm
I'm no PCI expert, but according to the second document, the card is
basically 2 serial ports and an ECP parallel port on an internal ISA bus,
plus SIIG's PCI-to-ISA bridge chip.
I've no fear of the C compiler, so if you can point me to something close
that I can modify, I can do the detail work.
------------------------------
** 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
******************************