What is hal linux

HAL — Hardware Abstraction Layer

These pages attempt to provide a specification and an implementation of a hardware abstraction layer.
For a good background on what a HAL does, see the «Making Hardware Just Work» article that motivated this work.

Source Code

  • View latest code on-line: http://cgit.freedesktop.org/hal/tree/
  • View latest changelog/commitlog online: http://cgit.freedesktop.org/hal/log/
  • Building development tree: HAL Build Instructions
  • Tarballs are available at http://hal.freedesktop.org/releases/

GIT

Git is now being used for HAL. There is a nice tutorial for using git with freedesktop.org projects. There is also another tutorial at IBM Developerworks site. You can also take a look at http://cgit.freedesktop.org/hal/tree/HACKING.

hal-info

hal-info is a small hal sub-package that provides the hardware data and quirks. These quirks are currently things like what mice support reporting battery status, what music players are supported and what cameras are detected.

hal-info and hal should not be packaged together. When packaging hal, it should depend on hal-info, of any version. hal-info should also be checked out in the same level directory as hal if you intend to use ./run-hald.sh

There are no official tarball releases yet, but you can get the latest code from git and release tar.gz from http://hal.freedesktop.org/releases/. See here for more information.

Dependencies

 * Linux kernel 2.6.19 (or later) * util-linux 2.15 (or later) * udev 125 (or later) * dbus 0.61 (or later) * glib 2.6.0 (or later) * expat 1.95.8 (or later) * bash 2.0 (or later) * hal-info 20070402 (or later) 

Optional Dependencies

 * libusb >= 0.1.10a * pciutils >= 2.2.3 * dmidecode >= 2.7 * parted == 1.7.1, 1.8.0, 1.8.1, 1.8.2 or 1.86 * cryptsetup-luks >= 1.0.1 * libsmbios >= 0.13.4 

Bugs?

Communicate

HOWTOs

Documentation

  • Latest HAL specification
  • «System Integration and GNOME by David Zeuthen (GUADEC June 2006) — ODF
  • «System Integration and GNOME by David Zeuthen (GUADEC June 2006) — PDF
  • «HAL reverse engineered» (for OpenSolaris) by Artem Kachitchkine (April 2006)
  • «Adding encryption support to HAL: A user’s experience with Fedora development» (Red Hat Magazine) by W. Michael Petullo (October 2005)
  • «Desktop and Hardware Configuration» (Red Hat Magazine) by David Zeuthen (January 2005)
  • «Making Hardware Just Work» by Havoc Pennington (July 2003)
Читайте также:  Postgresql linux зайти в базу

External Resources

  • libhal++: C++ wrapper for libhal and libhal-storage. As of now not supported by the HAL project/developers: bug reports/requests please to internalerror AT gmail.com (M.Derezynski)
  • libhal++ has now been superceded by HAL/C++, a reimplementation of libhal and libhal-storage in C++. The project can be found at the same server, HAL/C++
  • gnome-mount

Источник

HAL-0.5.7.1

HAL is a hardware abstraction layer, which is a piece of software that provides a view of the various hardware attached to a system. In addition to this, HAL keeps detailed metadata for each piece of hardware and provides hooks such that system and desktop-level software can react to changes in the hardware configuration in order to maintain system policy.

The most important goal of HAL is to provide plug-and-play facilities for UNIX-like desktops with focus on providing a rich and extensible description of device characteristics and features. One example of the functionality provided by HAL is when you plug in a USB storage device. HAL can automatically create a mount point in /media and mount the device.

Package Information

  • Download (HTTP): http://freedesktop.org/~david/dist/hal-0.5.7.1.tar.gz
  • Download (FTP): ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/hal-0.5.7.1.tar.gz
  • Download MD5 sum: d7a7741808ba130f8aff3f5d3b5689e4
  • Download size: 1.5 MB
  • Estimated disk space required: 19.0 MB
  • Estimated build time: 0.5 SBU

HAL Dependencies

Required

PCI Utilities-2.2.3 (with a current pci.ids file) and usbutils-0.72 (with a current usb.ids file)

Optional

Installation of HAL

You must create a dedicated user and group before installing the package. Though the default BLFS instructions run the HAL daemon as the root user, a configuration file is installed which has the dedicated user’s name hard-coded in it. This causes a confusing message to be generated when starting the D-BUS daemon. Issue the following commands as the root user:

groupadd -g 19 haldaemon && useradd -c "HAL Daemon User" -d /dev/null -u 19 \ -g haldaemon -s /bin/false haldaemon

