Linux-Development-Sys Digest #31, Volume #7 Sun, 8 Aug 99 13:13:46 EDT
Contents:
Re: My first linux program: non-bios boot loader (H. Peter Anvin)
Re: Video mode switching with asm (Tristan Wibberley)
Remote Kernel Debugging from boot time ???
Re: does egcs 1.1.2 produce stable kernels? (Horst von Brand)
Correctioin ("J. Escalante")
Re: GCC byte alignment flag for structures (Mario Klebsch)
Custom login prompt... ("Rick Carlson")
Re: Linux assembly, etc (Kaz Kylheku)
Re: RW ATAPI CDROM how to use (Robin Becker)
2.2.10 modprobe can't locate 'lo' (Robin Becker)
Re: does egcs 1.1.2 produce stable kernels? (Robin Becker)
Re: limit ofo processes (Robert Nichols)
Re: Optimize Linux for AMD K6-2/3 (A Guy Called Tyketto)
programming tutorial?? ("P. Kern")
Re: My first linux program: non-bios boot loader (Peter Mutsaers)
Re: limit ofo processes (Matthias Kilian)
Re: GCC Cross Compiling (Brad M Garcia)
How to program PC-speaker to beep using C under Linux without being (MyName)
Re: How many thread can I use with Linux (Justin Tripp)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (H. Peter Anvin)
Subject: Re: My first linux program: non-bios boot loader
Date: 8 Aug 1999 01:42:35 GMT
Reply-To: [EMAIL PROTECTED] (H. Peter Anvin)
Followup to: <[EMAIL PROTECTED]>
By author: Neil Koozer <[EMAIL PROTECTED]>
In newsgroup: comp.os.linux.development.system
>
> Viljo Hakala wrote:
>
> > Does it work with scsi disks ?
>
> Not at this time. Different types of drives or filsystems would require
> different low-level boot code. In principle, the installer-utility could select
> the proper routine for each kind of drive and each file system. The only thing
> that matters is that the code for one specific drive fits into the available
> space. If I had a SCSI drive, I would be trying to do that.
>
> My original idea was to use my non-bios code in lilo whenever "linear" was
> invoked with IDE drives. A year ago I sent the code to the lilo maintainer with
> the suggestion of doing this, but I don't know if he was interested or not.
>
I think using EBIOS, when available, makes more sense. Admittedly, it
isn't supported everywhere yet, but one can assume the newer systems
do. Not ideal, but much less painful than having device drivers in
the boot sector.
-hpa
--
<[EMAIL PROTECTED]> at work, <[EMAIL PROTECTED]> in private!
------------------------------
From: Tristan Wibberley <[EMAIL PROTECTED]>
Subject: Re: Video mode switching with asm
Date: Mon, 02 Aug 1999 20:29:10 +0100
Reply-To: [EMAIL PROTECTED]
Jylam wrote:
>
> The problem is that I don't want to use the fb. You don't have to use it for
> 320x200x256, I'm sure. I think the svgalib sources are too hard for for, and
> in C language. I'm sure you can do it until having a 3Mb executable ...
> Tell me if I'm in the wrong way ...
Maybe I misunderstood what you wanted.
You want to set up a video card in Linux to 320x200x256 paletted mode.
You may do this by:
1) operating on an Xserver
2) operating on the kernel
3) operating on the hardware
You will find it difficult to do with the Xserver in asm without using a
library.
You can do it with a framebuffer kernel and it will work for all
hardware that supports your required mode and that the kernel supports.
You can hit the hardware device directly. You'll need to know how to
support each type of hardware you run on. You can find how to access the
video hardware from userspace by looking at the xfree sources.
I thought you said that you need to do it in 4kb, which when using the
kernel you have much more that 4kb of logic to do this. Even when
hitting the hardware, you need to use the kernel to set up the necessary
iopl.
--
Tristan Wibberley
------------------------------
From: <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.alpha,redhat.kernel.general
Subject: Remote Kernel Debugging from boot time ???
Date: 7 Aug 1999 06:30:38 GMT
Hi,
Is there a remote kernel debugger for linux-2.2.5-15 available, from where
I can even control the target kernel's booting.
================== Posted via CNET Linux Help ==================
http://www.searchlinux.com
------------------------------
From: [EMAIL PROTECTED] (Horst von Brand)
Subject: Re: does egcs 1.1.2 produce stable kernels?
Date: 8 Aug 1999 02:44:55 GMT
On Sat, 07 Aug 1999 00:59:46 GMT,
Juergen Heinzl <[EMAIL PROTECTED]> wrote:
>In article <[EMAIL PROTECTED]>, Klamer Schutte wrote:
>>Erik de Castro Lopo wrote:
>>> Arnoud de Geus wrote:
>>> > Does the egcs 1.1.2 compiler produce stable
>>> > kernels? Just recently, there were problems
>>> > using egcs for kernel build.
For 2.0.x kernels. 2.1.x and later are usually fine with egcs/gcc-2.95. Just
remember the -fno-strict-aliasing flag (taken care of automagically lately).
>>> Only use EGCS for 2.2.0 and later kernels. The problems
>>> with using EGCS were specific to earlier kernels.
>>Is this also true for newer egcs (like gcc 2.95?) I found the wordings
>>in the announcement (and the FAQ) quite scary -- esp. the aliasing part.
>>I must say, it was more scary then understandeble because:
>>- I do not have exact understanding of the ANSI C standard
>>- I do not have exact knowledge of Linux kernel internals
>>and the wording made these thing seemingly necessary.
The aliasing stuff trips bugs in the kernel. They seem to be mostly
harmless, but...
>>Any inputs from experts is appreciated. I now use kernel 2.2.9
I've been compiling kernels with egcs snapshots for a year and a half, the
problems found have been ironed out in the meantime, quietly (as Linus just
would bite your head off for "egcs-specific fixes"). AFAIKS, Linus is now
silently using gcc-2.95, after he complained loudly here and elsewhere that
egcs (its direct predecessor) was below contempt...
>Yes, looks like the latest XFree release requires that too. Let
>me say it this way ... gcc-2.95 is still hot and crispy ... never
>trust a compiler that is still hot and crispy 8)
And glibc-2.1.2 will requiere it also, AFAIK.
>I've got gcc-2.7.2.3 installed just for the kernel, nothing else,
>better safe than sorry. That it runs does not mean all is fine and
>until there is a sort of an offical okay I will leave it at that for
>now. Statements of the "it works for me" kind are pretty worthless
>as 5 minutes later the same one might be busy digging for the
>backup tape.
As stated above, it's been some year and a half here. Compiling all kind of
stuff, not just kernels. Latest beta binutils, BTW.
--
Horst von Brand [EMAIL PROTECTED]
Casilla 9G, Vi�a del Mar, Chile +56 32 672616
------------------------------
Date: Sat, 07 Aug 1999 22:23:03 -0400
From: "J. Escalante" <[EMAIL PROTECTED]>
Subject: Correctioin
string FileName("TestFile");
------------------------------
From: Mario Klebsch <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: GCC byte alignment flag for structures
Date: Sat, 7 Aug 1999 23:59:24 +0200
Torbjorn Tallroth <[EMAIL PROTECTED]> writes:
>Change the NT machine to use 32 bit alignment instead.
or even better: Use XDR (eXternal Data Representation) to transfer
your data over the network. It is completely independant of the
machine architectures used.
73, Mario
--
Mario Klebsch [EMAIL PROTECTED]
------------------------------
From: "Rick Carlson" <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.help,comp.os.linux.misc,comp.os.linux.questions,comp.os.linux.setup,linux.dev.c-programming,linux.dev.kernel,linux.redhat.devel
Subject: Custom login prompt...
Date: Sat, 7 Aug 1999 23:40:10 -0500
I would like to modify the login prompt to display an interactive menu using
ncurses.
Apparently, I did not install the source code, and I don't know where I put
the CD's.
Can anyone point me to the exact location to download the source for the
mingetty program?
I am running RedHat 5.2 (Apollo), with Linux kernal 2.0.36 on an Intel
Pentium.
Remove the obvious ".spamsucks" from my E-mail address to reply directly to
me.
Thanks,
Rick Carlson
Houston, TX.
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.misc
Subject: Re: Linux assembly, etc
Date: Sun, 08 Aug 1999 04:53:56 GMT
On Sat, 07 Aug 1999 21:44:49 +0200, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>Kaz Kylheku wrote:
>>
>> On Sat, 07 Aug 1999 12:30:39 GMT, JC <[EMAIL PROTECTED]> wrote:
>> >Hello,
>> >(This is probably for those ex-DOS assembly language programmers.)
>>
>> Please fix your news posting software so that it does not add carriage
>> return characters to the ends of you lines.
>>
>
>Please fix your software, adding CR-LF is mandatory
I'm using slrn, like countless other people. See my header.
>from rfc 977
Get a clue stick. The message I responded to had additional carriage returns in
violation of the above RFC. The CR-LF pairs described in 977 are transparent
to the end users. Yet I could see extra carriage returns in the guy's posting,
which my editor visibly shows as ^M.
------------------------------
From: Robin Becker <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc
Subject: Re: RW ATAPI CDROM how to use
Date: Sun, 8 Aug 1999 06:12:33 +0100
>>Aaron
>thanks. I got the CDRW ATAPI going with my old homebrew and eventually
>burned a CD with most (if not all of my stuff). Bridges are now burned
>and the RH 6.0 is installed. It crashed during the X11 configuration
>and twice since so I'm a bit unhappy with RH. I see large numbers of
>rpms in the errata section at www.redhat.com; is there any way to tell
>what bugs features etc these are intended to replace?
>
>And as for the image testing; in the end I made an ext2 loopback file
>system and shoved everything into that.
I'm now having trouble with my new RH 6.0 system. I'm using exactly the
same technique, but during the boot of 2.2.10 I see that the kernel
still thinks it has access to the cd's as hdc & hdd
I have
IDE2/ATAPI CDROM off
SCSI support m
SCSI emulation m
SCSI CDROM m
SCSI GENERIC m
and I can't mount with either device hdc/d or sr0/1; I think the BIOS is
being used to grab info about the cdroms. This isn't the same as in
2.0.36.
--
Robin Becker
------------------------------
From: Robin Becker <[EMAIL PROTECTED]>
Subject: 2.2.10 modprobe can't locate 'lo'
Date: Sun, 8 Aug 1999 06:22:25 +0100
I'm trying to compile a new kernel; first time with 2.2.x I'm finding 50
messages saying that modprobe cannot locate device lo each time that
ifup lo is called. Everything seems to be ok as ping localhost works
etc, but I would like to eliminate this if possible.
--
Robin Becker
------------------------------
From: Robin Becker <[EMAIL PROTECTED]>
Subject: Re: does egcs 1.1.2 produce stable kernels?
Date: Sun, 8 Aug 1999 02:23:47 +0100
thanks for the info. RH has locked solid on me a couple of times and I'm
beginning to believe I'll go back to a more standard kernel.
--
Robin Becker
------------------------------
From: [EMAIL PROTECTED] (Robert Nichols)
Crossposted-To: linux.dev.kernel
Subject: Re: limit ofo processes
Date: Sat, 7 Aug 1999 23:59:03 GMT
In article <[EMAIL PROTECTED]>,
Sven Heursch <[EMAIL PROTECTED]> wrote:
:Torbjorn Tallroth wrote:
:
:> On Sat, 7 Aug 1999, Sven Heursch wrote:
:> > in linux kernel the limits of processes on a i386 machine is defined as
:> > 999. I need more! How can I make the kernel accept that wish?
:> > (Or: How can I destroy a Zombie process?)
:> Kill it's parent?
:>
:> --
:> tth
:
:no, I can't. The parent creates lot's of processes for a measurement of
:systemcall fork. Put the zombies increment the count of existing processes.
:So I need the parent to create more than 2000 processes in a few seconds.
In the parent just do:
signal(SIGCHLD,SIG_IGN);
That tells the kernel you don't care about your children (so much for
"family values") and it will free up the process table slot as soon as
each child process terminates.
--
Bob Nichols [EMAIL PROTECTED]
PGP public key 1024/9A9C7955
Key fingerprint = 2F E5 82 F8 5D 06 A2 59 20 65 44 68 87 EC A7 D7
------------------------------
From: [EMAIL PROTECTED] (A Guy Called Tyketto)
Subject: Re: Optimize Linux for AMD K6-2/3
Date: 8 Aug 1999 04:15:10 -0500
=====BEGIN PGP SIGNED MESSAGE=====
Hash: SHA1
David Schwartz ([EMAIL PROTECTED]) wrote:
>
> Get gcc-2.95 and use '-march=k6 -O3'
>
> DS
Which may give you an even BUGGIER kernel than optimised. That's
why Linus mainly hasn't gone with egcs/gcc-2.95/pgcc/etc. There are some
bugs in the COMPILER, that still need to be majorly worked out, and thus
is why he suggests using gcc-2.7.2.3 for compiling kernels. Want to use
something newer, than you may be on your own. Newer doesn't always mean
'better'. ;)
BL.
- --
Brad Littlejohn | Email: [EMAIL PROTECTED]
Unix Systems Administrator, | [EMAIL PROTECTED]
WebMaster, NewsMaster.. Smeghead! :) | http://www.omnilinx.net/~tyketto
PGP: 1024/E9DF4D85 67 6B 33 D0 B9 95 F4 37 4B D1 CE BD 48 B0 06 93
=====BEGIN PGP SIGNATURE=====
Version: GnuPG v0.9.10 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE3rQsOyBkZmuMZ8L8RAkQyAKDLwMmfi875BYSRqef6DfRy0c61hwCcDLXN
fuFAwpt5tAD7y6pEyAla9qQ=
=xMZY
=====END PGP SIGNATURE=====
------------------------------
From: "P. Kern" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.help
Subject: programming tutorial??
Date: Sun, 8 Aug 1999 12:04:04 +0200
hello,
i'm looking for some online-tutorials for system programming with linux/unix
(processes,pipes, ...). i don't have any experiences with that and i want to
learn it without buying expensive books.
can someone help me?
------------------------------
From: Peter Mutsaers <[EMAIL PROTECTED]>
Subject: Re: My first linux program: non-bios boot loader
Date: 08 Aug 1999 11:28:26 +0200
>> "HPA" == H Peter Anvin <[EMAIL PROTECTED]> writes:
>> I think so, but then I don't know why NT can't handle lilo
>> being in the MBR. I would assume that nuni would work in /hda1
>> (for example) the same as lilo for NT users.
>>
HPA> Because NT stores nonstandard data in the MBR (quite possibly
HPA> to intentionally screw up other OSes).
Hmm, not knowing this, I installed Linux at work (RH6.0) with lilo
using the MBR. I can still boot NT. How can this be, did RH modify
lilo to make this possible?
--
Peter Mutsaers | Abcoude (Utrecht), | Trust me, I know
[EMAIL PROTECTED] | the Netherlands | what I'm doing.
------------------------------
From: [EMAIL PROTECTED] (Matthias Kilian)
Crossposted-To: linux.dev.kernel
Subject: Re: limit ofo processes
Date: 8 Aug 1999 08:17:13 GMT
> in linux kernel the limits of processes on a i386 machine is defined as
> 999. I need more! How can I make the kernel accept that wish?
> (Or: How can I destroy a Zombie process?)
Do have access to the sources of the program that starts the processes? If so,
you should install a signal handler for SIGCHLD which calls wait() to cleanup
the dead child process. See sigaction(2) and wait(2). There is no other way of
getting rid of zombies - either the parent process must wait(), or the zombies
will remain until the parent itself dies and is wait()ed for by its own
parent and so on.
Kili
------------------------------
From: [EMAIL PROTECTED] (Brad M Garcia)
Subject: Re: GCC Cross Compiling
Crossposted-To: comp.lang.c++,comp.os.linux.development.apps
Date: Sun, 08 Aug 1999 12:55:11 GMT
In article <7o56c0$6hv$[EMAIL PROTECTED]>,
"Matt Zinkevicius" <[EMAIL PROTECTED]> writes:
|> Hi,
|> Our team would like to build a verison of GCC that cross-compiles
|> to x86 linux hosted on x86 Windows NT. Has anyone tried this? Anything
|> I should be aware of? Is it even possible?
Look here:
http://www.objsw.com/CrossGCC/FAQ-4.html#ss4.6
--
Brad Garcia
Windows 95: n. a 32-bit extension for a 16-bit patch to an
8-bit operating system originally coded for a 4-bit microprocessor,
written by a 2-bit company, that can't stand 1 bit of competition.
------------------------------
From: MyName <[EMAIL PROTECTED]>
Subject: How to program PC-speaker to beep using C under Linux without being
Date: Sun, 08 Aug 1999 21:37:56 +0800
as subject. thank you.
Regards.
------------------------------
From: Justin Tripp <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development,comp.os.linux.development.apps
Subject: Re: How many thread can I use with Linux
Date: 8 Aug 1999 16:11:39 GMT
In comp.os.linux.development.apps Robert Krawitz <[EMAIL PROTECTED]> wrote:
: [EMAIL PROTECTED] (Kaz Kylheku) writes:
:> On Sat, 7 Aug 1999 08:37:49 +0900, Junedong Kim <[EMAIL PROTECTED]> wrote:
:> >Hello, I wonder how many thread could run on kernel 2.2 simultaneously
:> >In my Linux box, with kernel 2.0x,
What kind of threads are you trying to use? If you are using the threads
inherent to linux (i.e. LinuxThreads), you really need to use a linux
version based on glibc (most 2.0X are not...). If you have glibc and
a recent version of linux threads -- then you need to look at what you
are doing and trying to accomplish.
There are different kind of thread models: kernel threads, user threads,
and hybrid threads. These can also be called 1:1, 1:many, many:many
or something like that. Anyway, the different thread model determine
the characteristics and capabilities of a threaded program. Most portable
threads are user threads (e.g. mit pthreads, GNU pth, etc.) User threads
run as one process and this process schedules the threads itself. It could
be said that these processes run in "user" space. On the other hand, kernel
threads are scheduled by the kernel in "kernel" space. This has some draw
backs and benefits. User space threads can have their priority controlled.
Kernel space the kernel will determine when they will run. User threads are
NOT scalable on SMP machines. Kernel threads are scalable on SMP machines.
So if you have a Quad Xeon or maybe a 256 processor NCR box, you may want to
run kernel threads. If you do not want scalablility or you wish to run
separate processes and have threads within those processes, then you can
run user threads.
:> >I saw /usr/include/loca_lim.h,
:> >it said max num od thread in a process 64 and
:> >max implementation 1024,
The maximums you quote are not exactly what you said.
/* The number of threads per process. */
#define _POSIX_THREAD_THREADS_MAX 64
/* This is the value this implementation supports. */
#define PTHREAD_THREADS_MAX 1024
The first number is for POSIX compatibility. So, if you want you program
to run on POSIX compatible machines then you should obey it. This is just
the maximum that POSIX allows -- LinuxThreads allows up to 1024 and this is
fairly hard limit due to the implementation. In fact, you probably cannot
run 1024 threads on a linux box (that is 32bit). Since LinuxThreads are
kernel threads they are heavy threads/light processes. This means that
each one has near the characteristics of a process. Each one has its own
memory space. The following comess from the LinuxThreads README:
- The stacks for the threads are allocated high in the memory space,
below the stack of the initial process, and spaced 2M apart.
Stacks are allocated with the "grow on demand" flag, so they don't
use much virtual space initially (4k, currently), but can grow
up to 2M if needed.
Reserving such a large address space for each thread means that,
on a 32-bit architecture, no more than about 1000 threads can
coexist (assuming a 2Gb address space for user processes),
but this is reasonable, since each thread uses up one entry in the
kernel's process table, which is usually limited to 512 processes.
Another potential problem of the "grow on demand" scheme is that
nothing prevents the user from mmap'ing something in the 2M address
window reserved for a thread stack, possibly causing later extensions of
that stack to fail. Mapping at fixed addresses should be avoided
when using this library.
Using LinuxThreads then you are limited to ~1000 threads because every
thread has its own memory space and your memory space is limited to
2G. If you have an Alpha or something, then you maybe able to avoid
this problem with a 64bit memory space. This would allow for atleast
millions, even if you upped the individual memory space to 4 or 16Megs.
:> >I think it so hard! did I refer right info?
:> >if so, How can I increase the max num of implemented thread
:> >pleaz, tell me real fact about that.
It is kind of odd that you think this is so hard. I have played around
with the LinuxThreads and found them very useful. Using a Dual PIII 450
I can run 1019 threads -- but you see this is like running 1019 processes.
Since the kernel schedules them, they do appear in top or the run queue --
so it is like 1019 load lines. Needless to say that approach makes the
machine most unusefull for other processes. Running 1019 threads was slightly
slower than running 2 threads ... but I was testing with a PI calculation
prgram. It had no communication between threads. Any application where
the threads needed to pass information would have slowed down significantly
as more threads were added. Parallel applications that have no communication
are generally regarded as trivial since they probably do not do much useful.
I was able to get the kernel and linuxThreads to schedule 200 of my threads
to run concurrently. This result in a system load of 200 (and general
unresponsiveness.) If your machine can deal with huge loads like that
feel free, but if you have just a reasonable machine you may wish to take the
below advice and reconsider what you are doing.
:> You should be looking to find out how to minimize your application's
:> use of threads, rather than how to increase the system limits. If
:> you need to create as many, or more threads, as a regular Linux
:> kernel setup allows you, you are doing something wrong. Maybe you
:> don't have a lot of experience designing threaded applications, so
:> you think that every object (or client, or cell in a matrix, or what
:> have you) needs its own thread. It seems that every programmer who
:> learns about threads wants to do things this way. A few threads are
:> better than just one, so a huge number of threads must awesome!
: It's possible that this is the case, but the original poster may have
: valid reasons for wanting more threads (or processes, or what have you).
: --
: Robert Krawitz <[EMAIL PROTECTED]> http://www.tiac.net/users/rlk/
Just in case you don't think anything I have said is useful, the following
links might be useful for related info:
LinuxThreads
http://pauillac.inria.fr/~xleroy/linuxthreads/
MIT Pthreads
http://www.humanfactor.com/pthreads/mit-pthreads.html
GNU Pth
http://www.gnu.org/software/pth/
--
========================================================================
Justin Leonard Tripp [EMAIL PROTECTED]
Configurable Computing Laboratory Research Assistant CB 461 x8-7206
Electrical and Computer Engineering Department Brigham Young University
------------------------------
** 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
******************************