Linux-Development-Sys Digest #754, Volume #8     Mon, 28 May 01 02:13:08 EDT

Contents:
  Re: Debug kernel ("M.C. enicon")
  R: Mr kdb, I suppose ("M.C. enicon")
  Re: Debug kernel ("Norm Dresner")
  R: Please read... ("M.C. enicon")
  Re: Help!! ("M.C. enicon")
  gdb warning (Charles Wilkins)
  is "make bzdisk" broken on RH 7.1? ("D. Stimits")
  Did not find COAS?? ("psy")
  Re: Spambot Fodder : Dont bother to read, just spamming a spammer (SammyTheSnake)
  Re: Lilo question (Frank Ranner)
  generating keyboard key presses from inside a module. ("Joshua K.")
  what does the prefix "__" mean (yingyi)
  Re: g++ => byte alignment (Vyacheslav Burdjanadze)
  Re: what does the prefix "__" mean (Christopher Fairbairn)
  Re: /ttyS0 ("Peet Grobler")
  Another question about device driver application ("nickwang")
  Re: /ttyS0 ("Peet Grobler")

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

From: "M.C. enicon" <[EMAIL PROTECTED]>
Subject: Re: Debug kernel
Date: Sun, 27 May 2001 22:34:45 +0200


Zhiyong Xu <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]
> Hi,
>          How can I debug a testing kernel...

Hi,
I've been asking this question for months. The final answer is: maybe,
but there is not an "official" way.
There is NO kernel debugger such as solaris adb, but
there are some kernel patches that let you do something like that.
kdb is a debugger included in the kernel that is triggered by Oops an the
break key,
 kdb - http://oss.sgi.com/projects/kdb/
kgdb will let you run thet new kernel on a test machine while running a
debugger on a serial-line connected debug machine
 kgdb  http://oss.sgi.com/projects/kgdb/

I've been testing kdb without much success on a kernel 2.2.18, but I think
it's worth to try harder.
It is supposed to work better on 2.4 kernels. I've never tryied yet kgdb.

To track down Oops, anyway, I would try harder with a printk approach... try
to put as little printk
as you can in the part you modified to see wat's goin on before the Oops.
Every message will go into
/var/log/messages, in case you don't know.

Happy hacking,

    Massimiliano

[EMAIL PROTECTED]
[EMAIL PROTECTED]









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

From: "M.C. enicon" <[EMAIL PROTECTED]>
Subject: R: Mr kdb, I suppose
Date: Sun, 27 May 2001 22:42:17 +0200



Doug Reiland <[EMAIL PROTECTED]> wrote in message
news:<9em091$[EMAIL PROTECTED]>...
> Hit the break key to get into kdb.

Gee, too easy to guess? ;-) Thanks!

> I don't think kdb is taking any action when you do a insmod. Also, I hope
> you got put into kdb when you get your OOPS. From there you can debug.

Yes, I get into kdb but,

> What was happening before you configured in kdb?
Before it my kernel was an happy undebuggable 2.2.18 that could be insmoded
with initio.o and via-rhine.o easily and without problems.

I also found that if I put initio and via-rhine in the kernel itself
(no modules), then when I insmod MY scsi driver for MO drives I get
a sudden reboot!

This is drammatic because I needed kdb to debug a system consisting of 2
scsi drivers, 2
pseudo devices , 2 filesystems and a meta-filesystem

I'm not sure but I think that I made some mistakes when configuring the
kernel, because I was able
to load my pseudo drivers even with insmod while in the kdb kernel.
I'll try further...

 Thanks a lot

Massimiliano

P.S. I wrote the first message from office, this from home






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

From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: Debug kernel
Date: Sun, 27 May 2001 20:47:13 GMT

