Linux-Development-Sys Digest #929, Volume #7      Fri, 2 Jun 00 13:13:15 EDT

Contents:
  Program: Output protokoll to a serial interface and to a file ? ("Rachid Broum")
  Re: Outoor camera with linux (Wesley Hosking)
  Re: /proc changes in 2.4.0-test... (Johan Kullstam)
  Re: Linux Gurus needed (Wolfram Faul)
  Re: LILO Configuration Problem ("Robichaud, Jean-Philippe [BAN:6S33:EXCH]")
  Re: Winmodems )Re: Need ideas for university funded project for linux) (Donal K. 
Fellows)
  Re: Task swapping and screen output (Phil)
  Stupid but annoying problem ("Robichaud, Jean-Philippe [BAN:6S33:EXCH]")
  [Report] Kernel problem : ext2 fs directory remained locked ? (Edrusb Dalton)
  A problem with LinuxPthreads (James Connell)
  Re: Why compiling "-static" creates HUGE binary??? (Mario Klebsch)
  Re: Detecting whether another process has a file open (John Reiser)
  Re: Reading binary execute / data file? (John Reiser)
  HELP: dirt-simple net driver panic (Tom Roberts)
  Re: Linux Gurus needed (Marc SCHAEFER)

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

From: "Rachid Broum" <[EMAIL PROTECTED]>
Subject: Program: Output protokoll to a serial interface and to a file ?
Date: Fri, 2 Jun 2000 14:06:46 +0200
Reply-To: "Rachid Broum" <[EMAIL PROTECTED]>

Hello Everyone !

Does somebody find out witch Programm  use the output protokoll to a serial
interface  and in the same time link that output to a file ?

Best regards

Rachid Broum



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

Subject: Re: Outoor camera with linux
From: Wesley Hosking <[EMAIL PROTECTED]>
Date: 02 Jun 2000 10:36:21 +0930

Thierry BUCCO <[EMAIL PROTECTED]> writes:

> Hi,
> 
> I would like to make a program wich retrieve video and sound from an outdoor
> video camera (like surveilance video, or doorman camera) and display in real
> time into the PC screen.
> 
> I would like to know several things...
> 
> What kind of video camera have i to buy (cheap and good) ?

Any Analog style camera (NTSC, PAL ) should be fine. 
Not sure on distance with USB, or parallel port style cameras....

> What kind of connection Camera->PC (most common, and cheap) ?

Usually use a bt848 based card, but there are heaps of 
other choices - look at : 
http://www.atlantek.com.au/~wes/linux/frame/

for pointers to most of the packages around (Video for Linux - V4l ) 
is included in the kernel.

> Must i get a compression card ?

No its not neccessary for a security application.

> Must i make all the drivers ?
V4l are in the kernel

V4l2 requires a bit of work.

Applications for this sort of thing are monitor and nemesis 
(Do a freshmeat search to find these, or look at my Linux
imaging bookmarks, )

wes


> 
> Thanks a lot for your help, because it's difficult for me, i don't know
> electronic.
> 
> The camera will located up to 20 meters (approximately).

Analog cameras can go a lot further - any usual external security camera
are usually analog (ie: they plug into a VCR or TV monitor ).


> 
> Thanks a lot for your help.
> 
> thierry

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

From: Johan Kullstam <[EMAIL PROTECTED]>
Subject: Re: /proc changes in 2.4.0-test...
Date: 02 Jun 2000 08:42:47 -0400

Sam Birch <[EMAIL PROTECTED]> writes:

> Please forgive my ignorance, but what is LART, as in LARTable?

a LART is a Luser Attitude Readjustment Tool.  this is a system
administration tool.  usually this is a blunt object like a baseball
bat.  unix people tend to prefer command lines, but in this case, the
more graphic the better.  other physically violent methods are favored
by different system administrators.

to paraphrase (i.e., attempt to quote) alexander viro, a LART is that
which you use to implant the clue into a luser's head.

-- 
johan kullstam l72t00052

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

From: Wolfram Faul <[EMAIL PROTECTED]>
Subject: Re: Linux Gurus needed
Date: Fri, 02 Jun 2000 15:07:33 +0200

