From: David Zeuthen <david@fubar.dk>
To: linux-hotplug@vger.kernel.org
Subject: Re: Hardware Abstraction Layer
Date: Thu, 18 Sep 2003 20:35:45 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-106391760211690@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-106345989228476@msgid-missing>
Greg,
Havoc really touched all your points much better than me, so I'm only
replying to a subset of them.
On Thu, 2003-09-18 at 19:36, Greg KH wrote:
> But my main point is, why store this info anywhere, when it is already
> stored on your machine today? And it is automatically already handled
> properly today, without any need for "yet another abstraction layer" to
> handle it?
>
The point of HAL is really to *complement* the information that is
available in, say, Linux kernel 2.6 with sysfs.
Applications care about devices with specific capabilities, not on which
bus they are on, and certainly not how to retrieve it from this or that
bus. They use device-category specific support libraries to do that.
The contention is to have properties for each device that links to where
bus-information information is. For example, in Linux Kernel 2.6 you
would have a OS.Linux.devpath property that points somewhere into /sys
for *every* device.
The advantage of this: When you ask an established device-access library
to do something, you can give it a device-id and it does the job. It
simply looks at the OS.Linux.devpath property from the given device and
does it's magic. Nothing less, Nothing more and quite future proof.
> Yes, I know this only works on Linux, and you want to be
> "cross-platform". Might I suggest you get the other OSs that you want
> to support to also support what Linux already does, instead of trying to
> duplicate work?
>
This is not trying to duplicate work at all. It's simply shielding
applications from caring about bus information etc. by moving such
information into libraries. No application should know what USB,
IEEE1394 and so on is...
Also getting everyone to do and emulate what Linux does is not friendly
and it might slow down new and better interfaces both in future versions
of Linux and other places.
> Oh, what oses are you wanting to support? I think FreeBSD already
> handles much of what Linux does, with it's devfs implementation, but I
> haven't looked at that in a long time to verify this.
>
> > Applications of the HAL (e.g. desktop environments) will then use
> > standard kernel and OS interfaces to e.g. display the amount of free
> > space on a Storage device.
> >
> > I hope this clear matters up?
>
> Not really. I'm getting the impression that you don't realize the
> current state of Linux and how hotplugging and driver loading and device
> naming currently works. A lot of what you are saying you want to do,
> already works today.
>
Well, you are right that udev + sysfs is news to me...
All, I have tried to do is to formulate requirements regarding hardware
from the point of view of desktop environments. I was inspired by
Havoc's paper.
I have tried to be careful to specify everything and initiating
discussion before just coding away. Which is why we are having this
conversation, so I got at least one of my goals right ;-)
Oh, and I'm also new to open source development!
> The only "major" piece that is missing, is what udev is working on
> solving (the persistant device naming issue.) Now I agree that udev and
> the hotplug scripts, and the raw hotplug events should get sent using
> dbus events, but I was thinking that userspace programs (like GNOME and
> KDE) that cared about those events would be listening for them. I
> didn't think there needed to be a whole intermediate layer for these
> messages to have to go through. But hey, I'm probably missing something
> big here :)
>
I'm not sure, but these are the key points that HAL tries to solve.
1. Make access to devices as simple as possible by shielding
applications from bus-specific things by moving such specifics
into libraries.
2. Having a single device info file concept that OEM's ship with
their devices. This device info file should cover most popular
distros and OS'es and versions thereof.
It should specify what the device is and what the user needs
to do in order to interact with it. In order to match a device
do this it need specifics of the hardware like usb.idVendor etc.
3. Provide some place where user-made settings are stored and persisted
for a device. For instance UI-things like device name, where to
mount a storage device and with what options (storage only readable
by the user or not etc.).
<rambling>
In fact, things that pop on in the device-list managed by the HAL could
be devices managed by other hosts (USB ports on your remote display,
your fridge, a remote webserver etc.)..
</rambling>
> So is udev. And yes, I have no problem agreeing on the dbus message
> format.
>
That sounds good.
Regards,
David
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2003-09-18 20:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-13 13:30 Hardware Abstraction Layer David Zeuthen
2003-09-14 22:34 ` Joerg Sommer
2003-09-16 16:39 ` Greg KH
2003-09-17 0:40 ` David Zeuthen
2003-09-18 0:29 ` Greg KH
2003-09-18 11:24 ` David Zeuthen
2003-09-18 17:36 ` Greg KH
2003-09-18 18:30 ` Havoc Pennington
2003-09-18 20:35 ` David Zeuthen [this message]
2003-09-19 20:11 ` Joerg Sommer
2003-09-19 23:12 ` Greg KH
2003-09-20 0:12 ` Greg KH
2003-09-20 0:17 ` Greg KH
2003-09-20 19:31 ` Joerg Sommer
2003-09-21 6:42 ` Greg KH
2003-09-21 20:56 ` David Zeuthen
2003-09-24 21:08 ` Greg KH
2003-09-29 20:50 ` David Zeuthen
2003-10-01 1:30 ` Havoc Pennington
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-hotplug-106391760211690@msgid-missing \
--to=david@fubar.dk \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).