M.C. enicon <[EMAIL PROTECTED]> wrote in message
news:9erofe$kfq$[EMAIL PROTECTED]...
>
> Zhiyong Xu <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]
> > Hi,
> >          How can I debug a testing kernel...
>
> Hi,
> I've been asking this question for months. The final answer is: maybe,
> but there is not an "official" way.
> There is NO kernel debugger such as solaris adb, but
> there are some kernel patches that let you do something like that.
> kdb is a debugger included in the kernel that is triggered by Oops an the
> break key,

    There are some debugging techniques and debuggers designed for Real-Time
Linux that are supposed to allow debugging RT modules which I believe also
allow debugging non-RT modules in the kernel too.  You might want to take a
look at what they have.
        http://www.rtlinux.com
        http://www.rtlinux.org


    Norm



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

From: "M.C. enicon" <[EMAIL PROTECTED]>
Subject: R: Please read...
Date: Sun, 27 May 2001 22:53:56 +0200


psy <[EMAIL PROTECTED]> wrote in message
5p8Q6.814$[EMAIL PROTECTED]
> Hi! <...>
> My first ethernet card is a D-Link DFE-530tx + PCI adapter and my second
one<...>

I don't remember exactly but I think this is the same as my cart at office.
You should have downloaded something like vialinux.tar
To install it, open a terminal, then do this:
$ su - root   (and give root password)
# mount /mnt/floppy
#mkdir /usr/local/DFE
#cp /mnt/floppy/vialinux.tar /usr/local
#umount /mnt/floppy
#cd /usr/local/DFE
#tar xvf vialinux.tar
#rm vialinux.tar
#make all
#cp *.o /lib/module/<version of your kernel, to know it type uname -r>/net
#depmod -a
#modprobe via-rhine

Now your card should be supported, but you  still have to acrivate it.
to do it, do
#ifconfig eth1 <i.p. address you want thia card to have> up
now with ifconfig you should see it.
I don't know exactly how to make all this automatic at the boot. See some
network howto.
I hope this helps, I could be more specific, if you prefer try to mail me
directly

Ciao, Massimiliano





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

From: "M.C. enicon" <[EMAIL PROTECTED]>
Subject: Re: Help!!
Date: Sun, 27 May 2001 22:58:52 +0200


psy <[EMAIL PROTECTED]> wrote in message
MRQP6.4450$[EMAIL PROTECTED]
> As a Linux newbee, I installed RedHat 7.1 successfully even though I am
> having some darn problems (which is normal when you don't master a new
> OS!!).

> 3- When I put a cd on my cd-rom hardware, it works fine but I cannot
re-open
> the door anymore!!  I pressed the exit button many times, without any
> success...  What did I do wrong?

Don't forget to umount it! Usually it is achiavable from the terminal with
#umount /mnt/cdrom

Maybe you should use /cdrom and not /mnt/cdrom, to check it see the table
printed by mount
If the unit is not busy then you can eject, both with button or via

#eject /dev/cdrom

Ciao, Massimiliano



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

From: [EMAIL PROTECTED] (Charles Wilkins)
Subject: gdb warning
Date: Sun, 27 May 2001 22:10:44 GMT
Reply-To: [EMAIL PROTECTED]

Hi all,

When i run gdb, I get warning: unable to find dynamic linker
breakpoint function.
GDB will be unable to debug shared library initializers and track
explicitly loaded dynamic code.

I have installed the latest gdb and gcc.

Minimally, to duplicate this error, I compile with:
g++ -g test.cpp

Then to debug, I run:
gdb a.out

In the debugger when I try to run, is when I get the error.

Anybody care to point out what the cause of this is ?

Thanks in advance for a prompt reply.

Best regards,
Charles Wilkins

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

Date: Sun, 27 May 2001 17:52:51 -0600
From: "D. Stimits" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: is "make bzdisk" broken on RH 7.1?

I am trying to create a boot floppy on a new RH 7.1 SMP machine using a
newer non-redhat kernel, 2.4.5:
ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.5.tar.bz2

I have changed gcc in the toplevel Makefile to be kgcc (this seems to
still be required). All scsi and filesystem support is compiled in and
not a module; nothing required to boot is a module. /boot is the first
part of the drive, / is the next partition. devfs is NOT used. I also
added to EXTRAVERSION to keep this separate in modules:
EXTRAVERSION = -test1

