Linux-Development-Sys Digest #651, Volume #6     Sun, 25 Apr 99 11:14:00 EDT

Contents:
  Re: how to access raw memory? (Arun Sharma)
  Re: socket prog: server doesn't recognize disconnect (Paul Vojta)
  Re: CPU Selection with SMP (Frank McGirt)
  Re: CPU Selection with SMP (Arun Sharma)
  Re: Modprobe can't file module char-major-6... ("Robin P. Reagan")
  Re: A Technical Question about the MBR Boot code. (David Lee)
  Re: Modprobe can't file module char-major-6... (RonaldKriemann)
  Re: how to access raw memory? (Jacek Pop�awski)
  Re: Took one guy 3 days, another 1 day, me 1 hour... (David Goldstein)
  mysterious problems with SCSI Streamer (Gereon Ruetten)
  Re: a problem with scanf (jay)
  Re: Symbolic link and chroot (David Corredor Lacha)
  Re: wake_up_interruptible in 2.0.35 and up. (Andi Kleen)
  Re: Spontaneous reboots on a PII (James Stevenson)
  Re: mysterious problems with SCSI Streamer ("Robert C. Paulsen, Jr.")

----------------------------------------------------------------------------

Subject: Re: how to access raw memory?
From: Arun Sharma <[EMAIL PROTECTED]>
Date: Sun, 25 Apr 1999 03:57:16 GMT

[EMAIL PROTECTED] (Jacek Pop=B3awski) writes:

>   I want to write driver to work with VGA 320x200x256 mode. I am not
> sure how to access IO ports, but i read HOWTO and some mans and I think
> it will be possible :-), but what with memory? Only root can access all
> memory, but how? How can i write to video ram? I read "man mem" but
> it didn't help me... What should i read?

Use /dev/mem. Look at

xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c 

in XFree86 sources. You should find the untarred version at many ftp
sites.

=09-Arun


------------------------------

From: [EMAIL PROTECTED] (Paul Vojta)
Subject: Re: socket prog: server doesn't recognize disconnect
Date: 24 Apr 1999 17:20:16 -0700

In article <[EMAIL PROTECTED]>, Andi Kleen <[EMAIL PROTECTED]> wrote:
>
>The easiest way to be informed about client shutdown is to install
>an SIGPIPE signal handler with sigaction(2). 

But (IIRC) you don't receive the SIGPIPE signal until you try to write
to the socket.

--Paul Vojta, [EMAIL PROTECTED]

------------------------------

From: [EMAIL PROTECTED] (Frank McGirt)
Subject: Re: CPU Selection with SMP
Date: Sun, 25 Apr 1999 04:54:01 GMT

Thanks, I'll take a look.

On Sun, 25 Apr 1999 04:07:05 GMT, Arun Sharma
<[EMAIL PROTECTED]> wrote:

>[EMAIL PROTECTED] (Frank McGirt) writes:
>
>> I am running 2.0.36-3 with SMP installed and I would like to be able
>> to dedicate a worker thread to a particular CPU while reserving a
>> second CPU to handle the GUI and other stuff.  Does anyone know of
>> a way to do this?    I am using g++ and Qt for development.
>
>That is a bad idea for a general purpose application. The OS scheduler
>is smart enough to do that. But in certain situations, it might be
>helpful and can be done by patching the kernel:
>
>http://isunix.it.ilstu.edu/~thockin/pset/
>
>       -Arun


------------------------------

Subject: Re: CPU Selection with SMP
From: Arun Sharma <[EMAIL PROTECTED]>
Date: Sun, 25 Apr 1999 04:07:05 GMT

[EMAIL PROTECTED] (Frank McGirt) writes:

> I am running 2.0.36-3 with SMP installed and I would like to be able
> to dedicate a worker thread to a particular CPU while reserving a
> second CPU to handle the GUI and other stuff.  Does anyone know of
> a way to do this?    I am using g++ and Qt for development.

That is a bad idea for a general purpose application. The OS scheduler
is smart enough to do that. But in certain situations, it might be
helpful and can be done by patching the kernel:

http://isunix.it.ilstu.edu/~thockin/pset/

        -Arun