Hi all,
yes that�s possible. You need a the BIGPHYSAREA-Patch.
(http://www.polyware.nl/~middelin/hob-v4l.html). The version for kernel
2.3.40 works well on 2.4.0-test1.
This patch allocates physical memory at bootime. With a spiecial malloc
function you can alloc memory from this area.
caddr_t bigphysarea_alloc_pages(int count, int align, int priority)
There is an option for alignment if you need it.


Wolfram

Julian Ruhe wrote:

> Hi,
>
> I have a short but, for me, most important question:
>
> Is it possible under Linux to allocate a 64KB sized block of memory,
> that is PHYSICALLY (not virtually) aligned on 32KB!!! boundaries and
> hanging together in memory (not split by system paging!).
> I need a very clear "yes" or "no" and if possible, "how"!
>
> Thank you very much
>
> Julian
>
> p.s. Reply directly to me also. Thank you!


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

From: "Robichaud, Jean-Philippe [BAN:6S33:EXCH]" <[EMAIL PROTECTED]>
Subject: Re: LILO Configuration Problem
Date: Fri, 02 Jun 2000 21:54:45 -0400

Hi,

 You need to export a bootsect.lnx each time you do a "lilo" on your
linux system.  When you run lilo, you modify the disk (hdb) MBR so you
need to export it so that the OS loader will load the correct
bootsector.  To do this, use :
dd -bs 512 -c 1 -i /dev/hda7 -o /mnt/hda/bootsect.lnx
^
^----  This assume that you have mount your C: drive in /mnt/hda

You have to do this everytime you compile a new kernel or when you run
"lilo"

There is no problem with lilo no being on the first disk, you must
simply export your bootsector.  

        Hope it'll help

                Jean-Philippe Robichaud 

Jay Randall wrote:
> 
> Hello,
> 
> I am rebuilding the kernel. The machine I am using is dual bootable with
> Windows NT and Linux.  As a backup to the newly built kernel not working, I
> am keeping a backup of the original kernel to boot with.  As a test, I
> copied the kernel to *.OLD, and added an entry in lilo.conf to point to the
> newly created backup.  I then ran lilo.  The result of this was a warning
> about the /dev/hdb7 not being on the first drive, followed by comments about
> adding Linux *, LinuxOld and dos.
> When I boot, I choose Linux from the Windows OS Loader, which invokes LILO.
> However, now that I have changed lilo.conf, LILO prints out LIL- and locks
> up.
> Does anybody have an idea why this happens?
> Is there some problem with LILO not being on the MBR?
> 
> P.S. I subsequently went back to the old lilo.conf, ran lilo again, and I am
> still getting the same results (LIL- and locks up).
> 
> Thanks for the help,
> Jay.

-- 
        Jean-Philippe Robichaud
        [EMAIL PROTECTED]
        (514) 818-7750
        St-Laurent, Quebec, Canada

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

From: [EMAIL PROTECTED] (Donal K. Fellows)
Crossposted-To: 
comp.os.linux,comp.os.linux.development,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.setup,comp.os.linux.advocacy
Subject: Re: Winmodems )Re: Need ideas for university funded project for linux)
Date: 2 Jun 2000 14:59:14 GMT

In article <3934f551.1073003@news>, Jan Knutar <[EMAIL PROTECTED]> wrote:
> My 33.6 modem often passes 128Kb/s when sucking usenet posts.

Your USENET newsgroup set must be more compressible than mine; I
rarely get more than 90Kb/s through a faster connection (and yes, it
is going full tilt...)

(Perhaps I read groups with more new signal in them and less repeated
noise.  :^)

Donal.
-- 
Donal K. Fellows    http://www.cs.man.ac.uk/~fellowsd/    [EMAIL PROTECTED]
-- I may seem more arrogant, but I think that's just because you didn't
   realize how arrogant I was before.  :^)
                                -- Jeffrey Hobbs <[EMAIL PROTECTED]>

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

From: [EMAIL PROTECTED] (Phil)
Subject: Re: Task swapping and screen output
Date: 2 Jun 2000 16:37:09 GMT
Reply-To: [EMAIL PROTECTED]