I unpacked the source, then moved it (while in /usr/src/):
mv linux linux-2.4.5

And adjusted sym links:
ln -s linux-2.4.5 linux-2.4
ln -s linux-2.4 linux

Changed /usr/include/ to follow the kernel (RH makes these hard links,
not sym):
cd /usr/include
mv asm asm-original
mv linux linux-original
mv scsi scsi-original
ln -s /usr/src/linux/include/linux/asm-i386 asm
ln -s /usr/src/linux/include/linux linux
ln -s /usr/src/linux/include/scsi scsi

make dep
make modules
make modules_install
make bzImage
cp ./arch/i386/boot/bzImage /boot/vmlinuz-2.4.5-test1
cp System.map /boot/System.map-2.4.5-test1

Not sure if this mattered, but since RH is adding vmlinux to /boot, I
also:
cp vmlinux /boot/vmlinux-2.4.5-test1
(which makes me wonder why RH puts vmlinux there if vmlinuz is there
also...what is the purpose of having both?)

Then creation of a boot floppy in two ways, using several different
floppies to be sure it wasn't a bad floppy:
make bzdisk

Also:
mkbootdisk 2.4.5-test1

The result is that mkbootdisk works, but make bzdisk fails. Make bzdisk
results in never reaching LILO, doing something very much like a prior
failure I had on a different machine with RH 7.1 beta. It is an infinite
loop of:
400
Then AX, BX, CX, and DX register dumps. But this is only on the make
bzdisk version. It was suggested before that maybe the image is going
beyond the end of its allotted space. But since mkbootdisk creates a
filesystem and adds what probably takes a few more bytes to the floppy,
relative to writing it straight to the floppy like make bzdisk, this
seems less likely if it is based purely on image size.

If this image fails on floppies, I'm afraid to run lilo on it to put it
on the hard drive boot record. Even if lilo works installing this to the
MBR (it is on its own drive, the first scsi drive ultra 160 aic7xxx
integrated, with no IDE), I don't trust it till I find out why the
floppy is failing. Maybe it is time to report this to RH bugzilla, but
is there anything else that someone might suggest before doing so? Maybe
kernel compile has changed for 2.4.5? Maybe kgcc shouldn't be used now?

D. Stimits, [EMAIL PROTECTED]

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

From: "psy" <[EMAIL PROTECTED]>
Subject: Did not find COAS??
Date: Sun, 27 May 2001 20:48:03 -0400

Hi!

In order to install the proper driver for my D-Link ethernet card, it is
said on the d-lind website to do the following:

Select COAS from the KDE menu
Choose network, then Ethernet interfaces
Select new device and choose VIA Rhine PCI driver.

Being happy of finally find the answer to my problem (Linux was not
detecting my ethernet card...) I went in KDE.  To my surprise, I did not
find COAS!!  I am missing something?  How can I make sure to select Via
Rhine PCI driver?

Many thanks!

--
Daniel
Visitez mon site Web!!
http://dromadaire.com/cimetiere/psychologie



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

From: [EMAIL PROTECTED] (SammyTheSnake)
Crossposted-To: 
comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.networking,comp.os.linux.setup
Subject: Re: Spambot Fodder : Dont bother to read, just spamming a spammer
Date: Sun, 27 May 2001 09:31:28 +0100

In article <9epgi1$h5b$[EMAIL PROTECTED]>,
mailto:[EMAIL PROTECTED] wrote:
there are easier, more effective, and less irritating ways to do this, you
know...

take it elsewhere.

Cheers & God bless
SammyTheSnake
-- 
Sam.Penny @ Ntlworld.com                  | Looking for a computer related
Linux, Hardware & Juggling specialist :-) | job, if you can help, e-mail me :)
Wheels: bike, 'ickle bike, and unicycle.  | /o \/ Working on 3-5 ball tricks
Boxen: K6-266@300, dual Celery500 & Nx486 | \__/\ 6 balls and 7/8-ball exercises

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