Install HAL by running the following commands:

./configure --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/lib/hal \ --localstatedir=/var && make

To test the results, issue make check .

make install && install -v -m755 -d /var/run/hald

Command Explanations

--libexecdir=/usr/lib/hal: This parameter forces the installation of libexec files to /usr/lib/hal instead of /usr/libexec.

Читайте также:  Nero linux 4 serial

--localstatedir=/var: This parameter forces the creation of the pid file to /var/run/hald instead of /usr/var/run/hald.

Run-Time Dependencies

The hal-device-manager program requires several additional packages to be installed before it will run. The list is significant and requires a substantial commitment to install them. It is left up to you to determine if the time and effort spent installing the following packages is worth using the hal-device-manager program.

Though the only requirement to run the hal-device-manager program is installing GNOME-Python , the dependency list is staggering. The following list does not include the dependencies already identified in the BLFS book. For example, libgnome already lists GNOME VFS , GConf , etc., so they are not repeated here. Note that some of the dependencies have their own dependencies, which have their own, and so forth and so on.

[Note]

Note

The dependency list is designed to start at the bottom and work your way up until the last package to install is GNOME-Python . Note that the dependencies marked as “ required ” are required for the package it is listed under. For example, you don’t need to install ORBit if you don’t plan on installing PyORBit . The minimum packages you could install to support running hal-device-manager would be (in this order): libgnome-2.14.1, libglade-2.6.0, PyGTK and GNOME-Python .

Configuring HAL

Config Files

/etc/dbus-1/system.d/hal.conf, /etc/dbus-1/system.d/halusers.conf and /etc/hal/*

Configuration Information

The default setup for HAL is to allow only certain users to invoke methods such as Mount(). These are the root user and the user determined to be at the active console using pam_console . If you are not set up to use Linux-PAM-0.99.4.0 and pam_console , create a group that is allowed to invoke HAL methods with the following commands:

groupadd -g 61 halusers && cat > /etc/dbus-1/system.d/halusers.conf           EOF

Now add the users you would like to the halusers group to use HAL . Note that these users still need to have appropriate permissions to access the devices that HAL will invoke its methods on.

With the above configuration in place, authorized users now have the ability to unmount disk partitions mounted at non-standard locations such as /pub. If you’d like to restrict this policy to only drives which are considered removable or hotpluggable, add the following configuration file as the root user:

cat > /etc/hal/fdi/policy/no-fixed-drives.fdi       true     EOF

HAL only provides the methods such as Mount() to act on hardware. In order to take advantage of these, a HAL event handler such as gnome-volume-manager-1.5.15 or Ivman should be installed.

Читайте также:  Линукс поменять права доступа

[Note]

Note

HAL will ignore any devices listed in /etc/fstab for the purpose of automounting. You must remove any listings for devices that you would like automounted such as CD-ROMs or USB keys.

Boot Script

To automatically start the hald daemon when the system is rebooted, install the /etc/rc.d/init.d/haldaemon bootscript from the blfs-bootscripts-20060910 package.

[Important]

Important

If the system-wide D-BUS daemon was running during the installation of HAL , ensure you stop and restart the D-BUS daemon before attempting to start the hald daemon.

Contents

Installed Programs: hal-device, hal-device-manager, hal-find-by-capability, hal-find-by-property, hal-get-property, hal-set-property, hald and lshal

Installed Directories: /etc/hal, /usr/include/hal, /usr/lib/hal, /usr/share/doc/hal-0.5.7.1, /usr/share/hal and /var/run/hald

Short Descriptions

is used to create, remove or show a HAL device.

shows a graphical representation of all the devices HAL is aware of. This program requires GNOME-Python. Here is a screenshot of hal-device-manager communicating with the HAL daemon and displaying a tree of device objects. The shown properties in the screenshot are for a device object representing a hard disk.

prints the Unique Device Identifiers for HAL device objects of a given capability.

prints the Unique Device Identifiers for HAL device objects where a given property assumes a given value.

retrieves a property from a device.

attempts to set property for a device. Note that, due to security considerations, it may not be possible to set a property.

is the HAL daemon program.

shows all devices and their properties. If the —monitor option is given then the device list and all devices are monitored for changes.

contains the API functions required by the HAL programs.

contains the API functions required by the HAL storage and volume utility programs.

Last updated on 2007-01-21 11:50:20 -0600

Источник

Оцените статью
Adblock
detector