Jeremy Young -[[EMAIL PROTECTED]]- spewed forth the following rubbish:
>Hi Guys & Gals,
>
>As somewhat of a Linux newbie I have a question that may be obvious.
>
>I have a project to build a system which runs multiple telnet sessions 
>simultaneously. It must be possible to remotely switch between these 
>sessions so as only one session is ever viewed at any one time (Using 
>some form of a socket interface).
>
>OK, Simple you say, I essentially bring the desired process to the 
>foreground and that's it...But I would like the user to actually be able 
>to see what WAS being sent to the telnet session on screen when the swap 
>is made - as if the screen had been there the whole time. 
>
>I am thinking that just swapping tasks is not going to allow the user to 
>see what WAS happening just prior to the swap.
>
>Is there any way of buffering these telnet sessions so as when the swap 
>occurs the screen is rebuilt AS IF the session had been in the 
>foreground the whole time?
>
>If another NG is more suitable for this question, please advise and I'll 
>repost!

You might wanna have a look at the BitchX source since it does that with
multiple windows. You should be able to buffer the input from the telnet
session and then display it onscreen when necessary. BitchX does this very
well IMHO.
Phil.

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

From: "Robichaud, Jean-Philippe [BAN:6S33:EXCH]" <[EMAIL PROTECTED]>
Subject: Stupid but annoying problem
Date: Fri, 02 Jun 2000 23:19:05 -0400

Hi

This is not a developpement problem directly but I gives me a hard
developping on my linux box.  My linux box is in a lab somewhere else in
the building and I work on it by doing telnet.  Each time I wish to
telnet the linux box, it takes about 50-70 second before I have the
login prompt.  Does anybody know what is wrong ?  If I telnet another
machine, i just work great...

        Thanks you for helping me because as I do developpement in the kernel,
I often have to reboot and to relogin.  This will help me not taking a
walk to the lab ~10 times a day !!!


-- 
        Jean-Philippe Robichaud
        [EMAIL PROTECTED]
        (514) 818-7750
        St-Laurent, Quebec, Canada

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

From: Edrusb Dalton <[EMAIL PROTECTED]>
Crossposted-To: linux.dev.kernel
Subject: [Report] Kernel problem : ext2 fs directory remained locked ?
Date: Fri, 02 Jun 2000 15:57:33 +0000

Hello all,

Here is, a description of what succeed on my Linux box. I don't ask any
help for solving a problem, this is just for information in case it
might be helpful to someone to find what I think to be a bug in the
kernel, but I may be wrong (so take it as an objective report of live
situation, and do what you want with it ! Thanks). 

On a ext2 file system (root file system), I've got all processes
accessing a given directory, in uninterruptible sleep (status displayed
with 'D' by ps and top). At the beginning only one process was in D
state. the system (kernel i686, version 2.2.6) was up for 43 days, when
this succeeded.
remounting the root file system read only in single user mode, and using
"e2fsck -f /" I could see that the file system was not corrupted.
remounting it back read-write did not solve the problem. several
processes were still in D state at the openning of the directory
(example : ls /strange/directory)
 
For the rest all was OK. But to access this directory, the only thing I
could do was rebooting the system. Oh yes, maybe this is important : a
few hours before the first process get in D state reading this
directory, I got in syslog the following kernel message :

Jun  1 05:18:08 kernel: Unable to handle kernel paging request at
virtual address c80200e0
Jun  1 05:18:08 kernel: current->tss.cr3 = 04b9b000, %cr3 = 04b9b000
Jun  1 05:18:08 kernel: *pde = 07e77063
Jun  1 05:18:08 kernel: *pte = 00000000

After the reboot, forcing the filesystem check again, gave no error, and
the access to this directory made no more any problem. 

If I forgot an important detail or information, please tell me. You can
find my email through my web homepage.

http://denis.corbin.free.fr/

Regards,

Denis.

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

From: James Connell <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: A problem with LinuxPthreads
Date: Fri, 02 Jun 2000 12:09:02 -0400

Hello,

I've been having a problem compiling a program using LinuxPthreads (0.8
as included with RedHat 6.0) for quite some time.  In the program I am
making use of the non-portable call "pthread_mutexattr_setkind_np" to
setup a recursive mutex as below:

[snip]
#include <pthread.h>
...
pthread_mutexattr_t attr;

pthread_mutexattr_init(&attr);
pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);

[end snip]

The main problem is that g++ will generate a warning stating that
"pthread_mutexattr_setkind_np" is not defined.  I attempted to remedy
this by defining the function as it is declared in the appropriate
manpage.  After doing this, I cannot link the library as the symbol for
"pthread_mutexattr_setkind_np" is undefined.