------------------------------

From: "Robin P. Reagan" <[EMAIL PROTECTED]>
Subject: Re: Modprobe can't file module char-major-6...
Date: Sat, 24 Apr 1999 21:17:38 -0600

Konrad Mieredorff wrote:
> 
> "Robin P. Reagan" wrote:
> >
> > Hi
> > I just upgraded my RH5.2 system from kernel 2.0.36 to Kernel 2.2.6 and
> > all went fine except for two things.
> >
> > 1) I can nolonger print from Linux! I have checked all the obvious
> > things. I can preint fine from my windoz partition.
> >
> > 2) I get the following message in the /var/log/messages file
> >
> > Apr 23 22:56:10 phobos modprobe: can't locate module char-major-6
> > Apr 23 22:57:14 phobos last message repeated 2 times
> >
> > What is the char-major-6 module used for? It isn't in the modules dir
> > and I can't find it anywhere?
> >
> > I suspect that the two problems are related...
> >
> > Anyhelp would be appreciated.
> >
> > Robin.
> 
> The parallel port driver offers the character devices /dev/lp0-3, that's
> why it is called char-major-6.
> 
> What you can do is:
> 1.) Check your kernel configuration.
>     (Option "Chardrivers -> Parallel Printer Support" in make
> menuconfig)
> 2.)  Recompile the kernel modules.
>     (make modules / make modules_install)
> 3.) execute "depmod -a"
> 4.) Check wether the module works.
>     (modprobe lp)
> 5.) If the problems still there copy the file "lp.o" from
>     /usr/src/linux/modules to /lib/modules/2.2.6
>     (if the file isn't there you messed the configuration -- Start
> again:-))
>     and do a "depmod -a"
> 
> Everything as user root of course.
> Feel free to ask again if my method doesn't work
> 
> Good luck!
> 
> - Konrad Mierendorff

I rebuilt my kernel with a new configuration file and it still does not
work :(

lp.o is in my /lib/modules/2.2.6-ac1/misc/ dir and loaded fine (at least
modprobe installed it without complaining and when I do A lsmod it shows
up with 0 users).

when I try to print from the command line I get the following:

[robin@phobos robin]$ lpr  monitors.txt
lpr: connect: Connection refused
jobs queued, but cannot start daemon.


-- 
Live Long and Prosper!
            Robin, Katie, Samuel & Erin Reagan
            http://home.sprynet.com/~krreagan/
======================"...human error!" [HAL9000]

------------------------------

From: [EMAIL PROTECTED] (David Lee)
Crossposted-To: alt.linux
Subject: Re: A Technical Question about the MBR Boot code.
Date: 25 Apr 1999 07:03:56 GMT

Villy Kruse ([EMAIL PROTECTED]) wrote:
: In article <[EMAIL PROTECTED]>,
: John Smith  <[EMAIL PROTECTED]> wrote:


: >1) It says that the the BIOS start up loads the MBR code at address
: >0x7C00 -- this is the RAM memory address right?

: This is correct.

        Related to which segment? is cs=0x0000? 
        Since it is in real mode, so this address  is an offset. 
        

------------------------------

From: RonaldKriemann<[EMAIL PROTECTED]>
Subject: Re: Modprobe can't file module char-major-6...
Date: 24 Apr 1999 11:16:37 +0200

"Robin P. Reagan" <[EMAIL PROTECTED]> writes:

> 
> Hi
> I just upgraded my RH5.2 system from kernel 2.0.36 to Kernel 2.2.6 and
> all went fine except for two things. 
> 
> 1) I can nolonger print from Linux! I have checked all the obvious
> things. I can preint fine from my windoz partition.
> 
> 2) I get the following message in the /var/log/messages file
> 
> Apr 23 22:56:10 phobos modprobe: can't locate module char-major-6
> Apr 23 22:57:14 phobos last message repeated 2 times
> 
> What is the char-major-6 module used for? It isn't in the modules dir
> and I can't find it anywhere?
> 
> I suspect that the two problems are related...

Correct :) . As you can see in /usr/src/linux/Documentation/devices.txt
major-6 is "Parallel printer devices". Just add the following alias
to your /etc/conf.modules:

    alias char-major-6 lp

