Linux-Development-Sys Digest #868, Volume #7     Wed, 17 May 00 15:13:13 EDT

Contents:
  ext2 block groups and raw I/O (James Johnson)
  Re: Need ideas for university funded project for linux (JEDIDIAH)
  where can I find a SCSI and IDE specifications ("Tom Lynch")
  inline-limit might be fun to try (Eric Taylor)
  LGS GM92c910 , 911 ethernet chips ("Pavel Tkatchouk")
  kernel-2.2.14 ip_forward.c ->ip_do_nat(...) question.. (NortonNg)
  Re: Need ideas for university funded project for linux (eyez)
  Re: A book for linux kernel (Eric Taylor)
  Re: where can i find a kernel debugger? (Eric Taylor)
  slow tftp ("Pavel Tkatchouk")
  Re: Need ideas for university funded project for linux (Leslie Mikesell)
  Re: using ftp within a C-program (Mario Klebsch)
  porting NT device drivers to linux ([EMAIL PROTECTED])
  Re: RS-485 (Grant Edwards)
  Re: Need ideas for university funded project for linux (Mongoose)

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

From: James Johnson <[EMAIL PROTECTED]>
Subject: ext2 block groups and raw I/O
Date: Wed, 17 May 2000 12:17:19 -0400

I'm trying to do raw I/O on an ext2 file system and have two questions:

(A) Is there a good explanation of what routines to use, and how to use
them, for raw I/O on an ext2 file system? I have a good grip (I think)
on the structure of the file system from _Linux Kernel Internals_ but
haven't found a good routine for raw I/O. The bread() function only
appears to read up to 65536 blocks, which, for 1024 byte blocks, will
only address a 65Mbyte or smaller partition. What routine reads blocks
on larger partitions?

(B) In examining two ext2 partitions I've noticed some strange behavior
in the placement on block groups on the partition, which leads to the
second question: How does the ext2 file system create block groups?

(1) Does it create a block group on the fly when it needs more blocks,
or when it creates the file system?
(2a) If it creates block groups on the fly, does it do so sequentially,
or does it hash them irregularly around the disk?
(2b) If it creates all block groups when it creates the file system,
what might cause ext2 to remove a block group?

The reason I ask is that the two disk partitions that I have looked at
don't have regularly spaced block groups. Here's the information about
one:

size: 37+ MBytes
block size: 1024 bytes
number of blocks per group: 8192 blocks
number of block groups: 37M / (1024 * 8192) -> 5 block groups
expected addresses of block group superblocks: block 1, block 8193,
block 16385, block 24577, and block 32769

I wrote a program to look at every block on the partition for the ext2
signature. If it finds the signature it dumps the block to a file for
manual inspection. On the disk that is described above, valid block
group superblocks exist at block 1, block 8193, and block 24577 and
nowhere else.  Why is it that there are not valid superblocks at blocks
16385 and 32769?

The other disk partition that I have examined is much larger (much
larger than 65Mbyte, in fact, which is why I'd like to address large
partitions) but also has missing superblocks.


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

From: [EMAIL PROTECTED] (JEDIDIAH)
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: Need ideas for university funded project for linux
Date: Wed, 17 May 2000 16:30:31 GMT

On Wed, 17 May 2000 09:12:05 +0200, Richard Gill <[EMAIL PROTECTED]> wrote:
>U can think about a New WindowManager, with a good interface, and toolkit
>independant, but with possibly rely to Gnome component (I mean bonobo for
>example). I'm already beginning on that project (alone for the moment, and
>only on paper) so we could help together ;-)

        Nah, high performance open source multimedia codecs would be far
        more useful. Plus, everyone and their brother is already trying 
        to manage a better mousetrap... er Window Manager or File Mangler.
        Plus there's really no relative benefit to a University taking on
        such a project versus something else which may involve remarkably
        complicated algorithms.

        A Sorenson replacement would be good, as would an efficient mpeg2
        implementation. A new 3D API modeled around current consumer
        graphics hardware might also be quite useful.