From: Frank Ranner <[EMAIL PROTECTED]>
Subject: Re: Lilo question
Date: Mon, 28 May 2001 11:27:51 +1000

Hugin wrote:
> 
> Hello,
> 
> My bios is set to boot in this sequence : "A,C,SCSI"
> If I install Lilo on drive C, is there a way I can
> make Lilo continue the boot-sequence? Eg. When
> I start Lilo, it displays the different Linux-startups.
> Can I then make Lilo quit(?), and make it continue
> on the booting sequence set by BIOS (eg. SCSI)?
> 
> My possible solution: I think (actually know) A is
> assigned 0x80. So I guess C is assigned 0x81
> and SCSI 0x82. How can I append a line to
> lilo.conf to make it boot the 0x82 device? I've
> tried this line:

The floppy is actually bios device 0x00, the first hard disk
is 0x80 and the second, 0x81. This means that the first scsi disk, 
with scsi id 0 should be the second bios disk, but (the small print) 
only if the scsi card has its own bios, and you have jumpered or 
programmed it to install its own bios. Lilo (the boot loader) does not 
support any disk controllers, it uses int 13 (BIOS calls) to access
disks.

So, does your SCSI card output any messages when it starts? 

What SCSI card do you have?

Regards,
Frank Ranner 


> 
> disk=/dev/sda bios-0x82
> 
> but with no luck. My problem is that linux don't
> support my SCSI controller, an thus lilo cant see
> the device I wish to boot from. Thus it's impossible
> to run lilo, as it won't install the new lilo.conf version...
> 
> Thanks!
> 
> BTW: If anyone wonders why, I posted earlier on
> the same problem under the title: "WinNT boot
> and Lilo boot" )Windows is on the SCSI array.)

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

From: "Joshua K." <[EMAIL PROTECTED]>
Subject: generating keyboard key presses from inside a module.
Date: Mon, 28 May 2001 03:06:05 GMT

Hi,
    I am making a driver for a input device and am designing the driver to
mimic a mouse so that the device can be used in place of one.  The device
has several buttons which I would like the system to see as a key press.
For instance I would like one of the buttons to (when pressed) to make the x
windows system think that the ESC button was pressed.  How can I accomplish
this?

So I want the driver to make a OS think that the user has pushed one of  the
buttons on the keyboard.  Do a do something with the keyboard scan codes
though some function?

Thanks for any help you can provide.
-Josh



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

From: [EMAIL PROTECTED] (yingyi)
Subject: what does the prefix "__" mean
Date: 27 May 2001 20:46:19 -0700

hi,
some functions in the kernel source has a prefix "__". anynoe can tell me what this 
prefix means?
Thanks!

yingyi

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

Date: Mon, 28 May 2001 08:42:49 +0400
From: Vyacheslav Burdjanadze <[EMAIL PROTECTED]>
Subject: Re: g++ => byte alignment

> I want to compile the following with byte-alignment
> How can I do this.
> Exists there any compiler-switch or any pragma-calls???

#pragma pack(1) before structure declaration and pragma pack(4 /*or
appropriate*/ ) after struct declaration.

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

From: Christopher Fairbairn <[EMAIL PROTECTED]>
Subject: Re: what does the prefix "__" mean
Date: Mon, 28 May 2001 17:03:10 +1200

Hi,

yingyi wrote:
> some functions in the kernel source has a prefix "__". anynoe can tell me
> what this prefix means? Thanks!

Where about excatly? Can you be more specific, for example are these 
prefixes you see linking to assembly code etc....

Usually its used for low level functions which the main source doesn't 
really need to use.

For example read calls _read etc... where _read has a platform dependant 
implementation...

Christopher Fairbairn.

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

From: "Peet Grobler" <peetgr at absa.co.za>
Subject: Re: /ttyS0
Date: Mon, 28 May 2001 07:33:53 +0200