maybe you also want to add something like

    alias parport_lowlevel parport_pc
    options parport_pc io=0x378 # irq=7

> 
> Anyhelp would be appreciated.
> 
> Robin.

RGDS
  Ronald

-- 
       Indifference will certainly be the downfall of mankind,
                           but who cares ?
Ronald Kriemann                            Dept. of Computer Science,
[EMAIL PROTECTED]                 University of Kiel, Germany

------------------------------

From: [EMAIL PROTECTED] (Jacek Pop�awski)
Subject: Re: how to access raw memory?
Reply-To: [EMAIL PROTECTED]
Date: 24 Apr 1999 22:22:31 GMT

Konrad Mieredorff wrote:
>You _cannot_ access the whole memory as root! The memory is devided into
>kernel-space and user-space. Therefore you should consider writing a
>kernel module to access the videomem or putting your whole driver into a
>module.

heh... the problem is, that I WANT to write module, but now - i have no
idea HOW to write ANY module, I am experienced with programming in
Assembler (protected mode) under DOS, but Linux is another system...
yes... i know.. i should read Module-HOWTO or LDP ;-) but I want begin 
from writing some demos in 320x200x256, i can't do it with svgalib
or X, becouse it's slow, big, and need suid, it's sad, that Linux don't
has normal way to programming gfx... or maybe i don't know something?
I want to access video ram or Vesa-framebuffer and gfx-card ports,
and write gfx demo, if it was so easy in DOS - why it is so hard in Linux?
i need to know how to:
a) set 320x200x256 mode 
b) copy 64000bytes from memory to videoram
c) back to textmode
steps a) and c) should be easy (of course i can be wrong), but I have no idea
how to make step b)
please tell me what should i read and - what are the reasons that i should
not write that driver/demo...

>Good luck!

i think i will need it ;-)


------------------------------

From: David Goldstein <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.advocacy
Subject: Re: Took one guy 3 days, another 1 day, me 1 hour...
Date: Sat, 24 Apr 1999 13:58:30 -0100

[EMAIL PROTECTED] wrote:
> 
> I was just thinking since I might install Linux one of these days...  What
> pieces of information are necessary to know during Linux installation?  This
> would help a lot so I don't have to go running when I install it.  Thanks a
> lot.
> 

  The most important piece of info that you need are some specs on your
monitor: Hfreq and Vfreq rates.  After that, you just need to check a
hardware compatiblity list for the current hardware on your computer. 
This is not generally a problem these days, though :)  
 
Have fun!

David

------------------------------

From: Gereon Ruetten <[EMAIL PROTECTED]>
Subject: mysterious problems with SCSI Streamer
Date: Sun, 25 Apr 1999 12:29:49 +0200

Hi,

I have a problem with my SCSI Streamer which nobody yet was able to
solve...
The streamer works fine with kernel Versions < 2.2.x  
(The streamer also works fine with Win NT)

first some facts :

Controller : NCR53c810

Streamer :  
        Host: scsi0 Channel: 00 Id: 05 Lun: 00
        Vendor: WANGTEK  Model: 51000  SCSI RVM7 Rev: 5F5 
        Type:   Sequential-Access                ANSI SCSI revision: 01

System : AMD-K6-2 366 MHz (same problems with other CPUs)

Its no problem to read from the tape, but writing occurs allways errors

e.g. :

<----------->
tar cvf /dev/st0 zImage 
zImage
tar: Cannot write to /dev/st0: Input/output error
tar: Error is not recoverable: exiting now
<----------->

/var/log/messages reports something like that :

Apr 25 11:58:27 key kernel: st0: Error with sense data: Info fld=0xd2,
Current st09:00: sense key Medium Error
Apr 25 11:58:27 key kernel: st0: Error with sense data: Info fld=0xb4,
Deferred st09:00: sense key Medium Error
Apr 25 11:58:27 key kernel: st0: Error on write filemark.
Apr 25 11:58:27 key kernel: st0: Error with sense data: Info fld=0xb4,
Deferred st09:00: sense key Medium Error