>
>bye.
>
>Mongoose <[EMAIL PROTECTED]> a �crit dans le message :
>[EMAIL PROTECTED]
>> Hello,
>> I am attempting to start a college project and have two of my
>> ideas already being worked on. So I wanted to know what other people
>> had for suggestions for linux projects? I was thinking of something
>> along the lines of a project that would help promote the use of linux.
>> What is something that most people could use? Something that could
>> make a good 1 year R&D project?
>
>


-- 

    In what language does 'open' mean 'execute the evil contents of'    |||
    a document?      --Les Mikesell                                    / | \
    
                                      Need sane PPP docs? Try penguin.lvcm.com.

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

From: "Tom Lynch" <[EMAIL PROTECTED]>
Subject: where can I find a SCSI and IDE specifications
Date: Wed, 17 May 2000 11:39:23 -0500

the scsis howto had the addresses:
    ftp.es.tulane.edu
    ftp.symbiosis.com

neither resolved



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

From: Eric Taylor <[EMAIL PROTECTED]>
Subject: inline-limit might be fun to try
Date: Wed, 17 May 2000 09:45:28 -0700

Mathias Waack wrote:
> 
> Eric Taylor wrote:
> > > Have you tried something like adding a -Dinline="" option to the topmost
> > > kernel Makefile?
> >
> > Yes, I got a string of error messages which I did not
> > try to diagnose further. I think there is something non-standard
> > about the use of inline in the procedure def. When I tried to
> > compile these routines with another compiler, it didn't accept
> > the inline keyword in that position.
> 
> The kernel sources use a lot gcc extensions so it should be nearly
> impossible to compile the kernel with a different compiler.
> 


I just got a copy of R. Stallman's GCC user guide, for version 2.95
and I see that there is a new option  called -f-inline-limit-n 
where you can adjust according to size what procedures get inlined.

I think this should allow us to see what would happen with inlining
turned
off. For example, I have to use bzImage for my kernel as zImage
is too large. There could be uses for this other than just speed
tradeoffs.

My version of GCC, which is 2.91 and came with redhat 6.1, does not
have this feature yet.

Perhaps someone who already has the new compiler installed might
want to experiment.

e

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

From: "Pavel Tkatchouk" <[EMAIL PROTECTED]>
Subject: LGS GM92c910 , 911 ethernet chips
Date: Wed, 17 May 2000 09:50:54 -0700

Did anybody work with those? What is the difference 911vs.910?

Does anybody know where to get their databooks (manufacturer
LG Semicon seize to exist)?

Thanks.


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

From: NortonNg <[EMAIL PROTECTED]>
Subject: kernel-2.2.14 ip_forward.c ->ip_do_nat(...) question..
Date: 17 May 2000 16:49:53 GMT

[ This is a repost of the following article:                               ]
[ From: NortonNg <[EMAIL PROTECTED]>                         ]
[ Subject: kernel-2.2.14 ip_forward.c ->ip_do_nat(...) question..          ]
[ Newsgroups: comp.os.linux.development                                    ]
[ Message-ID: <8fu0re$mfo$[EMAIL PROTECTED]>                     ]


in kernel 2.2.14 net/ipv4/ip_forward.c, there are a piece of code like that:

#ifdef CONFIG_IP_ROUTE_NAT
        if (rt->rt_flags & RTCF_NAT) {
                if (ip_do_nat(skb)) {
                        kfree_skb(skb);
                        return -1;
                }
        }
#endif

i wonder, what is the different between ip_fw_masquerade,ip_fw_demasquerade,
it seem that no this piece of code in kernel 2.0.x.
i have read the ip_nat_dumb.c, but i don't know the different, can anyone
tell me about that?

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

From: [EMAIL PROTECTED] (eyez)
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: Need ideas for university funded project for linux
Reply-To: [EMAIL PROTECTED]
Date: Wed, 17 May 2000 16:52:41 GMT