I looked at /lib/pthread.so and sure enough the symbol was defined as a
weak symbol.  Does anyone know what might be going on?  Or even better
would anyone have an alternative suggestion for creating a recursive
thread ?  Thank you for any help in advance!!

Jim


--
Jim Connell [[EMAIL PROTECTED]] - Research Engineer, IFS International

010110010110111101110101 011000010111001001100101
01100001 0110011101100101011001010110101100100001




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

From: [EMAIL PROTECTED] (Mario Klebsch)
Crossposted-To: alt.os.linux,linux.dev.c-programming,linux.dev.gcc
Subject: Re: Why compiling "-static" creates HUGE binary???
Date: Fri, 2 Jun 2000 11:11:00 +0200

Graham Stoney <[EMAIL PROTECTED]> writes:

>Why? Because exit() calls free() to release functions registered with atexit(),
>even if you don't actually use atexit(). free() resides is malloc.c, as does
>malloc_stats(), which calls fprintf(). So a static link against glibc gets
>the rather hefty GNU malloc & printf, even if they don't call either directly.
>Few non-trivial programs can avoid malloc(), but statically linked C++
>programs for instance are paying for printf(), though they may never use it.

It seems like its time for a bug report.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

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

From: John Reiser <[EMAIL PROTECTED]>
Subject: Re: Detecting whether another process has a file open
Date: Fri, 02 Jun 2000 09:40:03 -0700

Are you writing a disk backup program?  Then see what other backup programs do.
Use /usr/bin/strace (man strace), etc., to snoop and gather clues.

Is the disk using RAID of high enough degree?  Then a deliberate "hot swap"
might give you much of what you want.

If you cannot enforce cooperative use of locking, then the "open for write"
status of any file or directory can change at any time.  So always there
will be a race or a hazard.  In some ways, the best you can hope for is
to attempt O_EXCL. If it succeeds, then you win; but it might never succeed:
some other process might always get there first.

rename(2) is atomic (but read the manual page carefully, and inspect the code),
but there isn't any atomic "compare and swap" which would let you "copy"
the file instantaneously.

-- 
John Reiser, [EMAIL PROTECTED]

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

From: John Reiser <[EMAIL PROTECTED]>
Subject: Re: Reading binary execute / data file?
Date: Fri, 02 Jun 2000 09:55:26 -0700

The common utilities /usr/bin/size, /usr/bin/nm, /usr/bin/objdump,
and /usr/bin/objcopy do some things related to what you're looking for.
See also the 'readelf' program, which is a part of the GNU binutils package.

-- 
John Reiser, [EMAIL PROTECTED]

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

From: Tom Roberts <[EMAIL PROTECTED]>
Subject: HELP: dirt-simple net driver panic
Date: Fri, 02 Jun 2000 11:51:26 -0500

I am trying to write a network driver for Linux to talk to our board.
It panics the kernel. I have abstracted out to the simplest code I
can and it still panics the kernel -- nothing related to our board 
remains.

This is Red Hat Linux release 6.2 (Zoot), Kernel 2.2.14-5.0 on i586,
and the box is a Pentium 166 with 64 MB RAM. It has an Ethernet
connection to our LAN, and I NFS mount the disk where I work (so
crashes can't destroy my work (:-)).

I followed Rubini's book _Linux_Device_Drivers_ (with slight 
modifications for 2.2 kernel differences he didn't/couldn't mention). 
I do the following:

        cc -O -c -DMODULE tnet.c
        insmod tnet.o
        ifconfig tnet 192.168.0.1 up

At this point the net device "tnet" is up and everything is OK and
still stable. The ifconfig even added a route to 192.168.0.*. 
Now I do:

        ping 192.168.0.2        # some other computer on that subnet
                                # sends 1 pkt/sec until interrupted

The tnet driver does the printk indicating it is dropping a packet,
but after a few dozen to a few hundred such messages I get:
        Cannot handle kernel paging request at address 00080000
        [.... register dump, etc., Process swapper (pid: 0)]
        Aiee, killing interrupt handler
        Kernel panic: Attempted to kill the idle task!
