Linux-Development-Sys Digest #207, Volume #8 Wed, 11 Oct 00 09:13:19 EDT
Contents:
Re: A new directory hierarchy standard - need opinions (Todd Knarr)
Re: Most popular Linux development environment(s)? Graphical? (Taavo Raykoff)
Re: linux drivers for a sound blaster ("Justin Dubs")
Re: Kernel 2.4.0-test7, 8, and 9 "Warning pasting would not give a valid
preprocessing token" ? ("Emu")
Re: Most popular Linux development environment(s)? Graphical? (MeekGeek)
Re: Most popular Linux development environment(s)? Graphical? (MeekGeek)
Re: Most popular Linux development environment(s)? Graphical? (Christopher Browne)
Re: Network Drivers help! (Tasos Kotaras)
Re: Determining what CPU is going to execute a thread from a program ("Maneesh Soni")
Re: ext2 file size limit? (Andreas Jaeger)
Re: memory utilities (Karl Heyes)
Re: Determining what CPU is going to execute a thread from a program ("Miguel Angel
Rodriguez Jodar")
Re: Determining what CPU is going to execute a thread from a program (jwk)
Re: utime(touch) gives EPERM - Bug in Linux??? (Marc SCHAEFER)
Re: Driver Loading FPGA Device (Iwo Mergler)
----------------------------------------------------------------------------
From: Todd Knarr <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.admin,comp.os.linux.networking,comp.os.linux.setup
Subject: Re: A new directory hierarchy standard - need opinions
Date: 11 Oct 2000 00:31:03 GMT
In comp.os.linux.development.system <[EMAIL PROTECTED]> Equinox
<[EMAIL PROTECTED]> wrote:
> 1) A lot of cruft that should be stored elsewhere seems to have
> collected in /usr/ . Shouldn't the directory containing include
> files be under a src/ directory somewhere?
Nope. Think a second. src/ contains source code. Where do the include
files for, say, glibc go if you don't have the source code for glibc
installed ( this would be most machines )? This doesn't show up when
thinking about applications but does show up in the set of files needed
to use a library vs. the set of files needed to build the library in the
first place.
> 2) /opt/ seems to be a "Program Files"-like directory [please excuse
> the reference to Windoze] for the installation of software
> packages that don't fit neatly into the /usr/* and /usr/local/*
> hierarchies. Why, then, do we have /opt/bin/ , /opt/lib/ , and
> so forth?
Convention. /opt is broken down per-package. If you aren't referencing
the /opt/{package} directories directly, you usually make a link from
/usr/{bin|lib|...} ( or /usr/local/{bin|lib|...} to the appropriate files
under /opt.
Frankly I find /opt a kludge, but it's a reasonable solution when
dealing with packages that like to own their entire directory tree
and don't co-exist well in the same directories as other packages.
> 3) Another /opt/ issue... /opt/ is described in section 3.8 of the
> current FHS as a place for "add-on application software
> packages". I interpret "add-on" to mean "not essential to system
> operation". In light of this, why do we have /opt/ , instead of
> /usr/opt/ and /usr/local/opt/ ?
Because either would be exactly equivalent to /opt?
> 4) All special allowances for X11 need to be done away with. It's
> just another program, but its current convoluted directory
> structure makes configuration and administration needlessly
> difficult. Gathering up this monster's sprawling pieces and
> sticking them into /usr/opt/X11R6/ might not be a bad idea.
Already done, isn't it? At least on my system everything for X11 lives
under /usr/X11R6 except for the config files under /etc/X11.
--
If it's a hobby for me and a job for you, why are you doing such a shoddy
job of it?
-- Linus Torvalds
------------------------------
From: Taavo Raykoff <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Most popular Linux development environment(s)? Graphical?
Date: Tue, 10 Oct 2000 21:39:54 -0400
O'Reilly's "Learning GNU Emacs" is a great intro to emacs for the user who
wants an effective tool. It covers console emacs primarily, but 95% of the
concepts are extensible to XEmacs.
Taavo.
jazz wrote:
>
> I guess emacs can do a lot more than I thought. Do you know where I can
> find a good book on using emacs like this, preferably with a tutorial? I
> have the gnu reference somewhere but haven't looked at it in a while, as I
> recall it is more like a reference, I want something that will step me
> through all the features, functions, tricks, etc...
>
> Thanks
> Jazz
------------------------------
From: "Justin Dubs" <[EMAIL PROTECTED]>
Subject: Re: linux drivers for a sound blaster
Date: Tue, 10 Oct 2000 03:25:11 -0400
They should be build in to your kernel depending on your distro. Otherwise,
you may want to check out: http://opensource.creative.com
Justin Dubs
------------------------------
From: "Emu" <[EMAIL PROTECTED]>
Subject: Re: Kernel 2.4.0-test7, 8, and 9 "Warning pasting would not give a valid
preprocessing token" ?
Date: Tue, 10 Oct 2000 23:06:00 -0500
Thanks :):)
"Rudi Sluijtman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> [EMAIL PROTECTED] (Frank Sweetser) writes:
>
> > Try instead setting CC=kgcc in the top level linux/Makefile (there
should
> > already be a line assigning CC=(something else, probably gcc))
>
> or on the commandline do:
>
> make bzImage CC=kgcc && make modules CC=kgcc
>
> which accomplishes the same without editing the Makefile.
>
> Regards,
> Rudi Sluijtman.
------------------------------
From: MeekGeek <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Most popular Linux development environment(s)? Graphical?
Date: Wed, 11 Oct 2000 03:33:12 GMT
On Mon, 09 Oct 2000 09:34:40 +0200, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
>Hi,
>
>Code Crusader is based on Code Warrior.
Just to clarify this, it's a CodeWarrior lookalike, it's not based on
any Metrowerks code.
Metrowerks sells CodeWarrior for Linux and Solaris. If you're a Mac
developer, this is probably your best bet, on the surface. Digging
beneath, you may find the Linux/Solaris versions are based on OLD
versions of both CW and GNU GCC. I haven't pursued it any further
because I've been scared off the product because of what looks like a
lack of active support.
------------------------------
From: MeekGeek <[EMAIL PROTECTED]>
Subject: Re: Most popular Linux development environment(s)? Graphical?
Date: Wed, 11 Oct 2000 03:40:00 GMT
On Tue, 10 Oct 2000 10:18:05 -0500, Kevin Holbrook
<[EMAIL PROTECTED]> wrote:
>But, if you want CodeWarrior there is a CodeWarrior for Linux.
>We are currently in beta testing for a new release.
This is great news! If you see my earlier message, I was skeptical
that Metrowerks was committed to Linux and Solaris. (Are you also
updating the Solaris version?) At any rate, I work at a shop that
originally was all Mac, and of course we still have many Mac
developers, now using Metrowerks. An updated CodeWarrior for Linux
would be a first class step forward!
------------------------------
From: [EMAIL PROTECTED] (Christopher Browne)
Subject: Re: Most popular Linux development environment(s)? Graphical?
Reply-To: [EMAIL PROTECTED]
Date: Wed, 11 Oct 2000 04:00:57 GMT
In our last episode (Wed, 11 Oct 2000 03:40:00 GMT),
the artist formerly known as MeekGeek said:
>On Tue, 10 Oct 2000 10:18:05 -0500, Kevin Holbrook
><[EMAIL PROTECTED]> wrote:
>
>>But, if you want CodeWarrior there is a CodeWarrior for Linux.
>>We are currently in beta testing for a new release.
>
>This is great news! If you see my earlier message, I was skeptical
>that Metrowerks was committed to Linux and Solaris. (Are you also
>updating the Solaris version?) At any rate, I work at a shop that
>originally was all Mac, and of course we still have many Mac
>developers, now using Metrowerks. An updated CodeWarrior for Linux
>would be a first class step forward!
The problem comes in that while this may get you a reasonably slick
way of having K001 buttons that can run "make" for you, this doesn't
necessarily buy you a common GUI programming API.
The only GUI that I'm aware of that runs on both Unix and MacOS is
Tk; I'd not be surprised if there was a GTK implementation on
Mac OS-X a year from now, but it's not there yet.
This all mean that apps should be implemented in Model/View/Controller
manner, where the GUI is kept as a separate component in the application,
which would allow reimplementing the front end as needed atop whatever
OS environment is most urgent...
--
[EMAIL PROTECTED] - <http://www.hex.net/~cbbrowne/linux.html>
Rules of the Evil Overlord #162. "If I steal something very important
to the hero, I will not put it on public display.
<http://www.eviloverlord.com/>
------------------------------
From: Tasos Kotaras <[EMAIL PROTECTED]>
Subject: Re: Network Drivers help!
Date: Wed, 11 Oct 2000 09:34:50 +0300
Kaz Kylheku wrote:
> On Mon, 09 Oct 2000 11:33:53 +0300, Tasos Kotaras <[EMAIL PROTECTED]>
wrote:
> >Hello everybody
> >
> > Although I already have some experience in char device drivers, I
> >feel lost as far as network drivers making is concerned.
> >
> > My current task is to create an HDLC driver for linux. (I'm going to
> >use the on-chip capability of PPC860 for that). From what I have seen
> >from the kernel sources, the socket abstraction that is used for the
> >network
> >drivers seems to add awful lot of complexity and overhead. Given that
> >I'll be using it in an embedded set-up, this is an issue.
>
> Drivers are not based on any socket abstraction. Sockets are an interface
that
> processes can use to talk to protocols or drivers; you can bind the right
kind
> of socket to a driver to do packet level I/O. But the socket object exists
> independently of the driver, and the driver doesn't have to do anything
special
> to make that work.
Sorry if I didn't make myself very clear. I do accept that sockets is
something above and beyond the nework driver. But you still have to
pass (you or the kernel) all the sockets burden to make a network
driver useful (i.e. build a stack from the bottom (= net. driver) to the
top (= application). As I checked in the kernel sources, the whole path
is awfully long, complex, and therefore slow. My question is whether
there is a chance to make it in a sipler way. (for example use proprietary
objects other than skb, avoid hard-wired functions like net_bh, use another
way - other than sockets - to talk with the driver, etc.) It seems to me
(please tell me if I'm wrong) that there is no other way than use a
(sophisticated?) character device, where I have all the freedom to
do what I want.
> > I would like to know if there is any way to avoid doing all this
> >fuss with the sockets.
>
> To write a network driver, you never have to touch sockets or even know
what
> they are or that they exist. You just have to implement the network device
> driver interface, the core of which has to do with header construction and
> passing packets (struct sk_buff objects) up and down.
When I mentioned the word "fuss" I meant the work done by the kernel, not me.
> >An idea that crossed my mind was that I may use a
> >character device driver to do the job. I know that this will be a char
> >rather than
> >packet oriented solution, but with some additional effort it will be OK.
>
> If you have a datalink device that resembles a serial line, it may make
sense
> to write a tty driver for it. Then your higher level datalink protocol like
> HDLC can be implemented as a tty line discipline which is independent of
the
> driver. The line discipline can hook into the networking subsystem to
appear as
> a network device.
This sounds interesting enough. Is there any formalism to do this? In the
kernel code I noticed that there are functions like e.g. dev_add_pack that
are used to hook a protocol to a network driver. Is there any documentation
on such issues? I would be grateful if somebody could feed me with some
pointers.
Thanx again
--
`\|||/
(@@)
_ooO_(_)_Ooo________________________________
______|_____|_____|_____|_____|_____|_____|_____|
_____|__________|_____|_____|____|_____|____|_____
|________Tasos Kotaras___|_____|____|_____|_____|
___|___|__Telecom Software Engineer_____|____|____
_____|_____Access Net & Wireless Comm Dept
|_______|___INTRACOM___|_____|______|______|____
__|___|______Peania 19002, Greece_|_____|____
___e-mail: [EMAIL PROTECTED]|____|____|____|
|_____Phone: +30 1 6690185_______|_____|______
------------------------------
From: "Maneesh Soni" <[EMAIL PROTECTED]>
Subject: Re: Determining what CPU is going to execute a thread from a program
Date: Wed, 11 Oct 2000 12:58:37 +0530
I think you are looking for CPU affinity concept....You can have a look at
this page
http://oss.software.ibm.com/developerworks/opensource/linux/patches/kernel.p
hp#DYNLPAR
Maneesh
Miguel Angel Rodriguez Jodar <[EMAIL PROTECTED]> wrote in
message news:8rvhu3$4am$[EMAIL PROTECTED]...
> Hi all!
>
> Is possible to indicate to the kernel which CPU, in a multiprocessor
system,
> must accept a thread we want to launch using fork(), clone() or
> phread_create() or whatever?
> Does exist a system call that can return us the number of active CPU's in
a
> system?
>
> Thanks in advance!
>
> Miguel Angel
>
>
------------------------------
From: Andreas Jaeger <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc,comp.os.linux.advocacy,alt.os.linux
Subject: Re: ext2 file size limit?
Date: 11 Oct 2000 09:36:40 +0200
>>>>> jdavida writes:
> In article <[EMAIL PROTECTED]>,
> Andreas Jaeger <[EMAIL PROTECTED]> wrote:
>> >>>>> jdavida writes:
>>
>> > I am runnign Linux 2.4 and it supports
>> > files > 2GB. See /usr/include/bits/stat.h
>> > and look at struct stat64, which supports file size
>> > up to 1 TB (always half of max filesystem size), because
>> > file size is a signed data type.
>> > You will have to define
>> > __USE_LARGEFILE64 when you create the file with
>> Check <features.h> - __USE_LARGEFILE64 cannot be defined by user
>> space
> Correct. You should define
> #define _LARGEFILE64_SOURCE 1
> instead. This define should come before
> including the header files. This will
> enable the use of large files greater than
> 2 Gig. Unfortunately, user commands and utils
> like ls(1) and stat(1) will not work: See the
> following:
> # ls -l
> /bin/ls: BIG4GIG: Value too large for defined data type
> /bin/ls: BIG4GIG2: Value too large for defined data type
> total 0
> Both of these files are 4gigabytes large!!
> I created them by a simple program that
> wrote a large buffer to the file in a loop
> that brought the size to 4 gig, and exited
> normally.
Recompile those tools after you installed a glibc that understands LFS
- it works fine for me with fileutils 4.0.
Andreas
--
Andreas Jaeger
SuSE Labs [EMAIL PROTECTED]
private [EMAIL PROTECTED]
http://www.suse.de/~aj
------------------------------
From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: memory utilities
Date: Wed, 11 Oct 2000 01:46:31 +0000
In article <[EMAIL PROTECTED]>,
Weiguang Shi <[EMAIL PROTECTED]> wrote:
> Hi people,
>
> Which tool can I use to check the memory(physical&virtual) sizes under linux?
> If you have more tools to recommend to monitor/deal with memory, could you
> please let me know too?
>
> Thanks very much Weiguang
>
Depends on how much detail you want. using ps can get you that information, or
any of the GUI variants by looking at VSZ or RSS fields. There's a few other
tools as well, memprof, ElectricFence etc.
karl.
------------------------------
From: "Miguel Angel Rodriguez Jodar" <[EMAIL PROTECTED]>
Subject: Re: Determining what CPU is going to execute a thread from a program
Date: Wed, 11 Oct 2000 11:08:18 +0200
Maneesh Soni escribi� en mensaje <8s14qb$qre$[EMAIL PROTECTED]>...
>
>I think you are looking for CPU affinity concept....You can have a look at
>this page
>http://oss.software.ibm.com/developerworks/opensource/linux/patches/kernel.
p
>hp#DYNLPAR
That's just what I've looking for!
Thank you very much :)
Miguel Angel
------------------------------
From: [EMAIL PROTECTED] (jwk)
Subject: Re: Determining what CPU is going to execute a thread from a program
Date: 11 Oct 2000 10:47:33 GMT
Reply-To: [EMAIL PROTECTED]
On Tue, 10 Oct 2000 22:41:08 +0200, Miguel Angel Rodriguez Jodar
<[EMAIL PROTECTED]> wrote:
>>not without writing it as a kernel module, I think.
>
>That's what I thought.... I wanted to be sure before surfing into the kernel
>files :)
>Thanks!
>
I've read an article about the Tux web-server which does this. If you
really want to, you might want to look into that source. It seems pretty
deep magic from what I've read....
Good luck,
Jurriaan
--
BOFH excuse #324:
Your packets were eaten by the terminator
GNU/Linux 2.2.18pre15 SMP 6:20 9 users load av: 1.37 1.39 1.29
------------------------------
From: Marc SCHAEFER <[EMAIL PROTECTED]>
Subject: Re: utime(touch) gives EPERM - Bug in Linux???
Date: 11 Oct 2000 08:00:03 GMT
Dr. Peer Griebel <[EMAIL PROTECTED]> wrote:
: I just discovered that I can't successfully "touch" a file (I don't
touch uses utime(2):
schaefer@defian:~% strace -e utime touch /tmp/truc
utime("/tmp/truc", NULL) = 0
and it's what fails:
schaefer@defian:~% strace -e utime touch /etc/passwd
utime("/etc/passwd", NULL) = -1 EACCES (Permission denied)
touch: /etc/passwd: Permission denied
and why it fails is not explained in the manpage, alas. However it's
presumably POSIX.
Samba has a work-around for it and gives the POSIX argument.
dosfiletimes
Under DOS and Windows, if a user can write to a file they can change
the timestamp on it. Under POSIX semantics, only the owner of the file
or root may change the timestamp. By default, Samba runs with POSIX
semantics and refuses to change the timestamp on a file if the user
smbd is acting on behalf of is not the file owner. Setting this option
to True allows DOS semantics and smbd will change the file timestamp as
DOS requires.
If you just want to set the utime to NOW, a user work-around might be to open
the file, append data, and truncate. Of course this won't be atomic, is
open to races, etc.
------------------------------
From: Iwo Mergler <[EMAIL PROTECTED]>
Subject: Re: Driver Loading FPGA Device
Date: Wed, 11 Oct 2000 13:56:57 +0100
Reply-To: [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
>
> In article <[EMAIL PROTECTED]>,
> Arne Driescher <[EMAIL PROTECTED]> wrote:
> > Pete Zaitcev wrote:
> > >
> > > On Mon, 09 Oct 2000 18:03:20 GMT, [EMAIL PROTECTED]
> <[EMAIL PROTECTED]> wrote:
> > > > One of the first tasks the driver I am writing must do is to read
> a .pof
> > > > file off of the system disk and program a FPGA device on the
> device
> > > > board. This is for a PCI device but I am not sure that is
> relevant to
> > > > this situation. Does anyone have or know of any code that
> implements
> > > > this?
> > > >
> > > > Thank you.
> > >
> > > This is normally done with a helper application. The application
> > > reads the file, then issues an ioctl() into the driver that programs
> > > the FPGA.
> > >
> > > --Pete
> >
> > This is certainly a good way. However, soemtimes this is not optimal
> to
> > the purpose.
> > For the final driver version you would rather try to provide a ready
> to
> > run solution
> > without extra overhead for the installation.
> > Way 1): Write a script to convert your .pof file into a hexdump and
> link
> > it to
> > the driver. See
> > http://ifatwww.et.uni-magdeburg.de/~arne/me2600/index.htm for
> > an example.
> > Way 2) See /usr/src/linux/drivers/sound/sound_firmware.c for how to
> > load files from kernel space.
> >
> > -Arne
> >
>
> Thanks to all for your input.
>
> Our home grown board has two devices on it a CPLD (that will be
> programmed by the time I get it) and an Altera FPGA EPF10K100A (to be
> programmed). We will have a .pof file on the system disk that needs to
> be written across the PCI interface, the CPLD program contains a serial
> interface emulation to clock the .pof image into the FPGA a byte at a
> time. This provides a dynamic aspect to the board.
>
> This is the first time we are trying this, previously there was a EEprom
> with the image for the FPGA and no OS.
>
> -Eric
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
I do something very similar to your task. I don't know what format *.pof
files are in; I use *.ttf files which are also produced by Altera tools
and contain configuration data in human readable ASCII. The design uses
the Passive Serial Configuration mode of the 10K100.
My CPLD contains a 32 bit shift register which is clocked out after you
write a word to it. That is, it takes only one PCI IO access to send 32
bits of data. A complete configuration takes about 70 miliseconds.
On the software side I use a user space program which does direct IO port
access (suid root). The port addresses can be extracted from /proc/bus/pci/...
Regards,
Iwo
------------------------------
** 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
******************************