quoting <[EMAIL PROTECTED]>:
>Mongoose <[EMAIL PROTECTED]> writes:
>
>>   I was thinking, maybe not just servers and stuff, but an application
>> that windows users have but linux doesn't. Something that would give
>> windows users more of an incentive to move to linux, or help them
>> migrate to linux.
>
>The way I see it, Linux needs the following, at minimum, before it can
>be a legitimate competitor to Windows:
>
>1. A streamlined, easy install process;
>2. An office suite roughly as functional as Office, and at least as
>   easy to use;
>3. A GUI package installation mechanism that's as easy to use as
>   InstallShield (trivial if we get a file manager for GNOME or KDE); and
>4. A GUI interface to the most common configuration files.
>
>In order to beat Windows, client-side, we need:
>
>1. A GUI interface to *all* configuration files;

Ugh. that's why i LEFT windows.

maybe the whole world SHOULDN'T run linux. It's not a system that's made to
be like windows.

>2. Integration of all Linux documentation into a centralized,
>   searchable help center;
>3. A DirectX-like platform for hardware-accelerated devices, not
>   necessarily at the kernel level;
>4. Abstraction of many protocols and features, ala ODBC (which I hate
>   because it never works, not because it's a bad idea); and
>4. A "killer app."  Unfortately, the odds of this being in the office
>   suite are about zero, as MS has far too much of an edge on this
>   front.  The GIMP, with a few unique features, may have the
>   potential to get there.
>
>Linux has survived largely because its only real competitor,
>reliability- and performance-wise, was NT, which few "regular" people
>liked because it runs about as many Windows programs as Linux.  But
>with Windows 2000 out, suddenly the "mainstream" Windows is comparably
>stable and feature-laden.  I think that, unless Linux starts playing
>catch-up in a big way, we're going to be relegated to the niche market
>we've been, until recently, exclusively a part of.
>
>I suppose that now I'm going to have to get Linux running again so I
>can put my programming hours where my mouth is.  (Reason I'm not using
>it now?  The fucking Aureal Vortex 2 drivers are (a) non-free; and (b)
>unusably poor.)
>
>-- 
>Eric P. McCoy ([EMAIL PROTECTED])
>
>non-combatant, n.  A dead Quaker.
>        - Ambrose Bierce, _The Devil's Dictionary_


-- 
Rando Christensen
[EMAIL PROTECTED]
<perception is reality>

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

From: Eric Taylor <[EMAIL PROTECTED]>
Subject: Re: A book for linux kernel
Date: Wed, 17 May 2000 10:06:39 -0700

bill davidsen wrote:
> 
> In article <[EMAIL PROTECTED]>,
> Failed Cracker  <[EMAIL PROTECTED]> wrote:
> | Hallo. I need an advice: i would like to become a linux kernel developer,
> | but I don't really know where to start from. I am a c-c++, assembler x86
> | programmer, but without a guide about the logical organization of the
> | kernel it's hard to manipulate the source code. Can anybody suggest me a
> | book or a document about it? Tnx.
> 

I started by searching amazon.com for titles on linux kernel. I found
3 books. Two, (linux kernel internals, Bech, Bohme et al and Linux
Kernel Book
by Remy Card, Eric Dumas et al) covered only up to version 2.0. The
first 
of these 2 is better IMHO and has a rather good reference Appendix.

The third book is the Linux Core Kernel Commentary, which covers up to
2.2
is pretty good. It has 2 sections, half is selected kernel listings and
half is a comentary. It is well cross referenced between the two
sections
and has a pretty good index. I found lots of useful info there,
including
answers to some mysteries, such as the ubiquitous do while {...} {0}
construct.

I was slightly disapointed with the coverage on SMP, as I was looking
for information on how to know when to use (and which) spinlocks. But
maybe that
is in too much flux right now for there to be a book on it.

I also have the guide to writing a device driver. But that is 
more for drivers as the title suggests. There are also some online
docs at the kernel doc project website. The one on kernel modules
was real cool and the examples were perfect for getting started.

hope that helps
e

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

From: Eric Taylor <[EMAIL PROTECTED]>
Subject: Re: where can i find a kernel debugger?
Date: Wed, 17 May 2000 10:13:02 -0700

Vicente Aurelio Esteve Lloret wrote:
> 
> In article <[EMAIL PROTECTED]>,
>    Anand Krishnamoorthy <[EMAIL PROTECTED]> wrote:
> >
> >--------------6E7F8B2E8C6ECF507986F680
> >Content-Type: text/plain; charset=us-ascii
> >Content-Transfer-Encoding: 7bit
> >
> >
> >
> >> Best and safest way is to use printk for debugging.
> >
> >Disputable... KDB is pretty good enough....


I tried to get xkdebug, but found it only really set up
for specific versions of the kernel. I contained lots of
patches that I do not know how to modify for my version.


But, gdb /usr/src/linux/vmlinux /proc/kcore
is a useful trick. I modified my Makefile to include -g
so I would have kernel symbols available.

It would be nice if gdb had an option to NOT CACHE though.
I does appear to have this on remote debugging, but not
for the above trick. So you have to reload the /proc/kcore
file everytime you want to see up to date values.

e

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

From: "Pavel Tkatchouk" <[EMAIL PROTECTED]>
Subject: slow tftp
Date: Wed, 17 May 2000 10:20:15 -0700

Sorry folks if this gets repeated, but looks like the first posting 
didn't make it to the group.

===========
Hi there!

I would appreciate if someone could give me a hint with what
to look for (in the NIC's driver, tftp client code?) to fix the following
problem.

Our diskless SBC client started to boot very slow when board supplier
moved from LGS GM92c910 chip to 911. Analysing tftp log I've noticed
a lot of re-transmission timeouts (server hasn't got ACK from bootprom).

server - Tellurian's bootpdnt/tftpdnt on NT4SP3.
client - diskless SBC.
bootprom - Etherboot-4.6.0.
card - onboard LGS GM82c911.


Hints:
>From Linux, Win95, NT it (LGS GM82c911) performs well .
The same client boots fine from some servers, but slow from 
the others (same NT4/tftpdnt, different hardware). With 910 it 
boots fine from any server we tested. Etherboot-3.2, 4.0 is
also slow with 911, but OK with 910.

Diskless client is attached to the boot server through a 10Base-T 
hub, no other boxes attached.

Regards,

Pavel Tkatchouk
[EMAIL PROTECTED]



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

From: [EMAIL PROTECTED] (Leslie Mikesell)
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: Need ideas for university funded project for linux
Date: 17 May 2000 12:38:10 -0500

In article <[EMAIL PROTECTED]>, martin <[EMAIL PROTECTED]> wrote:
>
>>      I am attempting to start a college project and have two of my
>>ideas already being worked on. So I wanted to know what other people
>>had for suggestions for linux projects? I was thinking of something
>>along the lines of a project that would help promote the use of linux.
>>What is something that most people could use? Something that could
>>make a good 1 year R&D project?
>
>How about an easy-to-use text editor ? (console, not GUI please :) ?
>One without a million complex commands, but with ability to select
>text with shift+arrow keys, like most dos/windows/os2-based editors
>do, F2 to save a file instead of Ctrl-x + Ctrl-s or something and
>those other features that are standard on other operating systems.
>
>Basically, a simple editor that doesn't need a 300-page tutorial. 
>I can't find any of those in linux. Not for console anyway.

You would probably like nedit under X.  I'm surprised there is
not a DOS EDIT clone for character mode - or is there?  Vi is
worth the trouble to learn in the long run, but it is so different
from anything else that it is quite a shock.  If you go that
route, learn 'U' and 'u' first so you realize that a mistake
isn't fatal.

  Les Mikesell
   [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: using ftp within a C-program
Date: Wed, 17 May 2000 18:14:50 +0200

Josef Moellers <[EMAIL PROTECTED]> writes:

>- create a file $HOME/.netrc with the following contents:
>  machine <remote-name>
>  login <remote login name>
>  password <remote password>
>  macdef init
>  <put all commands you want executed here>
>  <terminated by an empty line>
>- execute the ftp program, e.g. by calling "system("ftp
>remote.machine");"
>- remove the $HOME/.netrc file.
>Make sure the .netrc file has a very restricted set of access rights,
>"r--------" should suffice.

Why not use popen(3) to start the ftp client program and feed the user
name/password/commands through stdin?

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED]
Subject: porting NT device drivers to linux
Date: Wed, 17 May 2000 17:57:02 GMT

Hello world....
This ist the first time I write to a newsgroup.
Sorry for the mistakes I will made.

Im a student and for my dissertation I have to
port a NT driver (plus DLL) for a PCI Card to
LINUX.
Im a newbie in driverprogramming and Linux but I
read
lots of books about it (i.e. Rubini, KHG, LKMPG).

I think the best way for the driver is a module,
but
I dont know how to port the dll - is there a
similar
concept in Linux or should I write a second
module for
it and stack it onto the driver module.

It would be very great if somebody give me advice
to
this term.
General help/hints/tricks/tips to this theme are
also
very welcome.

Thanks,
Michael Palme ([EMAIL PROTECTED])




Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: grant@nowhere. (Grant Edwards)
Subject: Re: RS-485
Date: Wed, 17 May 2000 18:13:57 GMT

In article <[EMAIL PROTECTED]>, Tobias Anderberg wrote:

>I'm about to add support for rs-485 for a project I'm working
>on. I don't want to make this a user-space driver, instead I
>would like to add this directly to the existing serial driver,
>and make it easy accesible with an ioctl(), like "ioctl(fd,
>RS485, &n);" and then all communication with the serial device
>would be done using rs-485 semantics.

RS-485 specifies voltage levels etc.  It has nothing to do with
software except for the possible need to manually control the
"direction" of the line driver/receiver by toggling RTS.

If the half-duplex business is what you mean by "RS-485
semangic", I once modified that Linux 16550 serial driver to
automatically control RTS for half-duplex communication (I was
using Bell-202 modems rather than RS-485, but it's the same
problem).

It never really worked very well: with the UARTs in PCs it's
difficult to know when the transmitter shift register is empty
and the final stop bit has been sent. I could get the driver to
work reliably with a particular brand of UART, but another brand
would act differently, and wouldn't work well.  We had similar
problems with MS-Windows code.

My solution was to by a serial board that supports half-duplex
communiction directly.  Most of the better add-on serial boards
(Cyclades, Comtrol, Digi, etc.) support half-duplex mode.

Alternatively, you can use RS-232 to RS-485 converters that
hand the line directly automatically.

-- 
Grant Edwards                   grante             Yow!  So this is what it
                                  at               feels like to be potato
                               visi.com            salad

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

From: Mongoose <[EMAIL PROTECTED]>
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: Need ideas for university funded project for linux
Reply-To: [EMAIL PROTECTED]
Date: Wed, 17 May 2000 18:16:13 GMT

On Wed, 17 May 2000 16:52:41 GMT, [EMAIL PROTECTED] (eyez) wrote:

>>4. A GUI interface to the most common configuration files.
>>
>>In order to beat Windows, client-side, we need:
>>
>>1. A GUI interface to *all* configuration files;
>
>Ugh. that's why i LEFT windows.
>
>maybe the whole world SHOULDN'T run linux. It's not a system that's made to
>be like windows.

  A GUI would be good for configuring the system and stuff, as long as
the config files could still be edited with text editors for other
users.

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


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