root@key:/var/log > mt -f /dev/st0 status
drive type = Generic SCSI-1 tape
drive status = 285213696
sense key error = 0
residue count = 0
file number = 0
block number = 0
Tape block size 1024 bytes. Density code 0x11 (QIC-320/525 (GCR 16000
bpi)).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_ENroot@key:/var/log > 

root@key:/dev > ls -la st0*
crw-rw----   1 root     disk       9,   0 Apr  5 01:12 st0
crw-rw----   1 root     disk       9,  96 Apr  5 01:12 st0a
crw-rw----   1 root     disk       9,  32 Apr  5 01:12 st0l
crw-rw----   1 root     disk       9,  64 Apr  5 01:12 st0m
root@key:/dev >


i hope somebody can help me to solve the problem.. it's not a very good
feeling to have
no backups on removable mediums


thanks and best regards,
                                        Gereon
--
Linux is like an indian tent: no gates, no windows, and Apache inside!

------------------------------

From: [EMAIL PROTECTED] (jay)
Crossposted-To: comp.lang.c
Subject: Re: a problem with scanf
Date: Sun, 25 Apr 1999 08:16:41 GMT

On Mon, 12 Apr 1999 21:30:40 +0200, Francesc Oller
<[EMAIL PROTECTED]> wrote:

>executing the following code in LINUX:
>
>...
>void main(void)
>{
>       char c;
>       setvbuf(stdin,NULL,_IONBF,0);
>        tty_raw(0);
>        scanf("%c",&c);/*c=getchar();*/
>        tty_reset(0);
>        printf("c='%c'\n",c);
>}

easy solution:

don't use scanf.  init a character array, and use fgets to snag the
line, then sscanf that line. sscanf is much more robust and reliable.
takes up a bit more memory to init that extra variable, but it's worth
it.
but if you want to know the real answer... scanf("%c",&c) wont work,
scanf(" %c",&c) will... don't ask me why.

<jay>
and ignore all these people who have nothing better to do but sit
around and bitch about certain things being off topic ;)
</jay>

------------------------------

From: David Corredor Lacha <[EMAIL PROTECTED]>
Subject: Re: Symbolic link and chroot
Date: Sun, 25 Apr 1999 12:56:52 +0200

James Youngman wrote:
> 
> David Corredor Lacha <[EMAIL PROTECTED]> writes:
> 
> > Hi,
> >
> >       How can I do a symbolic link into a chrooted directory?
> 
> Just use "ln -s".  It's symbolic links *out* of chroot() environments
> that are the problem.
> 
        Yes, my problem is how to do a symbolic link in a chroot
environment to a extern file. I see some times ago a library
to do it, but I don't remember where find it.

-- 

                                                Un saludo.

=========================================================================
DRAGONET COMUNICACIONES S.L                     David
Corredor Lacha
http://www.drago.net                            DRAGONET I+D
Email: [EMAIL PROTECTED]                     Email:
[EMAIL PROTECTED]
Tel. +34 96 686 0072                             
Fax. +34 96 588 7808
=========================================================================

------------------------------

From: Andi Kleen <[EMAIL PROTECTED]>
Subject: Re: wake_up_interruptible in 2.0.35 and up.
Date: 25 Apr 1999 10:18:05 +0200

"Reinhold J. Gerharz" <[EMAIL PROTECTED]> writes:

> Is it safe to call wake_up_interruptible(&queue) where queue points to a
> process that has been previously awakened?

Yes. 

-Andi

-- 
This is like TV. I don't like TV.

------------------------------

From: [EMAIL PROTECTED] (James Stevenson)
Crossposted-To: comp.os.linux.hardware
Subject: Re: Spontaneous reboots on a PII
Reply-To: [EMAIL PROTECTED]
Date: Sun, 25 Apr 1999 13:17:17 +0100

Hi

does the file

/proc/sys/kernel/panic
contain something other than 0
try to set it to 0 if it does
its for use with watchdog support and if watchdog does not tell the kernel
every thing is ok the machine will reboot

read /usr/src/linux/Documentation/proc.txt for more info on this file

cya