Do you have to close the connection? It's not necessary. You can open the
connection only once, and have both processes sending/receiving.

Katie Mueller wrote in message ...
>I have hooked up to computers through a db9 via a null modem cable. I have
>written a talk program that has the following protocol.
>1. A terminal start off as a  sender or reciever.
>2. If sender then the user will input to stdin.
>   The data from stdin will be buffered
>   The buffered data will be transmitted via ttyS0
>   ttyS0 will initially be opened for output then immediately closed
>   after output takes place. This side will end up now waiting for data
>   or response via ttyS0 being opened for read.
>
>3. If terminal starts off as reciever then it does the exact opposite of
>the sender.
>
>
>Problem:
>It works for the first transmission but after that it freezes. (i.e
>The one process that was initially sending will not receive, However the
>other process is able to send.)
>
>Please help
>
>Katie Mueller
>
>****************************
>Katie Mueller
>[EMAIL PROTECTED]
>****************************
>



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

From: "nickwang" <[EMAIL PROTECTED]>
Subject: Another question about device driver application
Date: Mon, 28 May 2001 13:43:31 +0800

Hi,all:
  I have a linux device driver work well,and I want to write a application
to communicate with the device driver. I use the ioctl() function. (Is this
a good choice?) But I encounter some problems when use ioctl()
   Below is my device driver(suppose it's for a lcd)
 ..
#define LCD_HD44780_CAH        _IO('l', 0x10)
#define LCD_HD44780_CLEAR      _IO('l', 0x11)
#define LCD_HD44780_SET_DDRAM  _IOW('l', 0x13, char)
#define LCD_HD44780_LCD_SHIFT  _IOW('l', 0x14, char)

. 
. 
 switch (op) {
    case LCD_HD44780_CAH:  /* Cursor at home */
    display_write_instr(0x02);
    lcd_status.row = 0;
    lcd_status.col = 0;
    udelay(1700);
    break;

   case LCD_HD44780_CLEAR:  /* Clear display */
    display_write_instr(0x01);
    lcd_status.row = 0;
    lcd_status.col = 0;
    udelay(1700);
    break;

   case LCD_HD44780_SET_DDRAM:  /* Set DDRAM address */
    display_write_instr(0x80 | (unsigned char)arg);
    udelay(50);
    break;
. 
. 
.............................
and I wrote a program which use the ioctl() function like this:

. 
. 
#define LCD_HD44780_CLEAR      _IO('l', 0x11)
#define LCD_HD44780_LCD_SHIFT  _IOW('l', 0x14, char)

.....
ioctl(lcd_handler,LCD_HD44780_CLEAR);
ioctl(lcd_handler,LCD_HD44780_LCD_SHIFT,1);
..
......................................
but it doesn't work and the errno returns to say "request or argp is not
valid"
What's the problem?
Any help and advices are greatly appreciated!!
Thank you for all your attention!!





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

From: "Peet Grobler" <peetgr at absa.co.za>
Subject: Re: /ttyS0
Date: Mon, 28 May 2001 07:33:53 +0200

Do you have to close the connection? It's not necessary. You can open the
connection only once, and have both processes sending/receiving.

Katie Mueller wrote in message ...
>I have hooked up to computers through a db9 via a null modem cable. I have
>written a talk program that has the following protocol.
>1. A terminal start off as a  sender or reciever.
>2. If sender then the user will input to stdin.
>   The data from stdin will be buffered
>   The buffered data will be transmitted via ttyS0
>   ttyS0 will initially be opened for output then immediately closed
>   after output takes place. This side will end up now waiting for data
>   or response via ttyS0 being opened for read.
>
>3. If terminal starts off as reciever then it does the exact opposite of
>the sender.
>
>
>Problem:
>It works for the first transmission but after that it freezes. (i.e
>The one process that was initially sending will not receive, However the
>other process is able to send.)
>
>Please help
>
>Katie Mueller
>
>****************************
>Katie Mueller
>[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 by posting to the
comp.os.linux.development.system newsgroup.

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