Linux-Development-Sys Digest #209, Volume #8 Thu, 12 Oct 00 00:13:15 EDT
Contents:
Re: Hard Disk Swap (Philip Armstrong)
Re: Driver Loading FPGA Device ([EMAIL PROTECTED])
Re: Driver Loading FPGA Device (Jeff Andre)
Re: Driver Loading FPGA Device ([EMAIL PROTECTED])
Re: Driver Loading FPGA Device (Jeff Andre)
Re: Driver Loading FPGA Device ([EMAIL PROTECTED])
Re: Driver Loading FPGA Device (Pete Zaitcev)
Re: problem with ftp (Hilkiah G Lavinier)
LILO version 21.6 released (John in SD)
Re: mapping and locking user memory (Karl Heyes)
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? (Robert Redelmeier)
Re: utime(touch) gives EPERM - Bug in Linux??? (Juergen Pfann)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Philip Armstrong)
Subject: Re: Hard Disk Swap
Date: 11 Oct 2000 21:31:51 +0100
In article <843F5.27527$[EMAIL PROTECTED]>,
John Hall <[EMAIL PROTECTED]> wrote:
>I'm using some removeable hard drive racks to swap a 40 gig backup volume
>out once a week. I don't want to restart the system; so I'm swapping hot.
eek. AFAIK ide /= hotswap at all. You're system might have whizzy
hardware to cope with it though. Investigate hdparm -U / -R in that
case.
>I wrote some scripts to shut down all the services that are using the drive,
>unmount it, then put the drive itself to sleep using "hdparm -Y /dev/hdx"
>
>There's also a feature in the man page for hdparm " -f " that flushes the
>buffer cache of the drive; I would like to do this when i put the new drive
>in : "hdparm -f /dev/hdx" before I mount it etcetera. Unfortunately, I am
>well aware that sometimes features listen in man pages outlive the actual
>features in applications - and when I do this "hdparm -f /dev/hdx" it
>returns quietly to the prompt. For other functions it gives me a status
>afterward; in this case it does not.
>
>What i'm really asking is, does this feature still work? Does it do what it
>says it's doing? Is there a way to check?
Who knows. The drive could lie to hdparm anyway, which might explain
why it doesn't bother to return anything useful. It might be worth
perusing the source to see if there are any relevant comments.
I would probably just use sync(1) rather than mess with hdparm. Then
you'll just have to hope that the drive has actually written the data
to the disk rather than just cached it for a bit.
>I know of two other ways to accomplish this very simply; there's always
>"e2fsck -F /dev/hdx" but it seems like the hdparm buffer flush would be more
>elegant. The other way is to put the ide drivers into modules and rmmod them
>and insmod them. Unfortunately my root FS is also on an IDE drive and I
>would have to get clever to make that one work.
e2fsck -F looks like it might do the same thing as issuing a sync on a
per fs basis. Possibly. YMMV.
>Any insight here? Thanks in advance.
Be careful out there...
Phil
--
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Driver Loading FPGA Device
Date: Wed, 11 Oct 2000 20:46:40 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Jonathan Buzzard) wrote:
> In article <8rv6ri$1r2$[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] writes:
> > 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.
> >
>
> Could you not use two modules one to program the FPGA and one for the
> driver. Alternatively what happens if you include it in the
initialization
> routines as a local variable and mark it with __initfunc? Will the
> kernel free the memory used by the variable one initialised?
>
> JAB.
>
> --
> Jonathan A. Buzzard Email: [EMAIL PROTECTED]
> Northumberland, United Kingdom. Tel: +44(0)1661-832195
>
Right now I am designing it with the FPGA programming as part of the
initialization. I will try marking the routines with __initfunc and see
what happens, I don't anticipate it behaving unexpectedly.
I hadn't thought of two modules, what would you expect as the advantages
to this approach?
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Jeff Andre)
Subject: Re: Driver Loading FPGA Device
Date: 11 Oct 2000 20:45:02 GMT
Pete Zaitcev ([EMAIL PROTECTED]) wrote:
: > I have also have a card with FPGAs. I've loaded the card via ioctl() and
: > it works fine. One problem I have is that it takes about 11 seconds to
: > load the FPGAs. For the duration of the ioctl() a kernel lock is held
: > (2.2.16, haven't looked at the 2.4.0 kernels yet) and processes on the
: > other processor can hang if they do something that requires kernel services.
: >[...]
: How time sensitive is FPGA loading on your device? E.g. if you do
: JTAG with hardware assist or E2C you may be able do everything
: from the userland, doing mmap of device space. As you can see,
: I am entirely clueless about the way FPGA operates...
It doesn't appear to be too time sensitive. Loading is a fairly primitive
process. Write the next word to a register; tell another register the
next word's available; wait <5 ms until register is clear, repeat.
When done, register complete, check status for correct loading, update
device driver status.
Because of the way the card's loaded I'm leary of letting a user process
do all of the above. Doing that via /proc seems a safer approach.
Jeff
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Driver Loading FPGA Device
Date: Wed, 11 Oct 2000 21:01:55 GMT
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> [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
>
Your approach is very similar to ours the only difference is that will
be loading the FPGA image from within the driver during initialization.
I am followed the suggestion of Arne Driescher and looked at
/usr/src/linux/drivers/sound/sound_firmware.c which allows me to load a
buffer full of the FPGA image and clock it through the CPLD like you
are doing.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Jeff Andre)
Subject: Re: Driver Loading FPGA Device
Date: 11 Oct 2000 20:54:39 GMT
Rick Ellis ([EMAIL PROTECTED]) wrote:
: In article <8s06v2$oep$[EMAIL PROTECTED]>,
: Jeff Andre <[EMAIL PROTECTED]> wrote:
: >Is there a way of releasing that lock so the other processor can continue
: >working? I've been thinking about scheduling an immediate task to handle
: >the loading. However, using /proc looks like an interesting solution.
: Just call schedule() inside the loop.
I looked into that. schedule() does release the kernel lock. What I
couldn't be sure of (no time to trace the execution path at the moment)
is that when my task was rescheduled I'd have the lock again. I don't
care about having the lock because I'm only changing the driver's
structures. When my function returns control the ioctl() system call
is going to release the kernel lock.
Is the kernel lock restored after schedule()? If not, will releasing
it when it's not owned cause bad things to happen?
Thanks,
Jeff Andre
------------------------------
From: [EMAIL PROTECTED]
Subject: Re: Driver Loading FPGA Device
Date: Wed, 11 Oct 2000 21:08:53 GMT
In article <8s06v2$oep$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Jeff Andre) wrote:
> Mathias Waack ([EMAIL PROTECTED]) wrote:
> : Hi,
>
> : [EMAIL PROTECTED] (Pete Zaitcev) writes:
>
> : > 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?
> : > >
> : > This is normally done with a helper application. The application
reads
> : > the file, then issues an ioctl() into the driver that programs the
> : > FPGA.
>
> : Yes. Or another solution would be a writable /proc-file. So could
just
> : use "cat" as your helper application.
>
> I have also have a card with FPGAs. I've loaded the card via ioctl()
and
> it works fine. One problem I have is that it takes about 11 seconds
to
> load the FPGAs. For the duration of the ioctl() a kernel lock is held
> (2.2.16, haven't looked at the 2.4.0 kernels yet) and processes on the
> other processor can hang if they do something that requires kernel
services.
>
> Is there a way of releasing that lock so the other processor can
continue
> working? I've been thinking about scheduling an immediate task to
handle
> the loading. However, using /proc looks like an interesting solution.
>
> Jeff Andre
>
I need the FPGA to load during driver initialization. I followed Arne
Driescher's suggestion of looking at
/usr/src/linux/drivers/sound/sound_firmware.c. It shows how to load a
any FPGA image into a buffer. I then write this to the CPLD to clock it
into the FPGA.
-Eric
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED] (Pete Zaitcev)
Subject: Re: Driver Loading FPGA Device
Date: Wed, 11 Oct 2000 21:21:27 GMT
>[...]
> It doesn't appear to be too time sensitive. Loading is a fairly primitive
> process. Write the next word to a register; tell another register the
> next word's available; wait <5 ms until register is clear, repeat.
> When done, register complete, check status for correct loading, update
> device driver status.
Another poster suggested calling schedule() at the "repeat" step,
presumably without changing the task state. I think it was the
best idea.
> Because of the way the card's loaded I'm leary of letting a user process
> do all of the above. Doing that via /proc seems a safer approach.
I selected the same approach for drivers/sbus/char/jsflash.c.
Now seeing the way the discussion moves I doubt it was a sane idea.
--Pete
------------------------------
From: Hilkiah G Lavinier <[EMAIL PROTECTED]>
Crossposted-To: alt.linux,comp.os.linux.setup,linux.redhat.install,linux.redhat.misc
Subject: Re: problem with ftp
Date: Wed, 11 Oct 2000 22:31:06 -0400
Stefaan A Eeckels wrote:
> In article <8r0jft$8g1$[EMAIL PROTECTED]>,
> "jhuman" <[EMAIL PROTECTED]> writes:
> > I get this error when trying to ftp to one of my linux boxes on private
> > lan....
> >
> > 421 Service not available, remote server has closed connection
> >
> > What does this mean and how do I fix it....
>
> Usually, it's because of badly configured tcpwrappers.
>
> --
> Stefaan
> --
> Ninety-Ninety Rule of Project Schedules:
> The first ninety percent of the task takes ninety percent of
> the time, and the last ten percent takes the other ninety percent.
Not sure if this'll help, but check that in /etc/inetd.conf, the line with
'ftp' isn't commented out.
Also maybe u should look at /etc/hosts.allow and /etc/ftphosts to make sure
they are configured properly (Do this on the machine u are ftping to).
regards, Hilkiah
------------------------------
From: John in SD <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.misc,comp.os.linux.hardware
Subject: LILO version 21.6 released
Reply-To: [EMAIL PROTECTED]
Date: Wed, 11 Oct 2000 22:27:18 GMT
LILO release 21.6 is based upon Werner Almesberger's LILO version 21.
Version 21.6 is an upgrade for users of the Reiser File System, and adds
new diagnostic capabilities. Internal changes allow booting kernels with
larger real-mode setup codes (2.4.0 and later). This version is fully
backward compatible with version 21.5, which added the customizable boot
menu interface, and versions back to 21.2, which allowed booting beyond
the 1024 cylinder limit on disks >8Gb.
Source code is available for download from:
ftp://brun.dyndns.org/pub/linux/lilo (developer's site)
Or from the main distribution site:
ftp://metalab.unc.edu/pub/Linux/system/boot/lilo (please use)
See the distribution file 'CHANGES' for details of the differences between
21.6 and prior releases.
--John Coffman <[EMAIL PROTECTED]>
P.S. As of the time of this announcement, the main distribution site at
ftp://metalab.unc.edu had not yet been updated.
LILO version 21.6 (04-Oct-2000) source at
ftp: metalab.unc.edu dir: /pub/Linux/system/boot/lilo
------------------------------
From: Karl Heyes <[EMAIL PROTECTED]>
Subject: Re: mapping and locking user memory
Date: Thu, 12 Oct 2000 00:28:51 +0000
In article <8s2f4a$ptm$[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote:
> Hi,
> how can I map and lock user memory in my module(driver). I have to
> access the data inside a spinlock and so must ensure that the user data
> is in non-paged or page-locked memory.
>
Can't you use the mlock system call.
karl.
------------------------------
From: "Emu" <[EMAIL PROTECTED]>
Subject: Re: Kernel 2.4.0-test7, 8, and 9 "Warning pasting would not give a valid
preprocessing token" ?
Date: Wed, 11 Oct 2000 22:58:33 -0500
That did not wor? Exactly print in out again with all the appropriate
spaces. But I tried it many ways and I got an error message. WHat I was
able to do is what an earlier post said to modify the Makefile CC = gcc to
CC = kgcc and another line further down CC =$(CROSS_COMPILE)gcc to CC
=$(CROSS_COMPILE)kgcc
Thanks though, still not sure why what you you said to do on the commanf
line didn't work?
"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.
------------------------------
Date: Wed, 11 Oct 2000 22:05:05 -0500
From: Robert Redelmeier <[EMAIL PROTECTED]>
Subject: Re: Most popular Linux development environment(s)? Graphical?
I can't help myself :)
$ vi foo.c ; gcc -O2 foo.c && ./a.out
is my favorite development environment! !! or up arrow
to repeat. gdb when needed. Use virtual consoles when
you want to keep source open, or see compiler messages.
But then again, I'm a CLI dinosaur :)
-- Robert
------------------------------
From: Juergen Pfann <[EMAIL PROTECTED]>
Subject: Re: utime(touch) gives EPERM - Bug in Linux???
Date: Thu, 12 Oct 2000 05:18:57 +0200
Rick Ellis wrote:
>
> In article <[EMAIL PROTECTED]>,
> Dr. Peer Griebel <[EMAIL PROTECTED]> wrote:
>
> >I just discovered that I can't successfully "touch" a file (I don't
> >own the file):
> >
> > > ls -l myfile
> > -rw-rw-rw- 1 ralph users 123 Okt 10 13:46 myfile
> > > touch myfile
> > touch: myfile: operation not permitted
> >
> >As you can see the file has write permission (the directory also). But
> >the file belongs to somebody else - not me. This error occurs in
> >2.2.10, in 2.2.14 - but not in 2.0.36.
>
> You need write permission for the directory entry not the file itself.
>
Yes, the "w" bit for the directory the file is in - and, of course,
the "x" bit, too, in order to "enter" the directory at all.
(The latter seems to be the case already).
Whereas the directory's "r" bit is strictly speaking not necessary -
however, it's more convenient to be allowed to do "ls"...
Juergen
------------------------------
** 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
******************************