On Sat, 24 Apr 1999 20:13:50 +0000, Rowin Andruscavage <[EMAIL PROTECTED]> wrote:
>       Hi, I'm having problems with spontaneous reboots on my friend's new PII
>350.  Every so often while running under Linux, it will reboot just as
>if someone hit the reset button : no kernel panics, no log entries, just
>a blip and the BIOS comes up.  It's not very reproducible either...  It
>can stay up for as long as an hour doing things like compiling kernels
>and running vmware, but usually goes down in 5 minutes, especially while
>doing things that are I/O intensive.  The reboots happen much more often
>if the sound modules are installed and we're moving lots of things
>around in X, though sometimes I can be swinging things all over the
>place in Enlightenment with pixmap themes and have everything work fine.
>
>       I thought it was heat-related, so I disabled all the BIOS APM things
>and the CPU fan controller, so CPU fan should be running all the time. 
>No luck.
>
>       We installed from RedHat5.2, and added GNOME and linux 2.2.6 .  He has
>a Matrox G100 AGP card and some OPL3SA2 sound card.  I've upgraded to
>XFree86 3.3.3.1 without much effect (besides, it's even rebooted under
>the console once, though admittedly I was using the linux FB console at
>that time).  My current theory is that it has something to do with the
>motherboard, which appears to be a BX something (windoze reports 82443BX
>controllers).  I've tried different combinations of kernels(2.0.36,
>2.2.3, 2.2.6) with and without support for MTRR, different
>windowmanagers (WM and E), with and without GNOME, and with various
>system loads.  What next?
>
>       It could be that it's not the best hardware, since he got some generic
>machine from a custom NYC vendor.  He told the guy at the shop that he
>wanted to run Linux of it (and of course the guy says "Yep, sure thing"
>and immediately turns around and bolts in a WinModem :P ).  I've never
>seen any of this happen on any other computer, like my K6 200 that's
>running essentially all the same software.  Windows 95/98 runs as usual
>on his computer...  it crashes occasionally, but not by spontaneous
>reboots.
>
>       This thing is really temperamental... and really perplexing me.  Does
>anyone have any leads?  Or at least pointers on how I can get this rig
>to work more reliably?  TIA!
>
>-- 
><8X- Rowin Andruscavage  http://www.people.cornell.edu/pages/rwa2
>Human beings were created by water to transport it uphill.


-- 
Check Out: http://www.users.zetnet.co.uk/james/
E-Mail: [EMAIL PROTECTED]

------------------------------

From: "Robert C. Paulsen, Jr." <[EMAIL PROTECTED]>
Subject: Re: mysterious problems with SCSI Streamer
Date: Sun, 25 Apr 1999 07:52:19 -0500

Gereon Ruetten wrote:
> 
> Hi,
> 
> I have a problem with my SCSI Streamer which nobody yet was able to
> solve...

-- clip --

> 
> <----------->
> tar cvf /dev/st0 zImage
> zImage
> tar: Cannot write to /dev/st0: Input/output error
> tar: Error is not recoverable: exiting now
> <----------->
> 
> /var/log/messages reports something like that :
> 
> Apr 25 11:58:27 key kernel: st0: Error with sense data: Info fld=0xd2,
> Current st09:00: sense key Medium Error
> Apr 25 11:58:27 key kernel: st0: Error with sense data: Info fld=0xb4,
> Deferred st09:00: sense key Medium Error
> Apr 25 11:58:27 key kernel: st0: Error on write filemark.
> Apr 25 11:58:27 key kernel: st0: Error with sense data: Info fld=0xb4,
> Deferred st09:00: sense key Medium Error
> 

Here are a couple of long shots (and forgive me for suggesting these)
...

First, have you checked the write protect tab on the tape?

Second, are you using the same cartridge with Linux as you are with NT?
I once got a "medium error" when trying to write to a tape that was only
read-compatible with the drive. Drives often can read, but not write,
older media.

____________________________________________________________________
Robert Paulsen                         http://paulsen.home.texas.net
If my return address contains "ZAP." please remove it. Sorry for the
inconvenience but the unsolicited email is getting out of control.

------------------------------


** 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
******************************

Reply via email to