Once this panic destroyed the local disk (:-(), but usually it merely 
forces an fsck on reboot (but they are clean).

The hard_start_xmit() routine is as simple as possible:
        int tnet_xmitpkt(struct sk_buff *skb, struct device *dev)
        {
                if(!skb || !dev) return 0;
                dev_kfree_skb(skb);
                printk(KERN_NOTICE "tnet_xmitpkt dropped pkt skb=%08X dev=%08X\n",
                                                        skb,dev);
                dev->trans_start = jiffies;
                return 0;
        }
Yes, this does nothing, but why does it panic the kernel??? Clearly
something in this driver is misbehaving and clobbering something 
else....

Below is the complete source to tnet.c -- there's no provision to
receive packets at all -- until I can send packets there's no need.

Any help would be greatly appreciated -- what am I missing???

Tom Roberts     [EMAIL PROTECTED]


/*      tnet.c -- Linux Module for Tnet driver   */
 
#define __KERNEL__
#include <linux/types.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/proc_fs.h>
#include <asm/uaccess.h>
#include <linux/ioport.h>
#include <asm/io.h>
#include <asm/byteorder.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
 
static struct enet_statistics Enet_stats;
 
int tnet_start(struct device *dev)
{
#ifdef MODULE
        MOD_INC_USE_COUNT;
#endif
        memset(&Enet_stats,0,sizeof(Enet_stats));
        dev->start = 1;
        printk(KERN_NOTICE "tnet_start\n");
        return 0;
}
 
int tnet_stop(struct device *dev)
{
#ifdef MODULE
        MOD_DEC_USE_COUNT;
#endif
        dev->start = 0;
        printk(KERN_NOTICE "tnet_stop\n");
        return 0;
}

int tnet_xmitpkt(struct sk_buff *skb, struct device *dev)
{
        if(!skb || !dev) return 0;
        dev_kfree_skb(skb);
        printk(KERN_NOTICE "tnet_xmitpkt dropped pkt skb=%08X
dev=%08X\n",skb,de
v);
        dev->trans_start = jiffies;
        return 0;
}
 
int tnet_rebuild_header(struct sk_buff *skb)
{
        return 0;
}
 
int tnet_hard_header(struct sk_buff *skb, struct device *dev,
                unsigned short type, void *daddr, void *saddr, unsigned
len)
{
        return 0;
}
 
struct enet_statistics *tnet_get_stats(struct device *dev)
{
        return &Enet_stats;
}
 
int tnet_set_config(struct device *dev, struct ifmap *ifmap)
{
        return -EINVAL;
}
 
int tnet_netinit(struct device *dev)
{
        ether_setup(dev);
        dev->open = tnet_start;
        dev->stop = tnet_stop;
        dev->set_config = tnet_set_config;
        dev->hard_start_xmit = tnet_xmitpkt;
        dev->get_stats = tnet_get_stats;
        dev->rebuild_header = tnet_rebuild_header;
        dev->hard_header = tnet_hard_header;
        dev->hard_header_len = 0;
        dev->flags |= IFF_NOARP;
        dev->flags &= ~(IFF_MULTICAST | IFF_BROADCAST);
        printk(KERN_NOTICE "tnet_netinit\n");
        return 0;
}
 
char Tnet_netname[] = "tnet";
struct device Tnet_netdev = {
        Tnet_netname,
        0, 0, 0, 0,
        0x000,
        0,
        0, 0, 0,
        NULL,
        tnet_netinit,
};
 
 
#ifdef MODULE
 
/*      module management       */
 
int init_module(void)
{
        int m;
        m = register_netdev(&Tnet_netdev);
        if(m < 0) {
                printk(KERN_ERR "Tnet Create error %d\n",m);
        } else {
                printk(KERN_NOTICE "Tnet driver installed.  dev=%08X\n",
                                                        &Tnet_netdev);
        }
        return 0;
}
 
void cleanup_module(void)
{
        unregister_netdev(&Tnet_netdev);
        printk(KERN_NOTICE "Tnet driver removed.\n");
}
 
#endif  // MODULE

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

From: Marc SCHAEFER <[EMAIL PROTECTED]>
Subject: Re: Linux Gurus needed
Date: 2 Jun 2000 13:25:44 GMT

Julian Ruhe <[EMAIL PROTECTED]> wrote:
: Is it possible under Linux to allocate a 64KB sized block of memory,

kmalloc() in kernel module, then map to user space. Upto 128k possible
with later kernels. Newest kernel also have bigphysarea, to reserve
much more contiguous memory.

the kmalloc() way may fail after some time because of memory
fragmentation.

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


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